This revision was automatically updated to reflect the committed changes. Closed by commit rG67ac3f1fbeec: [Driver] Pass the flag -dI to cc1 invocation (authored by qichaogu, committed by erichkeane). Herald added a project: clang.
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117292/new/ https://reviews.llvm.org/D117292 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/test/Driver/preprocessor.c Index: clang/test/Driver/preprocessor.c =================================================================== --- clang/test/Driver/preprocessor.c +++ clang/test/Driver/preprocessor.c @@ -4,3 +4,11 @@ #define A B A A +// The driver should pass preprocessor dump flags (-dD, -dM and -dI) to cc1 invocation +// RUN: %clang -### -E -dD %s 2>&1 | FileCheck --check-prefix=CHECK-dD %s +// RUN: %clang -### -E -dM %s 2>&1 | FileCheck --check-prefix=CHECK-dM %s +// RUN: %clang -### -E -dI %s 2>&1 | FileCheck --check-prefix=CHECK-dI %s +// CHECK-dD: clang{{.*}} "-cc1" {{.*}} "-dD" +// CHECK-dM: clang{{.*}} "-cc1" {{.*}} "-dM" +// CHECK-dI: clang{{.*}} "-cc1" {{.*}} "-dI" + Index: clang/lib/Driver/ToolChains/Clang.cpp =================================================================== --- clang/lib/Driver/ToolChains/Clang.cpp +++ clang/lib/Driver/ToolChains/Clang.cpp @@ -6666,6 +6666,7 @@ Args.AddLastArg(CmdArgs, options::OPT_dM); Args.AddLastArg(CmdArgs, options::OPT_dD); + Args.AddLastArg(CmdArgs, options::OPT_dI); Args.AddLastArg(CmdArgs, options::OPT_fmax_tokens_EQ);
Index: clang/test/Driver/preprocessor.c =================================================================== --- clang/test/Driver/preprocessor.c +++ clang/test/Driver/preprocessor.c @@ -4,3 +4,11 @@ #define A B A A +// The driver should pass preprocessor dump flags (-dD, -dM and -dI) to cc1 invocation +// RUN: %clang -### -E -dD %s 2>&1 | FileCheck --check-prefix=CHECK-dD %s +// RUN: %clang -### -E -dM %s 2>&1 | FileCheck --check-prefix=CHECK-dM %s +// RUN: %clang -### -E -dI %s 2>&1 | FileCheck --check-prefix=CHECK-dI %s +// CHECK-dD: clang{{.*}} "-cc1" {{.*}} "-dD" +// CHECK-dM: clang{{.*}} "-cc1" {{.*}} "-dM" +// CHECK-dI: clang{{.*}} "-cc1" {{.*}} "-dI" + Index: clang/lib/Driver/ToolChains/Clang.cpp =================================================================== --- clang/lib/Driver/ToolChains/Clang.cpp +++ clang/lib/Driver/ToolChains/Clang.cpp @@ -6666,6 +6666,7 @@ Args.AddLastArg(CmdArgs, options::OPT_dM); Args.AddLastArg(CmdArgs, options::OPT_dD); + Args.AddLastArg(CmdArgs, options::OPT_dI); Args.AddLastArg(CmdArgs, options::OPT_fmax_tokens_EQ);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits