summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-12-09 17:36:38 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-12-09 17:36:38 +0000
commitf25faaaffbd9c6d3ffeccb333d0338e5bcb796b1 (patch)
tree70ae0540bfd7a3e2623f0d9c62ff3670d8d31a1d /clang/lib/Frontend/CompilerInstance.cpp
parentd47180e45e96411c69dad778752988fed336ac4f (diff)
downloadbcm5719-llvm-f25faaaffbd9c6d3ffeccb333d0338e5bcb796b1.tar.gz
bcm5719-llvm-f25faaaffbd9c6d3ffeccb333d0338e5bcb796b1.zip
Use error_code instead of std::string* for MemoryBuffer.
llvm-svn: 121378
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 30c3b62c191..d1e1e69184c 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -36,6 +36,7 @@
#include "llvm/Support/Path.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/Signals.h"
+#include "llvm/Support/system_error.h"
using namespace clang;
CompilerInstance::CompilerInstance()
@@ -486,8 +487,10 @@ bool CompilerInstance::InitializeSourceManager(llvm::StringRef InputFile,
}
SourceMgr.createMainFileID(File);
} else {
- llvm::MemoryBuffer *SB = llvm::MemoryBuffer::getSTDIN();
+ llvm::error_code ec;
+ llvm::MemoryBuffer *SB = llvm::MemoryBuffer::getSTDIN(ec);
if (!SB) {
+ // FIXME: Give ec.message() in this diag.
Diags.Report(diag::err_fe_error_reading_stdin);
return false;
}
OpenPOWER on IntegriCloud