summaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChains/Clang.cpp
diff options
context:
space:
mode:
authorJorge Gorbe Moya <jgorbe@google.com>2019-10-14 23:25:25 +0000
committerJorge Gorbe Moya <jgorbe@google.com>2019-10-14 23:25:25 +0000
commitcadc5f347808151935a6306afe20055dee34d42e (patch)
treed9955b200a4985458d0fdaa1689a935168e2c263 /lib/Driver/ToolChains/Clang.cpp
parentb1f59aa74b4bb084f6e1a11e10ae77187cd999b0 (diff)
downloadclang-cadc5f347808151935a6306afe20055dee34d42e.tar.gz
Revert "Dead Virtual Function Elimination"
This reverts commit 9f6a873268e1ad9855873d9d8007086c0d01cf4f. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374844 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains/Clang.cpp')
-rw-r--r--lib/Driver/ToolChains/Clang.cpp27
1 files changed, 3 insertions, 24 deletions
diff --git a/lib/Driver/ToolChains/Clang.cpp b/lib/Driver/ToolChains/Clang.cpp
index dfb3f33608..1ecc4d216d 100644
--- a/lib/Driver/ToolChains/Clang.cpp
+++ b/lib/Driver/ToolChains/Clang.cpp
@@ -5366,30 +5366,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back(Args.MakeArgString(TargetInfo.str()));
}
- bool VirtualFunctionElimination =
- Args.hasFlag(options::OPT_fvirtual_function_elimination,
- options::OPT_fno_virtual_function_elimination, false);
- if (VirtualFunctionElimination) {
- // VFE requires full LTO (currently, this might be relaxed to allow ThinLTO
- // in the future).
- if (D.getLTOMode() != LTOK_Full)
- D.Diag(diag::err_drv_argument_only_allowed_with)
- << "-fvirtual-function-elimination"
- << "-flto=full";
-
- CmdArgs.push_back("-fvirtual-function-elimination");
- }
-
- // VFE requires whole-program-vtables, and enables it by default.
- bool WholeProgramVTables = Args.hasFlag(
- options::OPT_fwhole_program_vtables,
- options::OPT_fno_whole_program_vtables, VirtualFunctionElimination);
- if (VirtualFunctionElimination && !WholeProgramVTables) {
- D.Diag(diag::err_drv_argument_not_allowed_with)
- << "-fno-whole-program-vtables"
- << "-fvirtual-function-elimination";
- }
-
+ bool WholeProgramVTables =
+ Args.hasFlag(options::OPT_fwhole_program_vtables,
+ options::OPT_fno_whole_program_vtables, false);
if (WholeProgramVTables) {
if (!D.isUsingLTO())
D.Diag(diag::err_drv_argument_only_allowed_with)