forked from OSchip/llvm-project
Driver: Forward -traditional and -traditional-cpp in preprocessing modes.
- We don't really support the majority of the horrible -traditional-cpp behavior, but it is unlikely that we ever will either. This allows us to start trying to use clang as a /usr/bin/cpp replacement and see what pieces of -traditional-cpp mode people actually care about. llvm-svn: 127911
This commit is contained in:
parent
1057f86d0e
commit
8c3d735118
|
@ -1773,9 +1773,14 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
}
|
||||
#endif
|
||||
|
||||
// Only allow -traditional or -traditional-cpp outside in preprocessing modes.
|
||||
if (Arg *A = Args.getLastArg(options::OPT_traditional,
|
||||
options::OPT_traditional_cpp))
|
||||
D.Diag(clang::diag::err_drv_clang_unsupported) << A->getAsString(Args);
|
||||
options::OPT_traditional_cpp)) {
|
||||
if (isa<PreprocessJobAction>(JA))
|
||||
CmdArgs.push_back("-traditional-cpp");
|
||||
else
|
||||
D.Diag(clang::diag::err_drv_clang_unsupported) << A->getAsString(Args);
|
||||
}
|
||||
|
||||
Args.AddLastArg(CmdArgs, options::OPT_dM);
|
||||
Args.AddLastArg(CmdArgs, options::OPT_dD);
|
||||
|
|
Loading…
Reference in New Issue