Don't rely upon the MCSymbol "isDefined" method to indicate if a label has been
emitted or not. The JIT doesn't set that. Look it up in the label location table
instead.
llvm-svn: 101686
diff --git a/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp b/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp
index 281ec73..4b3ca87 100644
--- a/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp
+++ b/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp
@@ -75,7 +75,7 @@
MCSymbol *Label = Move.getLabel();
// Throw out move if the label is invalid.
- if (Label && !Label->isDefined())
+ if (Label && (*JCE->getLabelLocations())[Label] == 0)
continue;
intptr_t LabelPtr = 0;
@@ -711,7 +711,7 @@
MCSymbol *Label = Move.getLabel();
// Throw out move if the label is invalid.
- if (Label && !Label->isDefined())
+ if (Label && (*JCE->getLabelLocations())[Label] == 0)
continue;
intptr_t LabelPtr = 0;