std::vector<std::pair<MCSymbol *, MDNode *>> CodeViewAnnotations;
/// CodeView heapallocsites.
- std::vector<std::tuple<MCSymbol*, MCSymbol*, DIType*>>
+ std::vector<std::tuple<MCSymbol *, MCSymbol *, const DIType *>>
CodeViewHeapAllocSites;
bool CallsEHReturn = false;
}
/// Record heapallocsites
- void addCodeViewHeapAllocSite(MachineInstr *I, MDNode *MD);
+ void addCodeViewHeapAllocSite(MachineInstr *I, const MDNode *MD);
- ArrayRef<std::tuple<MCSymbol*, MCSymbol*, DIType*>>
- getCodeViewHeapAllocSites() const {
+ ArrayRef<std::tuple<MCSymbol *, MCSymbol *, const DIType *>>
+ getCodeViewHeapAllocSites() const {
return CodeViewHeapAllocSites;
}
if (!BeginLabel->isDefined() || !EndLabel->isDefined())
continue;
- DIType *DITy = std::get<2>(HeapAllocSite);
+ const DIType *DITy = std::get<2>(HeapAllocSite);
MCSymbol *HeapAllocEnd = beginSymbolRecord(SymbolKind::S_HEAPALLOCSITE);
OS.AddComment("Call site offset");
OS.EmitCOFFSecRel32(BeginLabel, /*Offset=*/0);
SmallVector<LexicalBlock *, 1> ChildBlocks;
std::vector<std::pair<MCSymbol *, MDNode *>> Annotations;
- std::vector<std::tuple<MCSymbol *, MCSymbol *, DIType *>> HeapAllocSites;
+ std::vector<std::tuple<MCSymbol *, MCSymbol *, const DIType *>>
+ HeapAllocSites;
const MCSymbol *Begin = nullptr;
const MCSymbol *End = nullptr;
return FilterID;
}
-void MachineFunction::addCodeViewHeapAllocSite(MachineInstr *I, MDNode *MD) {
+void MachineFunction::addCodeViewHeapAllocSite(MachineInstr *I,
+ const MDNode *MD) {
MCSymbol *BeginLabel = Ctx.createTempSymbol("heapallocsite", true);
MCSymbol *EndLabel = Ctx.createTempSymbol("heapallocsite", true);
I->setPreInstrSymbol(*this, BeginLabel);
I->setPostInstrSymbol(*this, EndLabel);
- DIType *DI = dyn_cast<DIType>(MD);
+ const DIType *DI = dyn_cast<DIType>(MD);
CodeViewHeapAllocSites.push_back(std::make_tuple(BeginLabel, EndLabel, DI));
}
// Set labels for heapallocsite call.
if (CLI.CS && CLI.CS->getInstruction()->getMetadata("heapallocsite")) {
- MDNode *MD = CLI.CS->getInstruction()->getMetadata("heapallocsite");
+ const MDNode *MD = CLI.CS->getInstruction()->getMetadata("heapallocsite");
MF->addCodeViewHeapAllocSite(CLI.Call, MD);
}