[llvm-branch-commits] [llvm-branch] r226092 - Merging r226046:
Duncan P. N. Exon Smith
dexonsmith at apple.com
Wed Jan 14 19:59:43 PST 2015
Author: dexonsmith
Date: Wed Jan 14 21:59:43 2015
New Revision: 226092
URL: http://llvm.org/viewvc/llvm-project?rev=226092&view=rev
Log:
Merging r226046:
------------------------------------------------------------------------
r226046 | dexonsmith | 2015-01-14 14:14:26 -0800 (Wed, 14 Jan 2015) | 3 lines
IR: Always print MDLocation line
Print `MDLocation`'s `line` field even when it's 0.
------------------------------------------------------------------------
Modified:
llvm/branches/release_36/ (props changed)
llvm/branches/release_36/lib/IR/AsmWriter.cpp
llvm/branches/release_36/test/Assembler/mdlocation.ll
Propchange: llvm/branches/release_36/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 14 21:59:43 2015
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,226023,226029,226044
+/llvm/trunk:155241,226023,226029,226044,226046
Modified: llvm/branches/release_36/lib/IR/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/lib/IR/AsmWriter.cpp?rev=226092&r1=226091&r2=226092&view=diff
==============================================================================
--- llvm/branches/release_36/lib/IR/AsmWriter.cpp (original)
+++ llvm/branches/release_36/lib/IR/AsmWriter.cpp Wed Jan 14 21:59:43 2015
@@ -1291,8 +1291,8 @@ static void writeMDLocation(raw_ostream
const Module *Context) {
Out << "!MDLocation(";
FieldSeparator FS;
- if (DL->getLine())
- Out << FS << "line: " << DL->getLine();
+ // Always output the line, since 0 is a relevant and important value for it.
+ Out << FS << "line: " << DL->getLine();
if (DL->getColumn())
Out << FS << "column: " << DL->getColumn();
Out << FS << "scope: ";
Modified: llvm/branches/release_36/test/Assembler/mdlocation.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/test/Assembler/mdlocation.ll?rev=226092&r1=226091&r2=226092&view=diff
==============================================================================
--- llvm/branches/release_36/test/Assembler/mdlocation.ll (original)
+++ llvm/branches/release_36/test/Assembler/mdlocation.ll Wed Jan 14 21:59:43 2015
@@ -15,6 +15,6 @@
!3 = !MDLocation(scope: !0, inlinedAt: !1, column: 7, line: 3)
!4 = !MDLocation(column: 7, line: 3, scope: !0, inlinedAt: !1)
-; CHECK-NEXT: !3 = !MDLocation(scope: !0)
+; CHECK-NEXT: !3 = !MDLocation(line: 0, scope: !0)
!5 = !MDLocation(scope: !0)
!6 = !MDLocation(scope: !0, column: 0, line: 0)
More information about the llvm-branch-commits
mailing list