OSDN Git Service

Delete unused instantiations of DIBuilder. NFC
authorAdrian Prantl <aprantl@apple.com>
Tue, 24 Oct 2017 20:26:17 +0000 (20:26 +0000)
committerAdrian Prantl <aprantl@apple.com>
Tue, 24 Oct 2017 20:26:17 +0000 (20:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316494 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/Local.cpp

index bf38219..fd33677 100644 (file)
@@ -1381,7 +1381,6 @@ void llvm::salvageDebugInfo(Instruction &I) {
       // need to mark the expression with a DW_OP_stack_value.
       if (GEP->accumulateConstantOffset(M.getDataLayout(), Offset)) {
         auto *DIExpr = DVI->getExpression();
-        DIBuilder DIB(M, /*AllowUnresolved*/ false);
         // GEP offsets are i32 and thus always fit into an int64_t.
         DIExpr = DIExpression::prepend(DIExpr, DIExpression::NoDeref,
                                        Offset.getSExtValue(),
@@ -1396,7 +1395,6 @@ void llvm::salvageDebugInfo(Instruction &I) {
     for (auto *DVI : DbgValues) {
       // Rewrite the load into DW_OP_deref.
       auto *DIExpr = DVI->getExpression();
-      DIBuilder DIB(M, /*AllowUnresolved*/ false);
       DIExpr = DIExpression::prepend(DIExpr, DIExpression::WithDeref);
       DVI->setOperand(0, MDWrap(I.getOperand(0)));
       DVI->setOperand(2, MetadataAsValue::get(I.getContext(), DIExpr));