summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-14 02:33:54 +0000
committerChris Lattner <sabre@nondot.org>2010-03-14 02:33:54 +0000
commitee2fbbc978aa29a0196ea522adb947a8f86dde4a (patch)
treeb2ceb0047581b28bbf89d16f9329e0401478244e /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parent07293da97ebf4028f95ba0b9c0a6f200b4c03ebc (diff)
downloadbcm5719-llvm-ee2fbbc978aa29a0196ea522adb947a8f86dde4a.tar.gz
bcm5719-llvm-ee2fbbc978aa29a0196ea522adb947a8f86dde4a.zip
change the LabelSDNode to be EHLabelSDNode and make it hold
an MCSymbol. Make the EH_LABEL MachineInstr hold its label with an MCSymbol instead of ID. Fix a bug in MMI.cpp which would return labels named "Label4" instead of "label4". llvm-svn: 98463
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index b7cc5b3a21d..31151f304af 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1553,7 +1553,12 @@ void AsmPrinter::printKill(const MachineInstr *MI) const {
/// printLabel - This method prints a local label used by debug and
/// exception handling tables.
void AsmPrinter::printLabelInst(const MachineInstr *MI) const {
- MCSymbol *Sym =
+ MCSymbol *Sym;
+
+ if (MI->getOperand(0).isMCSymbol())
+ Sym = MI->getOperand(0).getMCSymbol();
+ else
+ Sym =
OutContext.GetOrCreateTemporarySymbol(Twine(MAI->getPrivateGlobalPrefix()) +
"label" + Twine(MI->getOperand(0).getImm()));
OutStreamer.EmitLabel(Sym);
OpenPOWER on IntegriCloud