diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-09 17:36:48 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-09 17:36:48 +0000 |
commit | 7b6fef82d43a4e121a284ebabf5de94c3485b29a (patch) | |
tree | 09a49a4bb8f4c8c8b5a13d4d328b82f442a26969 /llvm/utils/TableGen/TableGen.cpp | |
parent | f25faaaffbd9c6d3ffeccb333d0338e5bcb796b1 (diff) | |
download | bcm5719-llvm-7b6fef82d43a4e121a284ebabf5de94c3485b29a.tar.gz bcm5719-llvm-7b6fef82d43a4e121a284ebabf5de94c3485b29a.zip |
Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with error_code &ec. And fix clients.
llvm-svn: 121379
Diffstat (limited to 'llvm/utils/TableGen/TableGen.cpp')
-rw-r--r-- | llvm/utils/TableGen/TableGen.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/TableGen.cpp b/llvm/utils/TableGen/TableGen.cpp index e6d000a1e2d..e8815da35c2 100644 --- a/llvm/utils/TableGen/TableGen.cpp +++ b/llvm/utils/TableGen/TableGen.cpp @@ -42,6 +42,7 @@ #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/ToolOutputFile.h" #include "llvm/Support/Signals.h" +#include "llvm/Support/system_error.h" #include <algorithm> #include <cstdio> using namespace llvm; @@ -188,11 +189,11 @@ void llvm::PrintError(SMLoc ErrorLoc, const Twine &Msg) { static bool ParseFile(const std::string &Filename, const std::vector<std::string> &IncludeDirs, SourceMgr &SrcMgr) { - std::string ErrorStr; - MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(), &ErrorStr); + error_code ec; + MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(), ec); if (F == 0) { errs() << "Could not open input file '" << Filename << "': " - << ErrorStr <<"\n"; + << ec.message() <<"\n"; return true; } |