[PATCH] D22338: Use hasFlag instead of hasArg

Dean Michael Berris via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 13 23:40:18 PDT 2016


dberris created this revision.
dberris added a reviewer: echristo.
dberris added a subscriber: cfe-commits.
Herald added a subscriber: mehdi_amini.

Fix the build to use hasFlag instead of hasArg for checking some flags.

http://reviews.llvm.org/D22338

Files:
  lib/Driver/Tools.cpp

Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -4609,8 +4609,8 @@
 
   Args.AddAllArgs(CmdArgs, options::OPT_finstrument_functions);
 
-  if (Args.hasArg(options::OPT_fxray_instrument,
-                  options::OPT_fnoxray_instrument, false)) {
+  if (Args.hasFlag(options::OPT_fxray_instrument,
+                   options::OPT_fnoxray_instrument, false)) {
     CmdArgs.push_back("-fxray-instrument");
     if (Arg *A = Args.getLastArg(options::OPT_fxray_instruction_threshold_,
                                  options::OPT_fxray_instruction_threshold_EQ)) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22338.63922.patch
Type: text/x-patch
Size: 667 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160714/4af5614a/attachment.bin>


More information about the cfe-commits mailing list