[llvm-commits] [llvm] r130518 - in /llvm/trunk/lib: CodeGen/AsmPrinter/AsmPrinter.cpp MC/MCAsmStreamer.cpp
Devang Patel
dpatel at apple.com
Fri Apr 29 11:00:54 PDT 2011
Author: dpatel
Date: Fri Apr 29 13:00:54 2011
New Revision: 130518
URL: http://llvm.org/viewvc/llvm-project?rev=130518&view=rev
Log:
Hoist MCLineEntry construction AsmPrinter so that anyone who derives from AsmPrinter can have line number entries.
PR 9810
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/lib/MC/MCAsmStreamer.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=130518&r1=130517&r2=130518&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Fri Apr 29 13:00:54 2011
@@ -691,6 +691,9 @@
if (isVerbose()) EmitKill(II, *this);
break;
default:
+ if (!TM.hasMCUseLoc())
+ MCLineEntry::Make(&OutStreamer, getCurrentSection());
+
EmitInstruction(II);
break;
}
Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=130518&r1=130517&r2=130518&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Fri Apr 29 13:00:54 2011
@@ -957,9 +957,6 @@
void MCAsmStreamer::EmitInstruction(const MCInst &Inst) {
assert(getCurrentSection() && "Cannot emit contents before setting section!");
- if (!UseLoc)
- MCLineEntry::Make(this, getCurrentSection());
-
// Show the encoding in a comment if we have a code emitter.
if (Emitter)
AddEncodingComment(Inst);
More information about the llvm-commits
mailing list