}
void DiagnosticInfoSampleProfile::print(DiagnosticPrinter &DP) const {
- if (getFileName() && getLineNum() > 0)
- DP << getFileName() << ":" << getLineNum() << ": ";
- else if (getFileName())
+ if (!FileName.empty()) {
+ DP << getFileName();
+ if (LineNum > 0)
+ DP << ":" << getLineNum();
+ DP << ": ";
+ }
+ DP << getMsg();
+}
+
+void DiagnosticInfoPGOProfile::print(DiagnosticPrinter &DP) const {
+ if (getFileName())
DP << getFileName() << ": ";
DP << getMsg();
}