aboutsummaryrefslogtreecommitdiff
path: root/lib/IR/AsmWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IR/AsmWriter.cpp')
-rw-r--r--lib/IR/AsmWriter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/IR/AsmWriter.cpp b/lib/IR/AsmWriter.cpp
index 6153e350e98..1d867fc8371 100644
--- a/lib/IR/AsmWriter.cpp
+++ b/lib/IR/AsmWriter.cpp
@@ -1362,7 +1362,9 @@ static void WriteAsOperandInternal(raw_ostream &Out, const Metadata *MD,
Machine = new SlotTracker(Context);
int Slot = Machine->getMetadataSlot(N);
if (Slot == -1)
- Out << "<badref>";
+ // Give the pointer value instead of "badref", since this comes up all
+ // the time when debugging.
+ Out << "<" << N << ">";
else
Out << '!' << Slot;
return;