aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-08-07 00:02:30 +0000
committerTed Kremenek <kremenek@apple.com>2012-08-07 00:02:30 +0000
commitb019489d42da42a2071986d74e454e39bde59039 (patch)
treeb8e870b588d046d944d360ab873ca7cfcd088441 /lib/Driver/Driver.cpp
parent340868161576d892f0e1d8f17a044502a98d3373 (diff)
Handle null suffixes in GetTemporaryPath (PCH files don't have suffixes).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161367 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r--lib/Driver/Driver.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 1c47d5c9da..012d79ff33 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -1687,7 +1687,8 @@ std::string Driver::GetTemporaryPath(StringRef Prefix, const char *Suffix)
// FIXME: Grumble, makeUnique sometimes leaves the file around!? PR3837.
P.eraseFromDisk(false, 0);
- P.appendSuffix(Suffix);
+ if (Suffix)
+ P.appendSuffix(Suffix);
return P.str();
}