aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/Sparc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/Sparc')
-rw-r--r--lib/Target/Sparc/SparcAsmPrinter.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/Sparc/SparcAsmPrinter.cpp b/lib/Target/Sparc/SparcAsmPrinter.cpp
index a1f1a9aae9..7305031a19 100644
--- a/lib/Target/Sparc/SparcAsmPrinter.cpp
+++ b/lib/Target/Sparc/SparcAsmPrinter.cpp
@@ -396,6 +396,12 @@ void V8Printer::printOperand(const MachineOperand &MO) {
O << (int)MO.getImmedValue();
return;
case MachineOperand::MO_PCRelativeDisp: {
+ if (isa<GlobalValue> (MO.getVRegValue ())) {
+ O << Mang->getValueName (MO.getVRegValue ());
+ return;
+ }
+ assert (isa<BasicBlock> (MO.getVRegValue ())
+ && "Trying to look up something which is not a BB in the NumberForBB map");
ValueMapTy::const_iterator i = NumberForBB.find(MO.getVRegValue());
assert (i != NumberForBB.end()
&& "Could not find a BB in the NumberForBB map!");