MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / EnumLines

Method EnumLines

CppCoverage/DebugInformationEnumerator.cpp:254–277  ·  view source on GitHub ↗

----------------------------------------------------------------------

Source from the content-addressed store, hash-verified

252
253 //----------------------------------------------------------------------
254 void
255 DebugInformationEnumerator::EnumLines(IDiaSession& session,
256 IDiaSourceFile& sourceFile,
257 IDebugInformationHandler& handler)
258 {
259 CComPtr<IDiaEnumSymbols> symbols;
260 if (sourceFile.get_compilands(&symbols) != S_OK || !symbols)
261 THROW("DIA: Cannot get compilands");
262
263 EnumerateCollection<IDiaSymbol>(*symbols, [&](IDiaSymbol& symbol) {
264 CComPtr<IDiaEnumLineNumbers> lines;
265
266 if (session.findLines(&symbol, &sourceFile, &lines) != S_OK ||
267 !lines)
268 {
269 THROW("DIA: Cannot find lines");
270 }
271
272 EnumerateCollection<IDiaLineNumber>(
273 *lines, [&](IDiaLineNumber& lineNumber) {
274 OnNewLine(session, lineNumber, handler);
275 });
276 });
277 }
278
279 //----------------------------------------------------------------------
280 void

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected