if we're compiling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175851
91177308-0d34-0410-b5e6-
96231b3b80d8
// Add an output for the extract.
Arg *FinalOutput = C.getArgs().getLastArg(options::OPT_o);
const char *OutFile;
- if (FinalOutput) {
+ if (FinalOutput && C.getArgs().hasArg(options::OPT_c)) {
SmallString<128> T(FinalOutput->getValue());
llvm::sys::path::replace_extension(T, "dwo");
OutFile = Args.MakeArgString(T);
// RUN: FileCheck -check-prefix=CHECK-NO-ACTIONS < %t %s
//
// CHECK-NO-ACTIONS-NOT: -split-dwarf
+
+
+// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -o Bad.x -### %s 2> %t
+// RUN: FileCheck -check-prefix=CHECK-BAD < %t %s
+//
+// CHECK-BAD-NOT: "Bad.dwo"