diff options
author | Fangrui Song <maskray@google.com> | 2020-02-01 00:16:19 -0800 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2020-02-01 00:29:29 -0800 |
commit | 1acf129bcf9a1b51e301a9fef151254ec4c7ec43 (patch) | |
tree | 19519ed9937fd79d8205afead42bd74cc621a05c /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 2637769b9f38010082276b7b839a17b102d1ac93 (diff) | |
download | llvm-1acf129bcf9a1b51e301a9fef151254ec4c7ec43.zip llvm-1acf129bcf9a1b51e301a9fef151254ec4c7ec43.tar.gz llvm-1acf129bcf9a1b51e301a9fef151254ec4c7ec43.tar.bz2 |
[Frontend] Delete a redundant check of -pg for setFramePointer()
Driver errors if -fomit-frame-pointer is used together with -pg.
useFramePointerForTargetByDefault() returns true if -pg is specified.
=>
(!OmitFP && useFramePointerForTargetByDefault(Args, Triple)) is true
=>
We cannot get FramePointerKind::None
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 335f8cd..f3015d0 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -896,11 +896,6 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Opts.setFramePointer(FP); } - // -pg may override -mframe-pointer - // TODO: This should be merged into getFramePointerKind in Clang.cpp. - if (Args.hasArg(OPT_pg)) - Opts.setFramePointer(CodeGenOptions::FramePointerKind::All); - Opts.DisableFree = Args.hasArg(OPT_disable_free); Opts.DiscardValueNames = Args.hasArg(OPT_discard_value_names); Opts.DisableTailCalls = Args.hasArg(OPT_mdisable_tail_calls); |