diff options
author | Vedant Kumar <vsk@apple.com> | 2016-05-16 20:50:13 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2016-05-16 20:50:13 +0000 |
commit | 3354e2c5fe29651429d1da7b121a7357b41c3854 (patch) | |
tree | 310d1507a345b72addb8bc1e47e8e97b60cea183 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 7cb2fd5904df50f6ed133a6e2bffcc2dd61a3452 (diff) | |
download | bcm5719-llvm-3354e2c5fe29651429d1da7b121a7357b41c3854.tar.gz bcm5719-llvm-3354e2c5fe29651429d1da7b121a7357b41c3854.zip |
Reapply^2 "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC"
Sync up with "(llvm) Use Error in InstrProf and Coverage".
Differential Revision: http://reviews.llvm.org/D19902
llvm-svn: 269695
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 8e93ff1a4b4..20b66906d56 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -403,7 +403,8 @@ 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 (ReaderOrErr.getError()) { + if (auto E = ReaderOrErr.takeError()) { + llvm::consumeError(std::move(E)); Opts.setProfileUse(CodeGenOptions::ProfileClangInstr); return; } |