[PATCH] D52191: Fix logic around determining use of frame pointer with -pg.
Stephen Hines via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 17 13:58:43 PDT 2018
srhines created this revision.
srhines added a reviewer: dblaikie.
Herald added a subscriber: cfe-commits.
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.
Repository:
rC Clang
https://reviews.llvm.org/D52191
Files:
lib/Driver/ToolChains/Clang.cpp
Index: lib/Driver/ToolChains/Clang.cpp
===================================================================
--- lib/Driver/ToolChains/Clang.cpp
+++ lib/Driver/ToolChains/Clang.cpp
@@ -4956,8 +4956,7 @@
}
if (Arg *A = Args.getLastArg(options::OPT_pg))
- if (Args.hasFlag(options::OPT_fomit_frame_pointer,
- options::OPT_fno_omit_frame_pointer, /*default=*/false))
+ if (shouldUseFramePointer(Args, Triple))
D.Diag(diag::err_drv_argument_not_allowed_with) << "-fomit-frame-pointer"
<< A->getAsString(Args);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52191.165826.patch
Type: text/x-patch
Size: 602 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180917/1bd3baec/attachment.bin>
More information about the cfe-commits
mailing list