summaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/DebugIR.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-07-05 20:14:52 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-07-05 20:14:52 +0000
commit1276b396130a0cdbbb8e6c05a6e43123df18ed60 (patch)
tree73ac5fcf6f4ef004a672e098cf8318d113338772 /lib/Transforms/Instrumentation/DebugIR.cpp
parente11874f6c5e33f5c2d634bfd33e1ae67c93f9b74 (diff)
downloadllvm-1276b396130a0cdbbb8e6c05a6e43123df18ed60.tar.gz
llvm-1276b396130a0cdbbb8e6c05a6e43123df18ed60.tar.bz2
llvm-1276b396130a0cdbbb8e6c05a6e43123df18ed60.tar.xz
Use sys::fs::createTemporaryFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185719 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/DebugIR.cpp')
-rw-r--r--lib/Transforms/Instrumentation/DebugIR.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/Instrumentation/DebugIR.cpp b/lib/Transforms/Instrumentation/DebugIR.cpp
index f4109eff4f..b5bdc7560b 100644
--- a/lib/Transforms/Instrumentation/DebugIR.cpp
+++ b/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);