diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-08-07 00:02:30 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-08-07 00:02:30 +0000 |
commit | 34556ff0261d5bccb318234c1f49230a354ac1ea (patch) | |
tree | 8daf6f2092d4f1325120378cc55e106ccd9e0d0f /clang/lib/Driver/Driver.cpp | |
parent | 4c58381c3a5506b9f2fe39975d96bdca65d7c2c2 (diff) | |
download | bcm5719-llvm-34556ff0261d5bccb318234c1f49230a354ac1ea.tar.gz bcm5719-llvm-34556ff0261d5bccb318234c1f49230a354ac1ea.zip |
Handle null suffixes in GetTemporaryPath (PCH files don't have suffixes).
llvm-svn: 161367
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r-- | clang/lib/Driver/Driver.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 1c47d5c9da0..012d79ff33c 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/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(); } |