aboutsummaryrefslogtreecommitdiff
path: root/tools/llvmc2/CompilationGraph.cpp
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2008-05-30 19:56:27 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2008-05-30 19:56:27 +0000
commit74a0c28fba95a307454146d7018f9671948b3102 (patch)
tree17b1d1e26e8fb7afa236f1b3fbf8ad68a73497cd /tools/llvmc2/CompilationGraph.cpp
parent18aac1c6225da41a89eeafb1b10c061d39a81481 (diff)
Fix the -opt switch and add a test case for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvmc2/CompilationGraph.cpp')
-rw-r--r--tools/llvmc2/CompilationGraph.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/llvmc2/CompilationGraph.cpp b/tools/llvmc2/CompilationGraph.cpp
index 9cdcac3845..acf391a290 100644
--- a/tools/llvmc2/CompilationGraph.cpp
+++ b/tools/llvmc2/CompilationGraph.cpp
@@ -151,6 +151,10 @@ namespace {
Out.appendComponent(BaseName);
}
Out.appendSuffix(Suffix);
+ // NOTE: makeUnique always *creates* a unique temporary file,
+ // which is good, since there will be no races. However, some
+ // tools do not like it when the output file already exists, so
+ // they have to be placated with -f or something like that.
Out.makeUnique(true, NULL);
return Out;
}