summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-02-26 00:17:25 +0000
committerReid Kleckner <reid@kleckner.net>2015-02-26 00:17:25 +0000
commit1df0fea5939970f6ba4e77aa00a0d2ecadbad3ec (patch)
treefdf890a5b7d833fbef5cc6489e7f64aba4bdef4c /clang/lib/Frontend/CompilerInvocation.cpp
parentebdfc00995264d2cd3795824c8074e03e6322d35 (diff)
downloadbcm5719-llvm-1df0fea5939970f6ba4e77aa00a0d2ecadbad3ec.tar.gz
bcm5719-llvm-1df0fea5939970f6ba4e77aa00a0d2ecadbad3ec.zip
Add -fuse-line-directive flag to control usage of #line with -E
Currently -fms-extensions controls this behavior, which doesn't make much sense. It means we can't identify what is and isn't a system header when compiling our own preprocessed output, because #line doesn't represent this information. If someone is feeding Clang's preprocessed output to another compiler, they can use this flag. Fixes PR20553. Reviewers: rsmith Differential Revision: http://reviews.llvm.org/D5217 llvm-svn: 230587
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index ef76cbfebd9..2098dec1729 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1826,6 +1826,7 @@ static void ParsePreprocessorOutputArgs(PreprocessorOutputOptions &Opts,
Opts.ShowMacroComments = Args.hasArg(OPT_CC);
Opts.ShowMacros = Args.hasArg(OPT_dM) || Args.hasArg(OPT_dD);
Opts.RewriteIncludes = Args.hasArg(OPT_frewrite_includes);
+ Opts.UseLineDirectives = Args.hasArg(OPT_fuse_line_directives);
}
static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args) {
OpenPOWER on IntegriCloud