|
| 1 | +From 4476f253c57c261d0c068a8b799ffc309fe22164 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Wenwan Xing < [email protected]> |
| 3 | +Date: Wed, 16 Aug 2023 08:12:44 +0800 |
| 4 | +Subject: [PATCH] add 'Visibility' field to Option (#474) |
| 5 | + |
| 6 | +--- |
| 7 | + options.h | 4 ++-- |
| 8 | + options_compile.cpp | 12 ++++++------ |
| 9 | + 2 files changed, 8 insertions(+), 8 deletions(-) |
| 10 | + |
| 11 | +diff --git a/options.h b/options.h |
| 12 | +index 3e3ed38..5be4e1c 100644 |
| 13 | +--- a/options.h |
| 14 | ++++ b/options.h |
| 15 | +@@ -33,8 +33,8 @@ Copyright (c) Intel Corporation (2009-2017). |
| 16 | + enum COMPILE_OPT_ID { |
| 17 | + OPT_COMPILE_INVALID = 0, // This is not an option ID. |
| 18 | + #define PREFIX(NAME, VALUE) |
| 19 | +-#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \ |
| 20 | +- HELPTEXT, METAVAR, VALUES) \ |
| 21 | ++#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, \ |
| 22 | ++ VISIBILITY, PARAM, HELPTEXT, METAVAR, VALUES) \ |
| 23 | + OPT_COMPILE_##ID, |
| 24 | + #include "opencl_clang_options.inc" |
| 25 | + OPT_COMPILE_LAST_OPTION |
| 26 | +diff --git a/options_compile.cpp b/options_compile.cpp |
| 27 | +index 7b7aeb5..26693fb 100644 |
| 28 | +--- a/options_compile.cpp |
| 29 | ++++ b/options_compile.cpp |
| 30 | +@@ -35,8 +35,8 @@ Copyright (c) Intel Corporation (2009-2017). |
| 31 | + static constexpr llvm::StringLiteral NAME##_init[] = VALUE; \ |
| 32 | + static constexpr llvm::ArrayRef<llvm::StringLiteral> NAME( \ |
| 33 | + NAME##_init, std::size(NAME##_init) - 1); |
| 34 | +-#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \ |
| 35 | +- HELPTEXT, METAVAR, VALUES) |
| 36 | ++#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, VISIBILITY, \ |
| 37 | ++ PARAM, HELPTEXT, METAVAR, VALUES) |
| 38 | + #include "opencl_clang_options.inc" |
| 39 | + #undef OPTION |
| 40 | + #undef PREFIX |
| 41 | +@@ -47,12 +47,12 @@ extern llvm::ManagedStatic<llvm::sys::SmartMutex<true>> compileMutex; |
| 42 | + |
| 43 | + static constexpr OptTable::Info ClangOptionsInfoTable[] = { |
| 44 | + #define PREFIX(NAME, VALUE) |
| 45 | +-#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \ |
| 46 | +- HELPTEXT, METAVAR, VALUES) \ |
| 47 | ++#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, VISIBILITY, \ |
| 48 | ++ PARAM, HELPTEXT, METAVAR, VALUES) \ |
| 49 | + { \ |
| 50 | + PREFIX, NAME, HELPTEXT, METAVAR, OPT_COMPILE_##ID, \ |
| 51 | +- llvm::opt::Option::KIND##Class, PARAM, FLAGS, OPT_COMPILE_##GROUP, \ |
| 52 | +- OPT_COMPILE_##ALIAS, ALIASARGS, VALUES \ |
| 53 | ++ llvm::opt::Option::KIND##Class, VISIBILITY, PARAM, FLAGS, \ |
| 54 | ++ OPT_COMPILE_##GROUP, OPT_COMPILE_##ALIAS, ALIASARGS, VALUES \ |
| 55 | + } \ |
| 56 | + , |
| 57 | + #include "opencl_clang_options.inc" |
| 58 | +-- |
| 59 | +2.44.0 |
| 60 | + |
0 commit comments