[clang] 474d527 - [clang] Fix a misleading variable name. NFC.

Igor Kudrin via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 21 09:00:16 PDT 2020


Author: Igor Kudrin
Date: 2020-09-21T22:59:34+07:00
New Revision: 474d527c28f4e88ffda7b82e93e351aec2602380

URL: https://github.com/llvm/llvm-project/commit/474d527c28f4e88ffda7b82e93e351aec2602380
DIFF: https://github.com/llvm/llvm-project/commit/474d527c28f4e88ffda7b82e93e351aec2602380.diff

LOG: [clang] Fix a misleading variable name. NFC.

The variable is true when frame pointers should be omitted in leaf
functions, not kept.

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

Added: 
    

Modified: 
    clang/lib/Driver/ToolChains/Clang.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 0c03a90b8566..8ce59f5ba580 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -604,12 +604,12 @@ getFramePointerKind(const ArgList &Args, const llvm::Triple &Triple) {
   bool OmitFP = A && A->getOption().matches(options::OPT_fomit_frame_pointer);
   bool NoOmitFP =
       A && A->getOption().matches(options::OPT_fno_omit_frame_pointer);
-  bool KeepLeaf = Args.hasFlag(options::OPT_momit_leaf_frame_pointer,
-                               options::OPT_mno_omit_leaf_frame_pointer,
-                               Triple.isAArch64() || Triple.isPS4CPU());
+  bool OmitLeafFP = Args.hasFlag(options::OPT_momit_leaf_frame_pointer,
+                                 options::OPT_mno_omit_leaf_frame_pointer,
+                                 Triple.isAArch64() || Triple.isPS4CPU());
   if (NoOmitFP || mustUseNonLeafFramePointerForTarget(Triple) ||
       (!OmitFP && useFramePointerForTargetByDefault(Args, Triple))) {
-    if (KeepLeaf)
+    if (OmitLeafFP)
       return CodeGenOptions::FramePointerKind::NonLeaf;
     return CodeGenOptions::FramePointerKind::All;
   }


        


More information about the cfe-commits mailing list