forked from OSchip/llvm-project
clang-cl: Use .obj as extension for unnamed object files (PR17095)
We already use .obj as extension when the user provides a stem file name (via /Fo), but were failing in the most basic case when the file name is based on the input file. llvm-svn: 190071
This commit is contained in:
parent
2a1eb4318d
commit
0a096a0a3b
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in New Issue