[OperandBundles] Rename accessor, NFC
[oota-llvm.git] / lib / IR / DiagnosticInfo.cpp
index eab14e69eaa7ee81a1370c1a80b2ff1d831fc199..4753789d9c1315dfbf1104b2cf4a07eea08a0411 100644 (file)
@@ -123,10 +123,12 @@ void DiagnosticInfoDebugMetadataVersion::print(DiagnosticPrinter &DP) const {
 }
 
 void DiagnosticInfoSampleProfile::print(DiagnosticPrinter &DP) const {
-  if (getFileName() && getLineNum() > 0)
-    DP << getFileName() << ":" << getLineNum() << ": ";
-  else if (getFileName())
-    DP << getFileName() << ": ";
+  if (!FileName.empty()) {
+    DP << getFileName();
+    if (LineNum > 0)
+      DP << ":" << getLineNum();
+    DP << ": ";
+  }
   DP << getMsg();
 }