aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2013-07-15 08:02:13 +0000
committerCraig Topper <craig.topper@gmail.com>2013-07-15 08:02:13 +0000
commit3c70fcf02b367f517e93c1bd4ce237966383ebf8 (patch)
tree94a5588281384bcbca86d03c38a4ffc5efee4667
parentf67c7d7e8c5949037e85dd233876989c1fea7099 (diff)
downloadexternal_llvm-3c70fcf02b367f517e93c1bd4ce237966383ebf8.tar.gz
external_llvm-3c70fcf02b367f517e93c1bd4ce237966383ebf8.tar.bz2
external_llvm-3c70fcf02b367f517e93c1bd4ce237966383ebf8.zip
Add 'const' qualifier to some arrays.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186312 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp3
-rw-r--r--lib/Transforms/Utils/MetaRenamer.cpp2
-rw-r--r--utils/TableGen/CodeGenTarget.cpp2
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
index 900f140152..f5fe168547 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
@@ -2401,7 +2401,8 @@ static bool BURRSort(SUnit *left, SUnit *right, RegReductionPQBase *SPQ) {
bool RHasPhysReg = right->hasPhysRegDefs;
if (LHasPhysReg != RHasPhysReg) {
#ifndef NDEBUG
- const char *const PhysRegMsg[] = {" has no physreg"," defines a physreg"};
+ static const char *const PhysRegMsg[] = { " has no physreg",
+ " defines a physreg" };
#endif
DEBUG(dbgs() << " SU (" << left->NodeNum << ") "
<< PhysRegMsg[LHasPhysReg] << " SU(" << right->NodeNum << ") "
diff --git a/lib/Transforms/Utils/MetaRenamer.cpp b/lib/Transforms/Utils/MetaRenamer.cpp
index 3716f586ff..c370453122 100644
--- a/lib/Transforms/Utils/MetaRenamer.cpp
+++ b/lib/Transforms/Utils/MetaRenamer.cpp
@@ -53,7 +53,7 @@ namespace {
}
bool runOnModule(Module &M) {
- static const char *metaNames[] = {
+ static const char *const metaNames[] = {
// See http://en.wikipedia.org/wiki/Metasyntactic_variable
"foo", "bar", "baz", "quux", "barney", "snork", "zot", "blam", "hoge",
"wibble", "wobble", "widget", "wombat", "ham", "eggs", "pluto", "spam"
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp
index a85ad0978c..b2c883da0e 100644
--- a/utils/TableGen/CodeGenTarget.cpp
+++ b/utils/TableGen/CodeGenTarget.cpp
@@ -298,7 +298,7 @@ struct SortInstByName {
/// target, ordered by their enum value.
void CodeGenTarget::ComputeInstrsByEnum() const {
// The ordering here must match the ordering in TargetOpcodes.h.
- const char *const FixedInstrs[] = {
+ static const char *const FixedInstrs[] = {
"PHI",
"INLINEASM",
"PROLOG_LABEL",