summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-05-13 20:01:34 +0000
committerVedant Kumar <vsk@apple.com>2016-05-13 20:01:34 +0000
commit31af1fd161a6eb5a000b35f9b350801c8836b614 (patch)
treea0cb7161a0cbed5e7ea9b42b4a40822a9fc37f60 /clang/lib/Frontend/CompilerInvocation.cpp
parentac25219d206512bb25a2b42632407d93cf7a4670 (diff)
downloadbcm5719-llvm-31af1fd161a6eb5a000b35f9b350801c8836b614.tar.gz
bcm5719-llvm-31af1fd161a6eb5a000b35f9b350801c8836b614.zip
[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC
Sync up with "(llvm) Use Error in InstrProf and Coverage". llvm-svn: 269463
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 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;
}
OpenPOWER on IntegriCloud