[ubsan] Make TypeCheckKinds const. NFC
Move it from .data to .data.rel.ro
GitOrigin-RevId: 71e8f796013cbe52658041473e3a6b233c56bce5
diff --git a/lib/ubsan/ubsan_handlers.cpp b/lib/ubsan/ubsan_handlers.cpp
index e201e6b..410292a 100644
--- a/lib/ubsan/ubsan_handlers.cpp
+++ b/lib/ubsan/ubsan_handlers.cpp
@@ -76,7 +76,7 @@
TCK_DynamicOperation
};
-const char *TypeCheckKinds[] = {
+extern const char *const TypeCheckKinds[] = {
"load of", "store to", "reference binding to", "member access within",
"member call on", "constructor call on", "downcast of", "downcast of",
"upcast of", "cast to virtual base of", "_Nonnull binding to",
diff --git a/lib/ubsan/ubsan_handlers_cxx.cpp b/lib/ubsan/ubsan_handlers_cxx.cpp
index 2a6d558..0317a3d 100644
--- a/lib/ubsan/ubsan_handlers_cxx.cpp
+++ b/lib/ubsan/ubsan_handlers_cxx.cpp
@@ -26,7 +26,7 @@
using namespace __ubsan;
namespace __ubsan {
- extern const char *TypeCheckKinds[];
+ extern const char *const TypeCheckKinds[];
}
// Returns true if UBSan has printed an error report.