Fix logic around determining use of frame pointer with -pg.
authorStephen Hines <srhines@google.com>
Tue, 18 Sep 2018 18:34:33 +0000 (18:34 +0000)
committerStephen Hines <srhines@google.com>
Tue, 18 Sep 2018 18:34:33 +0000 (18:34 +0000)
commit2c32ddf5c3f46440aa7b7ec6a9bc935bf28c772d
treefa8bf14959b80d41a6819598b3dba02c5ed8e2c6
parentab834fd89c61b392f02126dff2cfb72392d11a7b
Fix logic around determining use of frame pointer with -pg.

Summary:
As part of r342165, I rewrote the logic to check whether
-fno-omit-frame-pointer was passed after a -fomit-frame-pointer
argument. This CL switches that logic to use the consolidated
shouldUseFramePointer() function. This fixes a potential issue where -pg
gets used with -fomit-frame-pointer on a platform that must always retain
frame pointers.

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D52191

llvm-svn: 342501
clang/lib/Driver/ToolChains/Clang.cpp