diff options
| -rw-r--r-- | clang/lib/Driver/Driver.cpp | 2 | ||||
| -rw-r--r-- | clang/test/Driver/cl-outputs.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 87e1e2333fc..1f2915ae32f 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -1670,7 +1670,7 @@ const char *Driver::GetNamedOutputPath(Compilation &C, } else NamedOutput = DefaultImageName.c_str(); } else { - const char *Suffix = types::getTypeTempSuffix(JA.getType()); + const char *Suffix = types::getTypeTempSuffix(JA.getType(), IsCLMode()); assert(Suffix && "All types used for output should have a suffix."); std::string::size_type End = std::string::npos; diff --git a/clang/test/Driver/cl-outputs.c b/clang/test/Driver/cl-outputs.c index befff29527c..4a8fc5ca491 100644 --- a/clang/test/Driver/cl-outputs.c +++ b/clang/test/Driver/cl-outputs.c @@ -4,6 +4,9 @@ // Note: %s must be preceded by --, otherwise it may be interpreted as a // command-line option, e.g. on Mac where %s is commonly under /Users. +// RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=DEFAULT %s +// DEFAULT: "-o" "cl-outputs.obj" + // RUN: %clang_cl /Foa -### -- %s 2>&1 | FileCheck -check-prefix=FoNAME %s // FoNAME: "-o" "a.obj" |

