clang: lib/Driver/DriverOptions.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

10#include "llvm/Option/OptTable.h"

11#include

12

16

17#define OPTTABLE_STR_TABLE_CODE

18#include "clang/Driver/Options.inc"

19#undef OPTTABLE_STR_TABLE_CODE

20

21#define OPTTABLE_VALUES_CODE

22#include "clang/Driver/Options.inc"

23#undef OPTTABLE_VALUES_CODE

24

25#define OPTTABLE_PREFIXES_TABLE_CODE

26#include "clang/Driver/Options.inc"

27#undef OPTTABLE_PREFIXES_TABLE_CODE

28

29#define OPTTABLE_PREFIXES_UNION_CODE

30#include "clang/Driver/Options.inc"

31#undef OPTTABLE_PREFIXES_UNION_CODE

32

33static constexpr OptTable::Info InfoTable[] = {

34#define OPTION(...) LLVM_CONSTRUCT_OPT_INFO(__VA_ARGS__),

35#include "clang/Driver/Options.inc"

36#undef OPTION

37};

38

39namespace {

40

41class DriverOptTable : public PrecomputedOptTable {

42public:

43 DriverOptTable()

44 : PrecomputedOptTable(OptionStrTable, OptionPrefixesTable, InfoTable,

45 OptionPrefixesUnion) {}

46};

47}

48

50 static DriverOptTable Table;

51 return Table;

52}

static constexpr OptTable::Info InfoTable[]

const llvm::opt::OptTable & getDriverOptTable()