diff options
| author | Bob Wilson <bob.wilson@apple.com> | 2009-11-02 16:59:06 +0000 |
|---|---|---|
| committer | Bob Wilson <bob.wilson@apple.com> | 2009-11-02 16:59:06 +0000 |
| commit | 433ab09ca312a372631af6904070ffdab5102ba9 (patch) | |
| tree | 46f4e1204a09447409209e911ac0ba78f910da5c /llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp | |
| parent | e90a4aa703a85106c822c6525cb4526947b1ed18 (diff) | |
| download | bcm5719-llvm-433ab09ca312a372631af6904070ffdab5102ba9.tar.gz bcm5719-llvm-433ab09ca312a372631af6904070ffdab5102ba9.zip | |
Add support for BlockAddress values in ARM constant pools.
llvm-svn: 85806
Diffstat (limited to 'llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp')
| -rw-r--r-- | llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp index 8cbc4201587..aa1eec50d9f 100644 --- a/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp +++ b/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp @@ -159,7 +159,6 @@ namespace { printDataDirective(MCPV->getType()); ARMConstantPoolValue *ACPV = static_cast<ARMConstantPoolValue*>(MCPV); - GlobalValue *GV = ACPV->getGV(); std::string Name; if (ACPV->isLSDA()) { @@ -167,7 +166,10 @@ namespace { raw_svector_ostream(LSDAName) << MAI->getPrivateGlobalPrefix() << "_LSDA_" << getFunctionNumber(); Name = LSDAName.str(); - } else if (GV) { + } else if (ACPV->isBlockAddress()) { + Name = GetBlockAddressSymbol(ACPV->getBlockAddress())->getName(); + } else if (ACPV->isGlobalValue()) { + GlobalValue *GV = ACPV->getGV(); bool isIndirect = Subtarget->isTargetDarwin() && Subtarget->GVIsIndirectSymbol(GV, TM.getRelocationModel()); if (!isIndirect) @@ -188,8 +190,10 @@ namespace { StubSym = OutContext.GetOrCreateSymbol(NameStr.str()); } } - } else + } else { + assert(ACPV->isExtSymbol() && "unrecognized constant pool value"); Name = Mang->makeNameProper(ACPV->getSymbol()); + } O << Name; if (ACPV->hasModifier()) O << "(" << ACPV->getModifier() << ")"; |

