]> granicus.if.org Git - clang/commit
Disable frame pointer elimination when using -pg
authorXinliang David Li <davidxl@google.com>
Mon, 23 Nov 2015 17:30:31 +0000 (17:30 +0000)
committerXinliang David Li <davidxl@google.com>
Mon, 23 Nov 2015 17:30:31 +0000 (17:30 +0000)
commit237fc11e5d48695c06c0b61d76b954eba985afbc
tree210adfca53b08a5ad24afe072cb8223f42a7e538
parentfc33c2db156f6f82dfb755974b13017eaac038cb
Disable frame pointer elimination when using -pg

(Re-apply patch after bug fixing)

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@253886 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]