summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-05-19 03:54:54 +0000
committerVedant Kumar <vsk@apple.com>2016-05-19 03:54:54 +0000
commitfa2d595541cf1489af3747cc38c096b2e2cdcc32 (patch)
tree841c4984685465379f29c36e4753346596df1290 /clang/lib/Frontend/CompilerInvocation.cpp
parent9152fd17e9a0b2fc8edf41503c026ade1d0d5b1b (diff)
downloadbcm5719-llvm-fa2d595541cf1489af3747cc38c096b2e2cdcc32.tar.gz
bcm5719-llvm-fa2d595541cf1489af3747cc38c096b2e2cdcc32.zip
Reapply^3 "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC"
Sync up with "(llvm) Use Error in InstrProf and Coverage". llvm-svn: 270021
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 1a1bc47b66f..7c3850eeabe 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;
}
OpenPOWER on IntegriCloud