commit a9f4ca4d33def425222e335241bcf6dccd486702
parent 1975b2e1cd59b90a94a708613c101be212774cb8
Author: Kyle Milz <kyle@0x30.net>
Date: Mon, 1 Aug 2016 11:31:31 -0600
src: compact raw_fd_ostream construction
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/inst_action.cc b/src/inst_action.cc
@@ -70,9 +70,8 @@ InstrumentAction::EndSourceFileAction()
<< "#endif" << std::endl;
m_TheRewriter.InsertTextAfter(start, ss.str());
- llvm::StringRef file_ref(file_name);
std::error_code ec;
- llvm::raw_fd_ostream output(file_ref, ec, llvm::sys::fs::F_None);
+ llvm::raw_fd_ostream output(file_name, ec, llvm::sys::fs::F_None);
// Write the instrumented source file
m_TheRewriter.getEditBuffer(main_fid).write(output);