forked from OSchip/llvm-project
path.data() may return a non null terminated string
and raw_fd_ostream constructor expects a StringRef. llvm-svn: 227081
This commit is contained in:
parent
2081cefdbe
commit
344a958fe2
|
@ -68,7 +68,7 @@ public:
|
|||
this->makeHeader();
|
||||
|
||||
std::error_code ec;
|
||||
llvm::raw_fd_ostream out(outPath.data(), ec, llvm::sys::fs::F_None);
|
||||
llvm::raw_fd_ostream out(outPath, ec, llvm::sys::fs::F_None);
|
||||
if (ec)
|
||||
return ec;
|
||||
|
||||
|
|
|
@ -1266,7 +1266,7 @@ public:
|
|||
std::error_code writeFile(const lld::File &file, StringRef outPath) override {
|
||||
// Create stream to path.
|
||||
std::error_code ec;
|
||||
llvm::raw_fd_ostream out(outPath.data(), ec, llvm::sys::fs::F_Text);
|
||||
llvm::raw_fd_ostream out(outPath, ec, llvm::sys::fs::F_Text);
|
||||
if (ec)
|
||||
return ec;
|
||||
|
||||
|
|
Loading…
Reference in New Issue