summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 20b66906d56..8e93ff1a4b4 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -403,8 +403,7 @@ static void setPGOUseInstrumentor(CodeGenOptions &Opts,
const std::string ProfileName) {
auto ReaderOrErr = llvm::IndexedInstrProfReader::create(ProfileName);
// In error, return silently and let Clang PGOUse report the error message.
- if (auto E = ReaderOrErr.takeError()) {
- llvm::consumeError(std::move(E));
+ if (ReaderOrErr.getError()) {
Opts.setProfileUse(CodeGenOptions::ProfileClangInstr);
return;
}
OpenPOWER on IntegriCloud