diff options
author | Mehdi Amini <joker.eph@gmail.com> | 2017-05-29 05:38:20 +0000 |
---|---|---|
committer | Mehdi Amini <joker.eph@gmail.com> | 2017-05-29 05:38:20 +0000 |
commit | 6aa9e9b41a578cc086684d76e70660dfb162d421 (patch) | |
tree | 09d187acc014aebd92a2972841fb43612adbb37d /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | e161ced16aff690f990be0729019c7aa2cd55eb6 (diff) | |
download | bcm5719-llvm-6aa9e9b41a578cc086684d76e70660dfb162d421.tar.gz bcm5719-llvm-6aa9e9b41a578cc086684d76e70660dfb162d421.zip |
IRGen: Add optnone attribute on function during O0
Amongst other, this will help LTO to correctly handle/honor files
compiled with O0, helping debugging failures.
It also seems in line with how we handle other options, like how
-fnoinline adds the appropriate attribute as well.
Differential Revision: https://reviews.llvm.org/D28404
llvm-svn: 304127
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 859e8ba18bd..7d7e7d49e9f 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -534,6 +534,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Opts.DisableLLVMPasses = Args.hasArg(OPT_disable_llvm_passes); Opts.DisableLifetimeMarkers = Args.hasArg(OPT_disable_lifetimemarkers); + Opts.DisableO0ImplyOptNone = Args.hasArg(OPT_disable_O0_optnone); Opts.DisableRedZone = Args.hasArg(OPT_disable_red_zone); Opts.ForbidGuardVariables = Args.hasArg(OPT_fforbid_guard_variables); Opts.UseRegisterSizedBitfieldAccess = Args.hasArg( |