[llvm] d0e3a15 - [clang][cli] NFC: Remove confusing `EmptyKPM` variable

Jan Svoboda via llvm-commits llvm-commits at lists.llvm.org
Tue May 4 05:28:02 PDT 2021


Author: Jan Svoboda
Date: 2021-05-04T14:27:57+02:00
New Revision: d0e3a15e36830d0fe6049eb0543f0af5a2e1ad12

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

LOG: [clang][cli] NFC: Remove confusing `EmptyKPM` variable

Added: 
    

Modified: 
    clang/include/clang/Driver/Options.td
    llvm/include/llvm/Option/OptParser.td

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 56e8b76def50..2825fba16ef0 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -971,9 +971,9 @@ def fgpu_inline_threshold_EQ : Joined<["-"], "fgpu-inline-threshold=">,
 def gpu_instrument_lib_EQ : Joined<["--"], "gpu-instrument-lib=">,
   HelpText<"Instrument device library for HIP, which is a LLVM bitcode containing "
   "__cyg_profile_func_enter and __cyg_profile_func_exit">;
-defm gpu_sanitize : BoolFOption<"gpu-sanitize", EmptyKPM, DefaultFalse,
-  PosFlag<SetTrue, [], "Enable sanitizer for AMDGPU target">,
-  NegFlag<SetFalse>>;
+def fgpu_sanitize : Flag<["-"], "fgpu-sanitize">, Group<f_Group>,
+  HelpText<"Enable sanitizer for AMDGPU target">;
+def fno_gpu_sanitize : Flag<["-"], "fno-gpu-sanitize">, Group<f_Group>;
 def cuid_EQ : Joined<["-"], "cuid=">, Flags<[CC1Option]>,
   HelpText<"An ID for compilation unit, which should be the same for the same "
            "compilation unit but 
diff erent for 
diff erent compilation units. "

diff  --git a/llvm/include/llvm/Option/OptParser.td b/llvm/include/llvm/Option/OptParser.td
index 45f092af7166..ad0c1eb7406a 100644
--- a/llvm/include/llvm/Option/OptParser.td
+++ b/llvm/include/llvm/Option/OptParser.td
@@ -152,8 +152,6 @@ class KeyPathAndMacro<string key_path_prefix, string key_path_base,
   code MacroPrefix = macro_prefix;
 }
 
-def EmptyKPM : KeyPathAndMacro<"", "">;
-
 class ImpliedByAnyOf<list<string> key_paths, code value = "true"> {
   code ImpliedCheck = !foldl("false", key_paths, accumulator, key_path,
                              !strconcat(accumulator, " || ", key_path));


        


More information about the llvm-commits mailing list