diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2017-01-18 23:55:27 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2017-01-18 23:55:27 +0000 |
commit | 1e1475ace580ef52a80b56376780259cfb4edd51 (patch) | |
tree | c268d7bd86ae1a61b543580db5465f703eabced4 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 0a2174533e1743446a59625ca318c424bfaf0bf2 (diff) | |
download | bcm5719-llvm-1e1475ace580ef52a80b56376780259cfb4edd51.tar.gz bcm5719-llvm-1e1475ace580ef52a80b56376780259cfb4edd51.zip |
Move vtable type metadata emission behind a cc1-level flag.
In ThinLTO mode, type metadata will require the module to be written as a
multi-module bitcode file, which is currently incompatible with the Darwin
linker. It is also useful to be able to enable or disable multi-module bitcode
for testing purposes. This introduces a cc1-level flag, -f{,no-}lto-unit,
which is used by the driver to enable multi-module bitcode on all but
Darwin+ThinLTO, and can also be used to enable/disable the feature manually.
Differential Revision: https://reviews.llvm.org/D28877
llvm-svn: 292448
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 2db6e0c4957..8256edd988e 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -631,6 +631,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Opts.PrepareForLTO = Args.hasArg(OPT_flto, OPT_flto_EQ); const Arg *A = Args.getLastArg(OPT_flto, OPT_flto_EQ); Opts.EmitSummaryIndex = A && A->containsValue("thin"); + Opts.LTOUnit = Args.hasFlag(OPT_flto_unit, OPT_fno_lto_unit, false); if (Arg *A = Args.getLastArg(OPT_fthinlto_index_EQ)) { if (IK != IK_LLVM_IR) Diags.Report(diag::err_drv_argument_only_allowed_with) |