summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/StripSymbols.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/IPO/StripSymbols.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/StripSymbols.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/IPO/StripSymbols.cpp b/llvm/lib/Transforms/IPO/StripSymbols.cpp
index 8a7c87911f6..e459a634dcf 100644
--- a/llvm/lib/Transforms/IPO/StripSymbols.cpp
+++ b/llvm/lib/Transforms/IPO/StripSymbols.cpp
@@ -353,9 +353,11 @@ bool StripDeadDebugInfo::runOnModule(Module &M) {
// sure that an assert is hit if the location of the subprogram array
// changes. This is just to make sure that this is updated if such an
// event occurs.
- assert(DIC->getNumOperands() >= 5 && SPs == DIC->getOperand(4) &&
- "DICompileUnits is expected to store Subprograms in operand 4.");
- DIC->replaceOperandWith(4, MDNode::get(C, LiveSubprograms));
+ assert(DIC->getNumOperands() >= 10 &&
+ SPs == DIC->getOperand(9) &&
+ "DICompileUnits is expected to store Subprograms in operand "
+ "9.");
+ DIC->replaceOperandWith(9, MDNode::get(C, LiveSubprograms));
Changed = true;
}
@@ -364,10 +366,11 @@ bool StripDeadDebugInfo::runOnModule(Module &M) {
// make sure that an assert is hit if the location of the subprogram array
// changes. This is just to make sure that this index is updated if such
// an event occurs.
- assert(
- DIC->getNumOperands() >= 6 && GVs == DIC->getOperand(5) &&
- "DICompileUnits is expected to store Global Variables in operand 5.");
- DIC->replaceOperandWith(5, MDNode::get(C, LiveGlobalVariables));
+ assert(DIC->getNumOperands() >= 11 &&
+ GVs == DIC->getOperand(10) &&
+ "DICompileUnits is expected to store Global Variables in operand "
+ "10.");
+ DIC->replaceOperandWith(10, MDNode::get(C, LiveGlobalVariables));
Changed = true;
}
OpenPOWER on IntegriCloud