diff options
Diffstat (limited to 'llvm/lib/IR/AutoUpgrade.cpp')
-rw-r--r-- | llvm/lib/IR/AutoUpgrade.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp index c28a291..7d954f9 100644 --- a/llvm/lib/IR/AutoUpgrade.cpp +++ b/llvm/lib/IR/AutoUpgrade.cpp @@ -1067,7 +1067,7 @@ static bool upgradeIntrinsicFunction1(Function *F, Function *&NewFn) { } } // Update llvm.dbg.addr intrinsics even in "new debug mode"; they'll get - // converted to DPValues later. + // converted to DbgVariableRecords later. if (Name == "addr" || (Name == "value" && F->arg_size() == 4)) { rename(F); NewFn = Intrinsic::getDeclaration(F->getParent(), Intrinsic::dbg_value); @@ -2360,23 +2360,23 @@ static void upgradeDbgIntrinsicToDbgRecord(StringRef Name, CallBase *CI) { if (Name == "label") { DR = new DPLabel(unwrapMAVOp<DILabel>(CI, 0), CI->getDebugLoc()); } else if (Name == "assign") { - DR = new DPValue( + DR = new DbgVariableRecord( unwrapMAVOp<Metadata>(CI, 0), unwrapMAVOp<DILocalVariable>(CI, 1), unwrapMAVOp<DIExpression>(CI, 2), unwrapMAVOp<DIAssignID>(CI, 3), unwrapMAVOp<Metadata>(CI, 4), unwrapMAVOp<DIExpression>(CI, 5), CI->getDebugLoc()); } else if (Name == "declare") { - DR = new DPValue(unwrapMAVOp<Metadata>(CI, 0), - unwrapMAVOp<DILocalVariable>(CI, 1), - unwrapMAVOp<DIExpression>(CI, 2), CI->getDebugLoc(), - DPValue::LocationType::Declare); + DR = new DbgVariableRecord( + unwrapMAVOp<Metadata>(CI, 0), unwrapMAVOp<DILocalVariable>(CI, 1), + unwrapMAVOp<DIExpression>(CI, 2), CI->getDebugLoc(), + DbgVariableRecord::LocationType::Declare); } else if (Name == "addr") { // Upgrade dbg.addr to dbg.value with DW_OP_deref. DIExpression *Expr = unwrapMAVOp<DIExpression>(CI, 2); Expr = DIExpression::append(Expr, dwarf::DW_OP_deref); - DR = new DPValue(unwrapMAVOp<Metadata>(CI, 0), - unwrapMAVOp<DILocalVariable>(CI, 1), Expr, - CI->getDebugLoc()); + DR = new DbgVariableRecord(unwrapMAVOp<Metadata>(CI, 0), + unwrapMAVOp<DILocalVariable>(CI, 1), Expr, + CI->getDebugLoc()); } else if (Name == "value") { // An old version of dbg.value had an extra offset argument. unsigned VarOp = 1; @@ -2389,9 +2389,9 @@ static void upgradeDbgIntrinsicToDbgRecord(StringRef Name, CallBase *CI) { VarOp = 2; ExprOp = 3; } - DR = new DPValue(unwrapMAVOp<Metadata>(CI, 0), - unwrapMAVOp<DILocalVariable>(CI, VarOp), - unwrapMAVOp<DIExpression>(CI, ExprOp), CI->getDebugLoc()); + DR = new DbgVariableRecord( + unwrapMAVOp<Metadata>(CI, 0), unwrapMAVOp<DILocalVariable>(CI, VarOp), + unwrapMAVOp<DIExpression>(CI, ExprOp), CI->getDebugLoc()); } assert(DR && "Unhandled intrinsic kind in upgrade to DbgRecord"); CI->getParent()->insertDbgRecordBefore(DR, CI->getIterator()); |