[PATCH] D30584: CodeGen: Use the source filename as the argument to .file, rather than the module ID.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 15 09:38:00 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL297853: CodeGen: Use the source filename as the argument to .file, rather than theā¦ (authored by pcc).
Changed prior to commit:
https://reviews.llvm.org/D30584?vs=90511&id=91893#toc
Repository:
rL LLVM
https://reviews.llvm.org/D30584
Files:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/test/CodeGen/X86/file-source-filename.ll
Index: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -267,7 +267,7 @@
// don't, this at least helps the user find where a global came from.
if (MAI->hasSingleParameterDotFile()) {
// .file "foo.c"
- OutStreamer->EmitFileDirective(M.getModuleIdentifier());
+ OutStreamer->EmitFileDirective(M.getSourceFileName());
}
GCModuleInfo *MI = getAnalysisIfAvailable<GCModuleInfo>();
Index: llvm/trunk/test/CodeGen/X86/file-source-filename.ll
===================================================================
--- llvm/trunk/test/CodeGen/X86/file-source-filename.ll
+++ llvm/trunk/test/CodeGen/X86/file-source-filename.ll
@@ -0,0 +1,4 @@
+; RUN: llc -mtriple=x86_64-linux-gnu < %s | FileCheck %s
+; CHECK: .file "foobar"
+
+source_filename = "foobar"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30584.91893.patch
Type: text/x-patch
Size: 947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170315/8e34701c/attachment.bin>
More information about the llvm-commits
mailing list