diff options
Diffstat (limited to 'clang/lib/Driver')
-rw-r--r-- | clang/lib/Driver/DriverOptions.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Driver/Types.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Driver/DriverOptions.cpp b/clang/lib/Driver/DriverOptions.cpp index d1af95cd450..72aaf56ad3e 100644 --- a/clang/lib/Driver/DriverOptions.cpp +++ b/clang/lib/Driver/DriverOptions.cpp @@ -14,7 +14,7 @@ using namespace clang::driver; using namespace clang::driver::options; -static OptTable::Info InfoTable[] = { +static const OptTable::Info InfoTable[] = { #define OPTION(NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \ HELPTEXT, METAVAR) \ { NAME, HELPTEXT, METAVAR, Option::KIND##Class, FLAGS, PARAM, \ diff --git a/clang/lib/Driver/Types.cpp b/clang/lib/Driver/Types.cpp index 33976772271..433af03237c 100644 --- a/clang/lib/Driver/Types.cpp +++ b/clang/lib/Driver/Types.cpp @@ -23,7 +23,7 @@ struct TypeInfo { ID PreprocessedType; }; -static TypeInfo TypeInfos[] = { +static const TypeInfo TypeInfos[] = { #define TYPE(NAME, ID, PP_TYPE, TEMP_SUFFIX, FLAGS) \ { NAME, FLAGS, TEMP_SUFFIX, TY_##PP_TYPE, }, #include "clang/Driver/Types.def" @@ -31,7 +31,7 @@ static TypeInfo TypeInfos[] = { }; static const unsigned numTypes = sizeof(TypeInfos) / sizeof(TypeInfos[0]); -static TypeInfo &getInfo(unsigned id) { +static const TypeInfo &getInfo(unsigned id) { assert(id > 0 && id - 1 < numTypes && "Invalid Type ID."); return TypeInfos[id - 1]; } |