summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2008-12-03 11:01:37 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2008-12-03 11:01:37 +0000
commitcda011b5adebd1f6f513b43141698a4f071a7148 (patch)
treee8b43d5bb35f5cdd5e63e5a9ab19a44d4689999f /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parentfeece7edab380de1580ec8fabb45ffe5948932dc (diff)
downloadbcm5719-llvm-cda011b5adebd1f6f513b43141698a4f071a7148.tar.gz
bcm5719-llvm-cda011b5adebd1f6f513b43141698a4f071a7148.zip
Fix bug 3140.
Print a single parameter .file directive if we have an ELF target. llvm-svn: 60480
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index bfc2e35cf36..b640a589bad 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -142,6 +142,14 @@ bool AsmPrinter::doInitialization(Module &M) {
GCModuleInfo *MI = getAnalysisToUpdate<GCModuleInfo>();
assert(MI && "AsmPrinter didn't require GCModuleInfo?");
+
+ if (TAI->hasSingleParameterDotFile()) {
+ /* Very minimal debug info. It is ignored if we emit actual
+ debug info. If we don't, this at helps the user find where
+ a function came from. */
+ O << "\t.file\t\"" << M.getModuleIdentifier() << "\"\n";
+ }
+
for (GCModuleInfo::iterator I = MI->begin(), E = MI->end(); I != E; ++I)
if (GCMetadataPrinter *MP = GetOrCreateGCPrinter(*I))
MP->beginAssembly(O, *this, *TAI);
OpenPOWER on IntegriCloud