diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-03-09 01:02:30 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-03-09 01:02:30 +0000 |
| commit | 11c1f42f66fc4b9dd714c1125c11c4bbf3e22f30 (patch) | |
| tree | 4d1792991de3009035f9e92a2dedfa627b530ada /lib/CodeGen | |
| parent | 64703d89c06b36ecb449d1cb106b6cf25117a42d (diff) | |
| download | external_llvm-11c1f42f66fc4b9dd714c1125c11c4bbf3e22f30.zip external_llvm-11c1f42f66fc4b9dd714c1125c11c4bbf3e22f30.tar.gz external_llvm-11c1f42f66fc4b9dd714c1125c11c4bbf3e22f30.tar.bz2 | |
mcstreamerize AsmPrinter::printLabel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98025 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
| -rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 12 | ||||
| -rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 246538b..cdd5fff 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1323,7 +1323,6 @@ void AsmPrinter::processDebugLoc(const MachineInstr *MI, CurDLT.getColumnNumber(), CurDLT.getScope().getNode()); printLabel(L); - O << '\n'; DW->BeginScope(MI, L); PrevDLT = CurDLT.getNode(); } @@ -1554,12 +1553,17 @@ 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 { - printLabel(MI->getOperand(0).getImm()); - OutStreamer.AddBlankLine(); + MCSymbol *Sym = + OutContext.GetOrCreateSymbol(Twine(MAI->getPrivateGlobalPrefix()) + + "label" + Twine(MI->getOperand(0).getImm())); + OutStreamer.EmitLabel(Sym); } void AsmPrinter::printLabel(unsigned Id) const { - O << MAI->getPrivateGlobalPrefix() << "label" << Id << ':'; + MCSymbol *Sym = + OutContext.GetOrCreateSymbol(Twine(MAI->getPrivateGlobalPrefix()) + + "label" + Twine(Id)); + OutStreamer.EmitLabel(Sym); } /// PrintAsmOperand - Print the specified operand of MI, an INLINEASM diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 8272eab..3c32281 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1972,7 +1972,6 @@ void DwarfDebug::endScope(const MachineInstr *MI) { unsigned Label = MMI->NextLabelID(); Asm->printLabel(Label); - O << '\n'; SmallVector<DbgScope *, 2> &SD = I->second; for (SmallVector<DbgScope *, 2>::iterator SDI = SD.begin(), SDE = SD.end(); @@ -2131,7 +2130,6 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) { DLT.getColumnNumber(), DLT.getScope().getNode()); Asm->printLabel(LabelID); - O << '\n'; } if (TimePassesIsEnabled) DebugTimer->stopTimer(); |
