From 6eb4766e65557933c30152738c47e6ff34a1d216 Mon Sep 17 00:00:00 2001 From: Hans Wennborg <hans@hanshq.net> Date: Tue, 20 Feb 2018 10:47:14 +0000 Subject: [PATCH] clang-cl: Make /d1PP an alias for -dD (PR36446) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325571 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/CLCompatOptions.td | 2 ++ test/Driver/cl-options.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/include/clang/Driver/CLCompatOptions.td b/include/clang/Driver/CLCompatOptions.td index 34a1218b25..b2872d6bb8 100644 --- a/include/clang/Driver/CLCompatOptions.td +++ b/include/clang/Driver/CLCompatOptions.td @@ -61,6 +61,8 @@ def _SLASH_Brepro_ : CLFlag<"Brepro-">, def _SLASH_C : CLFlag<"C">, HelpText<"Don't discard comments when preprocessing">, Alias<C>; def _SLASH_c : CLFlag<"c">, HelpText<"Compile only">, Alias<c>; +def _SLASH_d1PP : CLFlag<"d1PP">, + HelpText<"Retain macro definitions in /E mode">, Alias<dD>; def _SLASH_d1reportAllClassLayout : CLFlag<"d1reportAllClassLayout">, HelpText<"Dump record layout information">, Alias<fdump_record_layouts>; def _SLASH_diagnostics_caret : CLFlag<"diagnostics:caret">, diff --git a/test/Driver/cl-options.c b/test/Driver/cl-options.c index abe55b7494..21d826473b 100644 --- a/test/Driver/cl-options.c +++ b/test/Driver/cl-options.c @@ -293,6 +293,9 @@ // RUN: %clang_cl /TP /c /GX /GX- -### -- %s 2>&1 | FileCheck -check-prefix=GX_ %s // GX_-NOT: "-fcxx-exceptions" "-fexceptions" +// RUN: %clang_cl /d1PP -### -- %s 2>&1 | FileCheck -check-prefix=d1PP %s +// d1PP: -dD + // We forward any unrecognized -W diagnostic options to cc1. // RUN: %clang_cl -Wunused-pragmas -### -- %s 2>&1 | FileCheck -check-prefix=WJoined %s // WJoined: "-cc1" -- 2.40.0