diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-09 17:36:38 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-09 17:36:38 +0000 |
commit | 3a321e23f66128dbb986343927456ff6702af617 (patch) | |
tree | 058f1f5a8a7e4044f51dfbdc62a46b80693b94a9 /lib/Frontend/CompilerInstance.cpp | |
parent | 8f1509446fc51db0473ea1241910c06353a153b8 (diff) |
Use error_code instead of std::string* for MemoryBuffer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121378 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index 30c3b62c19..d1e1e69184 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/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; } |