Skip to content

Commit e58a3ba

Browse files
sys-igcigcbot
authored andcommitted
[Autobackout][FunctionalRegression]Revert of change: 56fd8f1: [LLVM16] Adjusting InternalOptions/ApiOptions to newer LLVM
Porting IGC code to LLVM16 * Adjusting InternalOptions/ApiOptions to newer LLVM
1 parent bd1090e commit e58a3ba

File tree

2 files changed

+7
-23
lines changed

2 files changed

+7
-23
lines changed

IGC/Options/src/Options.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ SPDX-License-Identifier: MIT
77
============================= end_copyright_notice ===========================*/
88

99
#include "igc/Options/Options.h"
10+
1011
#include <llvm/Option/Option.h>
11-
#include <llvmWrapper/Option/OptTable.h>
1212

1313
using namespace IGC::options;
1414
using namespace llvm::opt;
1515
using llvm::raw_ostream;
1616

17-
#define PREFIX(NAME, VALUE) static IGCLLVM::OptPrefixUnionTy API_##NAME = VALUE;
17+
#define PREFIX(NAME, VALUE) static const char *const API_##NAME[] = VALUE;
1818
#include "igc/Options/ApiOptions.inc"
1919
#undef PREFIX
2020

21-
#define PREFIX(NAME, VALUE) static IGCLLVM::OptPrefixUnionTy INTERNAL_##NAME = VALUE;
21+
#define PREFIX(NAME, VALUE) static const char *const INTERNAL_##NAME[] = VALUE;
2222
#include "igc/Options/InternalOptions.inc"
2323
#undef PREFIX
2424

@@ -52,9 +52,9 @@ static const OptTable::Info InternalInfoTable[] = {
5252
};
5353

5454
namespace {
55-
class IGCApiOptTable : public IGCLLVM::GenericOptTable {
55+
class IGCApiOptTable : public OptTable {
5656
public:
57-
IGCApiOptTable() : IGCLLVM::GenericOptTable(ApiInfoTable) {
57+
IGCApiOptTable() : OptTable(ApiInfoTable) {
5858
OptTable &Opt = *this;
5959
(void)Opt;
6060
#define OPTTABLE_ARG_INIT
@@ -63,9 +63,9 @@ class IGCApiOptTable : public IGCLLVM::GenericOptTable {
6363
}
6464
};
6565

66-
class IGCInternalOptTable : public IGCLLVM::GenericOptTable {
66+
class IGCInternalOptTable : public OptTable {
6767
public:
68-
IGCInternalOptTable() : IGCLLVM::GenericOptTable(InternalInfoTable) {
68+
IGCInternalOptTable() : OptTable(InternalInfoTable) {
6969
OptTable &Opt = *this;
7070
(void)Opt;
7171
#define OPTTABLE_ARG_INIT

IGC/WrapperLLVM/include/llvmWrapper/Option/OptTable.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,8 @@ SPDX-License-Identifier: MIT
1212
#include "llvm/Config/llvm-config.h"
1313
#include "llvm/Option/OptTable.h"
1414
#include "llvm/Support/raw_ostream.h"
15-
#include <llvm/ADT/ArrayRef.h>
1615

1716
namespace IGCLLVM {
18-
19-
using GenericOptTable =
20-
#if LLVM_VERSION_MAJOR >= 16
21-
llvm::opt::GenericOptTable;
22-
#else // LLVM_VERSION_MAJOR
23-
llvm::opt::OptTable;
24-
#endif // LLVM_VERSION_MAJOR
25-
26-
using OptPrefixUnionTy =
27-
#if LLVM_VERSION_MAJOR >= 16
28-
llvm::ArrayRef<llvm::StringLiteral>;
29-
#else // LLVM_VERSION_MAJOR
30-
const char* const [];
31-
#endif // LLVM_VERSION_MAJOR
32-
3317
inline void printHelp(const llvm::opt::OptTable &Options, llvm::raw_ostream &OS,
3418
const char *Usage, const char *Title,
3519
unsigned FlagsToInclude, unsigned FlagsToExclude,

0 commit comments

Comments
 (0)