MCPcopy Create free account
hub / github.com/beefytech/Beef / GetOrCreateType

Method GetOrCreateType

IDEHelper/DbgModule.cpp:2734–2747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2732static int gAbbrevNum = 0;
2733
2734DbgType* DbgModule::GetOrCreateType(int typeIdx, DbgDataMap& dataMap)
2735{
2736 if (typeIdx == 0)
2737 return NULL;
2738 DbgModule* linkedModule = GetLinkedModule();
2739 DbgType* dbgType = dataMap.Get<DbgType*>(typeIdx);
2740 if (dbgType != NULL)
2741 return dbgType;
2742 dbgType = mAlloc.Alloc<DbgType>();
2743 dbgType->mTypeIdx = (int)linkedModule->mTypes.size();
2744 linkedModule->mTypes.push_back(dbgType);
2745 dataMap.Set(typeIdx, dbgType);
2746 return dbgType;
2747}
2748
2749typedef std::pair<DbgClassType, void*> DataPair;
2750typedef llvm::SmallVector<DataPair, 16> DataStack;

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
push_backMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected