]> granicus.if.org Git - clang/commitdiff
Add clang -cc1 parsing for preprocessor output options (-E).
authorDaniel Dunbar <daniel@zuster.org>
Wed, 25 Nov 2009 10:14:37 +0000 (10:14 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 25 Nov 2009 10:14:37 +0000 (10:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89854 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/CC1Options.cpp

index 4d50dc7dc491b764bfdd1ae3adfd32060a659cff..919d779fa8f3bfa3120b7fa25b46409014a2da3e 100644 (file)
@@ -230,6 +230,12 @@ static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args) {
 
 static void ParsePreprocessorOutputArgs(PreprocessorOutputOptions &Opts,
                                         ArgList &Args) {
+  using namespace cc1options;
+  Opts.ShowCPP = !Args.hasArg(OPT_dM);
+  Opts.ShowMacros = Args.hasArg(OPT_dM) || Args.hasArg(OPT_dD);
+  Opts.ShowLineMarkers = !Args.hasArg(OPT_P);
+  Opts.ShowComments = Args.hasArg(OPT_C);
+  Opts.ShowMacroComments = Args.hasArg(OPT_CC);
 }
 
 static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args) {