diff options
author | Dan Gohman <gohman@apple.com> | 2008-03-25 21:45:14 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-03-25 21:45:14 +0000 |
commit | 12300e1e31559e34d96e533506f74f7cb77020a2 (patch) | |
tree | 189c62a04edbe3e10e114d655bb008c898ed7e20 /lib/CodeGen | |
parent | 35a5415d68ca68cf51788b42d92be5ccd3181df3 (diff) | |
download | external_llvm-12300e1e31559e34d96e533506f74f7cb77020a2.zip external_llvm-12300e1e31559e34d96e533506f74f7cb77020a2.tar.gz external_llvm-12300e1e31559e34d96e533506f74f7cb77020a2.tar.bz2 |
A quick nm audit turned up several fixed tables and objects that were
marked read-write. Use const so that they can be allocated in a
read-only segment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48800 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/MachineModuleInfo.cpp | 6 | ||||
-rw-r--r-- | lib/CodeGen/PseudoSourceValue.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/ScheduleDAG.cpp | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp index 6d285bd..2446bff 100644 --- a/lib/CodeGen/MachineModuleInfo.cpp +++ b/lib/CodeGen/MachineModuleInfo.cpp @@ -670,7 +670,7 @@ const char *CompileUnitDesc::getTypeString() const { /// getAnchorString - Return a string used to label this descriptor's anchor. /// -const char *CompileUnitDesc::AnchorString = "llvm.dbg.compile_units"; +const char *const CompileUnitDesc::AnchorString = "llvm.dbg.compile_units"; const char *CompileUnitDesc::getAnchorString() const { return AnchorString; } @@ -1120,7 +1120,7 @@ const char *GlobalVariableDesc::getTypeString() const { /// getAnchorString - Return a string used to label this descriptor's anchor. /// -const char *GlobalVariableDesc::AnchorString = "llvm.dbg.global_variables"; +const char *const GlobalVariableDesc::AnchorString = "llvm.dbg.global_variables"; const char *GlobalVariableDesc::getAnchorString() const { return AnchorString; } @@ -1174,7 +1174,7 @@ const char *SubprogramDesc::getTypeString() const { /// getAnchorString - Return a string used to label this descriptor's anchor. /// -const char *SubprogramDesc::AnchorString = "llvm.dbg.subprograms"; +const char *const SubprogramDesc::AnchorString = "llvm.dbg.subprograms"; const char *SubprogramDesc::getAnchorString() const { return AnchorString; } diff --git a/lib/CodeGen/PseudoSourceValue.cpp b/lib/CodeGen/PseudoSourceValue.cpp index 5c5b1d6..c62e49a 100644 --- a/lib/CodeGen/PseudoSourceValue.cpp +++ b/lib/CodeGen/PseudoSourceValue.cpp @@ -29,7 +29,7 @@ namespace llvm { const PseudoSourceValue *PseudoSourceValue::getJumpTable() { return &(*PSVs)[4]; } - static const char *PSVNames[] = { + static const char *const PSVNames[] = { "FixedStack", "Stack", "GOT", diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp index 94d3a6d..048ee2c 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp @@ -221,8 +221,8 @@ void ScheduleDAG::ComputeLatency(SUnit *SU) { if (SU->Node->isTargetOpcode()) { unsigned SchedClass = TII->get(SU->Node->getTargetOpcode()).getSchedClass(); - InstrStage *S = InstrItins.begin(SchedClass); - InstrStage *E = InstrItins.end(SchedClass); + const InstrStage *S = InstrItins.begin(SchedClass); + const InstrStage *E = InstrItins.end(SchedClass); for (; S != E; ++S) SU->Latency += S->Cycles; } @@ -230,8 +230,8 @@ void ScheduleDAG::ComputeLatency(SUnit *SU) { SDNode *FNode = SU->FlaggedNodes[i]; if (FNode->isTargetOpcode()) { unsigned SchedClass =TII->get(FNode->getTargetOpcode()).getSchedClass(); - InstrStage *S = InstrItins.begin(SchedClass); - InstrStage *E = InstrItins.end(SchedClass); + const InstrStage *S = InstrItins.begin(SchedClass); + const InstrStage *E = InstrItins.end(SchedClass); for (; S != E; ++S) SU->Latency += S->Cycles; } |