diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-14 03:51:36 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-14 03:51:36 +0000 |
| commit | acdee690c810a64610b1db689fc414bc16f63f98 (patch) | |
| tree | 9030178a2f5c261932d72babc1b581981c491f46 /llvm | |
| parent | d81be6d66431d2802a16656a4a3d40fd93e4b433 (diff) | |
| download | bcm5719-llvm-acdee690c810a64610b1db689fc414bc16f63f98.tar.gz bcm5719-llvm-acdee690c810a64610b1db689fc414bc16f63f98.zip | |
DebugInfo: Update signature of DICompileUnit::replace*()
Change `DICompileUnit::replaceSubprograms()` and
`DICompileUnit::replaceGlobalVariables()` to match the `MDCompileUnit`
equivalents that they're wrapping.
llvm-svn: 234852
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/IR/DebugInfo.h | 8 | ||||
| -rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 12 | ||||
| -rw-r--r-- | llvm/lib/Transforms/IPO/StripSymbols.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Utils/CloneFunction.cpp | 2 |
4 files changed, 8 insertions, 16 deletions
diff --git a/llvm/include/llvm/IR/DebugInfo.h b/llvm/include/llvm/IR/DebugInfo.h index 8abc514a8aa..56033dfead0 100644 --- a/llvm/include/llvm/IR/DebugInfo.h +++ b/llvm/include/llvm/IR/DebugInfo.h @@ -416,8 +416,12 @@ public: DIArray getGlobalVariables() const { return get()->getGlobalVariables(); } DIArray getImportedEntities() const { return get()->getImportedEntities(); } - void replaceSubprograms(DIArray Subprograms); - void replaceGlobalVariables(DIArray GlobalVariables); + void replaceSubprograms(MDSubprogramArray Subprograms) const { + get()->replaceSubprograms(Subprograms); + } + void replaceGlobalVariables(MDGlobalVariableArray GlobalVariables) const { + get()->replaceGlobalVariables(GlobalVariables); + } StringRef getSplitDebugFilename() const { return get()->getSplitDebugFilename(); diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 3ffd13064d4..d289f8079bd 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -33,20 +33,8 @@ using namespace llvm; using namespace llvm::dwarf; -//===----------------------------------------------------------------------===// -// Simple Descriptor Constructors and other Methods -//===----------------------------------------------------------------------===// - 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, LLVMContext &VMContext) { return cast<MDLocalVariable>(DV) diff --git a/llvm/lib/Transforms/IPO/StripSymbols.cpp b/llvm/lib/Transforms/IPO/StripSymbols.cpp index 817f49fecd3..39d8e7619de 100644 --- a/llvm/lib/Transforms/IPO/StripSymbols.cpp +++ b/llvm/lib/Transforms/IPO/StripSymbols.cpp @@ -345,7 +345,7 @@ bool StripDeadDebugInfo::runOnModule(Module &M) { // subprogram list/global variable list with our new live subprogram/global // variable list. if (SubprogramChange) { - DIC.replaceSubprograms(DIArray(MDNode::get(C, LiveSubprograms))); + DIC.replaceSubprograms(MDTuple::get(C, LiveSubprograms)); Changed = true; } diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index 5cc8c6df686..f5ca7ac9efd 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -171,7 +171,7 @@ static void AddOperand(DICompileUnit CU, MDSubprogramArray SPs, Metadata *NewSP) for (auto *SP : SPs) NewSPs.push_back(SP); 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 |

