]> granicus.if.org Git - clang/commit
Disable frame pointer elimination when using -pg
authorXinliang David Li <davidxl@google.com>
Mon, 23 Nov 2015 05:09:10 +0000 (05:09 +0000)
committerXinliang David Li <davidxl@google.com>
Mon, 23 Nov 2015 05:09:10 +0000 (05:09 +0000)
commit957c5b5a740c66687c9ea2b13f0c66b43e4c7499
tree5fc7cb2c57bba25e175455c34ed22aad33633bc6
parent24174192e46b3b2ac2117efe1029379f873d080a
Disable frame pointer elimination when using -pg

This diff makes sure that the driver does not pass
-fomit-frame-pointer or -momit-leaf-frame-pointer to
the frontend when -pg is used. Currently, clang gives
an error if -fomit-frame-pointer is used in combination
with -pg, but -momit-leaf-frame-pointer was forgotten.
Also, disable frame pointer elimination in the frontend
when -pg is set.

Patch by Stefan Kempf.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253846 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/Tools.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/x86_64-profiling-keep-fp.c [new file with mode: 0644]