diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-05 20:14:52 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-05 20:14:52 +0000 |
commit | 155cf0f3a6843314527ce342aa1bc32517eeab3c (patch) | |
tree | 1b0ff20dc28ab7d4356eff944b81cc52a8bf0467 /llvm/lib/Transforms/Instrumentation/DebugIR.cpp | |
parent | 43318aa17c6dfd235119a2014f1c69df7e49b600 (diff) | |
download | bcm5719-llvm-155cf0f3a6843314527ce342aa1bc32517eeab3c.tar.gz bcm5719-llvm-155cf0f3a6843314527ce342aa1bc32517eeab3c.zip |
Use sys::fs::createTemporaryFile.
llvm-svn: 185719
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/DebugIR.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/DebugIR.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/DebugIR.cpp b/llvm/lib/Transforms/Instrumentation/DebugIR.cpp index f4109eff4f5..b5bdc7560b6 100644 --- a/llvm/lib/Transforms/Instrumentation/DebugIR.cpp +++ b/llvm/lib/Transforms/Instrumentation/DebugIR.cpp @@ -504,10 +504,9 @@ bool DebugIR::updateExtension(StringRef NewExtension) { } void DebugIR::generateFilename(OwningPtr<int> &fd) { - StringRef FileModel("debug-ir-%s%s%s%s.ll"); SmallVector<char, 16> PathVec; fd.reset(new int); - sys::fs::unique_file(FileModel, *fd, PathVec); + sys::fs::createTemporaryFile("debug-ir", "ll", *fd, PathVec); StringRef Path(PathVec.data(), PathVec.size()); Filename = sys::path::filename(Path); sys::path::remove_filename(PathVec); |