Verifier: Check accessors of MDLocation
[oota-llvm.git] / lib / IR / AsmWriter.cpp
index 4eba3212e2b8040fe9bdaef0f1a33d77ccdd4f94..d77c3447705d635b3dfe58a1fcbd3e2dc7578f4d 100644 (file)
@@ -1419,11 +1419,10 @@ static void writeMDLocation(raw_ostream &Out, const MDLocation *DL,
   if (DL->getColumn())
     Out << FS << "column: " << DL->getColumn();
   Out << FS << "scope: ";
-  WriteAsOperandInternal(Out, DL->getScope(), TypePrinter, Machine, Context);
-  if (DL->getInlinedAt()) {
+  WriteAsOperandInternal(Out, DL->getRawScope(), TypePrinter, Machine, Context);
+  if (auto *IA = DL->getRawInlinedAt()) {
     Out << FS << "inlinedAt: ";
-    WriteAsOperandInternal(Out, DL->getInlinedAt(), TypePrinter, Machine,
-                           Context);
+    WriteAsOperandInternal(Out, IA, TypePrinter, Machine, Context);
   }
   Out << ")";
 }