diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-14 22:14:26 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-14 22:14:26 +0000 |
commit | 503cf3bff9ae2af77d9bcd7a76d195930cb85022 (patch) | |
tree | c101d923d8cf2684dbe1902a2e3fbfed71bffe97 /llvm/lib | |
parent | e16d58751510fe3eefa95d0fbb6ec5f2cc4bc63f (diff) | |
download | bcm5719-llvm-503cf3bff9ae2af77d9bcd7a76d195930cb85022.tar.gz bcm5719-llvm-503cf3bff9ae2af77d9bcd7a76d195930cb85022.zip |
IR: Always print MDLocation line
Print `MDLocation`'s `line` field even when it's 0.
llvm-svn: 226046
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/IR/AsmWriter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp index 215332b8256..c494d6ce3f0 100644 --- a/llvm/lib/IR/AsmWriter.cpp +++ b/llvm/lib/IR/AsmWriter.cpp @@ -1291,8 +1291,8 @@ static void writeMDLocation(raw_ostream &Out, const MDLocation *DL, 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: "; |