Driver/Frontend: Add support for -mllvm, which forwards options to the LLVM option parser.
- Note that this is a behavior change, previously -mllvm at the driver level forwarded to clang -cc1. The driver does a little magic to make sure that '-mllvm -disable-llvm-optzns' works correctly, but other users will need to be updated to use -Xclang. llvm-svn: 101354
This commit is contained in:
@@ -383,6 +383,10 @@ static void FrontendOptsToArgs(const FrontendOptions &Opts,
|
||||
Res.push_back("-ast-merge");
|
||||
Res.push_back(Opts.ASTMergeFiles[i]);
|
||||
}
|
||||
for (unsigned i = 0, e = Opts.LLVMArgs.size(); i != e; ++i) {
|
||||
Res.push_back("-mllvm");
|
||||
Res.push_back(Opts.LLVMArgs[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static void HeaderSearchOptsToArgs(const HeaderSearchOptions &Opts,
|
||||
@@ -955,6 +959,7 @@ ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args, Diagnostic &Diags) {
|
||||
Opts.ShowVersion = Args.hasArg(OPT_version);
|
||||
Opts.ViewClassInheritance = getLastArgValue(Args, OPT_cxx_inheritance_view);
|
||||
Opts.ASTMergeFiles = getAllArgValues(Args, OPT_ast_merge);
|
||||
Opts.LLVMArgs = getAllArgValues(Args, OPT_mllvm);
|
||||
|
||||
FrontendOptions::InputKind DashX = FrontendOptions::IK_None;
|
||||
if (const Arg *A = Args.getLastArg(OPT_x)) {
|
||||
|
||||
Reference in New Issue
Block a user