mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
DebugInfo: Update signature of DICompileUnit::replace*()
Change `DICompileUnit::replaceSubprograms()` and `DICompileUnit::replaceGlobalVariables()` to match the `MDCompileUnit` equivalents that they're wrapping. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234852 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -416,8 +416,12 @@ public:
|
|||||||
DIArray getGlobalVariables() const { return get()->getGlobalVariables(); }
|
DIArray getGlobalVariables() const { return get()->getGlobalVariables(); }
|
||||||
DIArray getImportedEntities() const { return get()->getImportedEntities(); }
|
DIArray getImportedEntities() const { return get()->getImportedEntities(); }
|
||||||
|
|
||||||
void replaceSubprograms(DIArray Subprograms);
|
void replaceSubprograms(MDSubprogramArray Subprograms) const {
|
||||||
void replaceGlobalVariables(DIArray GlobalVariables);
|
get()->replaceSubprograms(Subprograms);
|
||||||
|
}
|
||||||
|
void replaceGlobalVariables(MDGlobalVariableArray GlobalVariables) const {
|
||||||
|
get()->replaceGlobalVariables(GlobalVariables);
|
||||||
|
}
|
||||||
|
|
||||||
StringRef getSplitDebugFilename() const {
|
StringRef getSplitDebugFilename() const {
|
||||||
return get()->getSplitDebugFilename();
|
return get()->getSplitDebugFilename();
|
||||||
|
@ -33,20 +33,8 @@
|
|||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
using namespace llvm::dwarf;
|
using namespace llvm::dwarf;
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
// Simple Descriptor Constructors and other Methods
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
|
|
||||||
DIScopeRef DIScope::getRef() const { return MDScopeRef::get(get()); }
|
DIScopeRef DIScope::getRef() const { return MDScopeRef::get(get()); }
|
||||||
|
|
||||||
void DICompileUnit::replaceSubprograms(DIArray Subprograms) {
|
|
||||||
get()->replaceSubprograms(MDSubprogramArray(Subprograms));
|
|
||||||
}
|
|
||||||
|
|
||||||
void DICompileUnit::replaceGlobalVariables(DIArray GlobalVariables) {
|
|
||||||
get()->replaceGlobalVariables(MDGlobalVariableArray(GlobalVariables));
|
|
||||||
}
|
|
||||||
|
|
||||||
DIVariable llvm::createInlinedVariable(MDNode *DV, MDNode *InlinedScope,
|
DIVariable llvm::createInlinedVariable(MDNode *DV, MDNode *InlinedScope,
|
||||||
LLVMContext &VMContext) {
|
LLVMContext &VMContext) {
|
||||||
return cast<MDLocalVariable>(DV)
|
return cast<MDLocalVariable>(DV)
|
||||||
|
@ -345,7 +345,7 @@ bool StripDeadDebugInfo::runOnModule(Module &M) {
|
|||||||
// subprogram list/global variable list with our new live subprogram/global
|
// subprogram list/global variable list with our new live subprogram/global
|
||||||
// variable list.
|
// variable list.
|
||||||
if (SubprogramChange) {
|
if (SubprogramChange) {
|
||||||
DIC.replaceSubprograms(DIArray(MDNode::get(C, LiveSubprograms)));
|
DIC.replaceSubprograms(MDTuple::get(C, LiveSubprograms));
|
||||||
Changed = true;
|
Changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ static void AddOperand(DICompileUnit CU, MDSubprogramArray SPs, Metadata *NewSP)
|
|||||||
for (auto *SP : SPs)
|
for (auto *SP : SPs)
|
||||||
NewSPs.push_back(SP);
|
NewSPs.push_back(SP);
|
||||||
NewSPs.push_back(NewSP);
|
NewSPs.push_back(NewSP);
|
||||||
CU.replaceSubprograms(DIArray(MDNode::get(CU->getContext(), NewSPs)));
|
CU.replaceSubprograms(MDTuple::get(CU->getContext(), NewSPs));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clone the module-level debug info associated with OldFunc. The cloned data
|
// Clone the module-level debug info associated with OldFunc. The cloned data
|
||||||
|
Reference in New Issue
Block a user