From 7b6fef82d43a4e121a284ebabf5de94c3485b29a Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Thu, 9 Dec 2010 17:36:48 +0000 Subject: Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with error_code &ec. And fix clients. llvm-svn: 121379 --- llvm/lib/Support/CommandLine.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Support/CommandLine.cpp') diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index a99e46dbd1c..e856509d4f3 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 - 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. -- cgit v1.2.3