From d6e44ab5ec8bc0bb939a9a595d0c653602cf4a3d Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 1 Feb 2008 09:10:45 +0000 Subject: Remove the nasty LABEL hack with a much less evil one. Now llvm.dbg.func.start implies a stoppoint is set. SelectionDAGISel records a new source line but does not create a ISD::LABEL node for this special stoppoint. Asm printer will magically print this label. This ensures nothing is emitted before. llvm-svn: 46635 --- llvm/lib/CodeGen/AsmPrinter.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/CodeGen/AsmPrinter.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp index 2b83588f9e3..2acf287988b 100644 --- a/llvm/lib/CodeGen/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter.cpp @@ -1285,6 +1285,10 @@ void AsmPrinter::printLabel(const MachineInstr *MI) const { << "label" << MI->getOperand(0).getImm() << ":\n"; } +void AsmPrinter::printLabel(unsigned Id) const { + O << "\n" << TAI->getPrivateGlobalPrefix() << "label" << Id << ":\n"; +} + /// PrintAsmOperand - Print the specified operand of MI, an INLINEASM /// instruction, using the specified assembler variant. Targets should /// overried this to format as appropriate. -- cgit v1.2.3