def fdebug_compilation_dir : Separate<["-"], "fdebug-compilation-dir">,
Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>,
HelpText<"The compilation directory to embed in the debug info.">;
+def fdebug_compilation_dir_EQ : Joined<["-"], "fdebug-compilation-dir=">,
+ Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>,
+ Alias<fdebug_compilation_dir>;
def fdebug_info_for_profiling : Flag<["-"], "fdebug-info-for-profiling">,
Group<f_Group>, Flags<[CC1Option]>,
HelpText<"Emit extra debug info to make sample profile more accurate.">;
} else if (Value == "-fdebug-compilation-dir") {
CmdArgs.push_back("-fdebug-compilation-dir");
TakeNextArg = true;
+ } else if (Value.consume_front("-fdebug-compilation-dir=")) {
+ // The flag is a -Wa / -Xassembler argument and Options doesn't
+ // parse the argument, so this isn't automatically aliased to
+ // -fdebug-compilation-dir (without '=') here.
+ CmdArgs.push_back("-fdebug-compilation-dir");
+ CmdArgs.push_back(Value.data());
} else {
D.Diag(diag::err_drv_unsupported_option_argument)
<< A->getOption().getName() << Value;
// RUN: mkdir -p %t.dir && cd %t.dir
// RUN: cp %s rel.c
// RUN: %clang_cc1 -fdebug-compilation-dir /nonsense -emit-llvm -debug-info-kind=limited rel.c -o - | FileCheck -check-prefix=CHECK-NONSENSE %s
+// RUN: %clang_cc1 -fdebug-compilation-dir=/nonsense -emit-llvm -debug-info-kind=limited rel.c -o - | FileCheck -check-prefix=CHECK-NONSENSE %s
// CHECK-NONSENSE: nonsense
// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck -check-prefix=CHECK-DIR %s
// RUN: -fdiagnostics-color \
// RUN: -fno-diagnostics-color \
// RUN: -fdebug-compilation-dir . \
+// RUN: -fdebug-compilation-dir=. \
// RUN: -fdiagnostics-parseable-fixits \
// RUN: -fdiagnostics-absolute-paths \
// RUN: -ferror-limit=10 \
// CHECK-NO-CF-PROTECTION-BRANCH-NOT: -fcf-protection=branch
// RUN: %clang -### -S -fdebug-compilation-dir . %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s
+// RUN: %clang -### -S -fdebug-compilation-dir=. %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s
// RUN: %clang -### -fdebug-compilation-dir . -x assembler %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s
+// RUN: %clang -### -fdebug-compilation-dir=. -x assembler %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s
// CHECK-DEBUG-COMPILATION-DIR: "-fdebug-compilation-dir" "."
// RUN: %clang -### -S -fdiscard-value-names %s 2>&1 | FileCheck -check-prefix=CHECK-DISCARD-NAMES %s
// CHECK-TRIVIAL-ZERO-BAD: hasn't been enabled
// RUN: %clang -### -S -fno-temp-file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-TEMP-FILE %s
-// CHECK-NO-TEMP-FILE: "-fno-temp-file"
\ No newline at end of file
+// CHECK-NO-TEMP-FILE: "-fno-temp-file"
// CHECK-X64: "-cc1"
// CHECK-X64: "-cc1"
-// CHECK-X64-NOT: "-fdebug-compilation-dir"
+// CHECK-X64-NOT: "-fdebug-compilation-dir
// RUN: %clang -target armv7-apple-ios -fembed-bitcode=all -c %s -o /dev/null -### 2>&1 \
// RUN: | FileCheck -check-prefix CHECK-ARM %s
// CHECK-ARM: "-cc1"
// CHECK-ARM: "-target-abi"
// CHECK-ARM: "apcs-gnu"
-// CHECK-ARM-NOT: "-fdebug-compilation-dir"
+// CHECK-ARM-NOT: "-fdebug-compilation-dir
// RUN: %clang -target arm64-apple-ios -fembed-bitcode=all -c %s -o /dev/null -### 2>&1 \
// RUN: | FileCheck -check-prefix CHECK-AARCH64 %s
// CHECK-AARCH64: "-cc1"
// CHECK-AARCH64: "-target-abi"
// CHECK-AARCH64: "darwinpcs"
-// CHECK-AARCH64-NOT: "-fdebug-compilation-dir"
+// CHECK-AARCH64-NOT: "-fdebug-compilation-dir
// RUN: %clang -target hexagon-unknown-elf -ffixed-r19 -fembed-bitcode=all -c %s -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-HEXAGON %s
// PIC: "-mrelocation-model" "pic"
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-fdebug-compilation-dir,. 2>&1 | FileCheck --check-prefix=WA_DEBUGDIR %s
+// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Wa,-fdebug-compilation-dir=. 2>&1 | FileCheck --check-prefix=WA_DEBUGDIR %s
// WA_DEBUGDIR: "-fdebug-compilation-dir" "."
// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -fdebug-compilation-dir -Xassembler . 2>&1 | FileCheck --check-prefix=XA_DEBUGDIR %s
+// RUN: %clang -### -target x86_64--- -c -integrated-as %s -Xassembler -fdebug-compilation-dir=. 2>&1 | FileCheck --check-prefix=XA_DEBUGDIR %s
// XA_DEBUGDIR: "-fdebug-compilation-dir" "."