MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / GetGlobalVtablePos

Function GetGlobalVtablePos

CodeGenerator.cpp:1097–1107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1095//-----------------------------------------------------------------------------
1096
1097int GetGlobalVtablePos(const CXXRecordDecl* record, const CXXRecordDecl* recordB)
1098{
1099 auto iter = std::ranges::find_if(
1100 gVtables, [&](const auto& e) { return (e.first.first == record) and (e.first.second == recordB); });
1101
1102 if(iter == gVtables.end()) {
1103 iter = std::ranges::find_if(gVtables, [&](const auto& e) { return e.first.first == record; });
1104 }
1105
1106 return std::distance(gVtables.begin(), iter);
1107}
1108//-----------------------------------------------------------------------------
1109
1110void PushVtableEntry(const CXXRecordDecl* record, const CXXRecordDecl* recordB, VarDecl* decl)

Callers 1

InsertVtblPtrFunction · 0.85

Calls 2

endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected