From 3fd1e9933f4bb621ab6706b598830ff125fefe50 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 25 Aug 2014 18:16:47 +0000 Subject: Modernize raw_fd_ostream's constructor a bit. Take a StringRef instead of a "const char *". Take a "std::error_code &" instead of a "std::string &" for error. A create static method would be even better, but this patch is already a bit too big. llvm-svn: 216393 --- llvm/examples/BrainF/BrainFDriver.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'llvm/examples/BrainF/BrainFDriver.cpp') diff --git a/llvm/examples/BrainF/BrainFDriver.cpp b/llvm/examples/BrainF/BrainFDriver.cpp index 9b1f0d3f..5820f1d 100644 --- a/llvm/examples/BrainF/BrainFDriver.cpp +++ b/llvm/examples/BrainF/BrainFDriver.cpp @@ -107,9 +107,8 @@ int main(int argc, char **argv) { OutputFilename = base+".bc"; } if (OutputFilename != "-") { - std::string ErrInfo; - out = new raw_fd_ostream(OutputFilename.c_str(), ErrInfo, - sys::fs::F_None); + std::error_code EC; + out = new raw_fd_ostream(OutputFilename, EC, sys::fs::F_None); } } -- cgit v1.1