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/lib/Support/CommandLine.cpp | |
parent | f25faaaffbd9c6d3ffeccb333d0338e5bcb796b1 (diff) | |
download | llvm-7b6fef82d43a4e121a284ebabf5de94c3485b29a.zip llvm-7b6fef82d43a4e121a284ebabf5de94c3485b29a.tar.gz llvm-7b6fef82d43a4e121a284ebabf5de94c3485b29a.tar.bz2 |
Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with error_code &ec. And fix clients.
llvm-svn: 121379
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r-- | llvm/lib/Support/CommandLine.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index a99e46d..e856509 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -22,6 +22,7 @@ #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Support/system_error.h" #include "llvm/Target/TargetRegistry.h" #include "llvm/Support/Host.h" #include "llvm/Support/Path.h" @@ -464,8 +465,9 @@ static void ExpandResponseFiles(unsigned argc, char** argv, if (FileStat && FileStat->getSize() != 0) { // Mmap the response file into memory. + error_code ec; OwningPtr<MemoryBuffer> - respFilePtr(MemoryBuffer::getFile(respFile.c_str())); + respFilePtr(MemoryBuffer::getFile(respFile.c_str(), ec)); // If we could open the file, parse its contents, otherwise // pass the @file option verbatim. |