Fixes a regression from r229434.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234141
91177308-0d34-0410-b5e6-
96231b3b80d8
unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,
"Could not read profile: %0");
getDiags().Report(DiagID) << EC.message();
- }
- PGOReader = std::move(ReaderOrErr.get());
+ } else
+ PGOReader = std::move(ReaderOrErr.get());
}
// If coverage mapping generation is enabled, create the
--- /dev/null
+// RUN: not %clang_cc1 -emit-llvm %s -fprofile-instr-use=%t.nonexistent.profdata 2>&1 | FileCheck %s
+
+// CHECK: error: Could not read profile: No such file or directory
+// CHECK-NOT: Assertion failed