From: Dean Michael Berris Date: Thu, 14 Jul 2016 06:37:46 +0000 (+0000) Subject: Use hasFlag instead of hasArg X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d5dff991007e9305f825cc274d768953ff13eda5;p=clang Use hasFlag instead of hasArg Summary: Fix the build to use hasFlag instead of hasArg for checking some flags. Reviewers: echristo Subscribers: mehdi_amini, cfe-commits Differential Revision: http://reviews.llvm.org/D22338 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275377 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 5437ef8f5a..f1a9f41d53 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -4609,8 +4609,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, 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)) {