summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/AsmWriter.cpp4
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: ";
OpenPOWER on IntegriCloud