From cfbb2f074da2842e42956d3b4c21e91b37f36f06 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 25 Mar 2008 21:45:14 +0000 Subject: 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 --- utils/TableGen/SubtargetEmitter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'utils/TableGen/SubtargetEmitter.cpp') diff --git a/utils/TableGen/SubtargetEmitter.cpp b/utils/TableGen/SubtargetEmitter.cpp index 5e7688a619..a0dc96787d 100644 --- a/utils/TableGen/SubtargetEmitter.cpp +++ b/utils/TableGen/SubtargetEmitter.cpp @@ -83,7 +83,7 @@ void SubtargetEmitter::FeatureKeyValues(std::ostream &OS) { // Begin feature table OS << "// Sorted (by key) array of values for CPU features.\n" - << "static llvm::SubtargetFeatureKV FeatureKV[] = {\n"; + << "static const llvm::SubtargetFeatureKV FeatureKV[] = {\n"; // For each feature for (unsigned i = 0, N = FeatureList.size(); i < N; ++i) { @@ -269,7 +269,7 @@ void SubtargetEmitter::EmitStageData(std::ostream &OS, if (ProcItinList.size() < 2) return; // Begin stages table - OS << "static llvm::InstrStage Stages[] = {\n" + OS << "static const llvm::InstrStage Stages[] = {\n" " { 0, 0 }, // No itinerary\n"; unsigned ItinEnum = 1; @@ -362,7 +362,7 @@ void SubtargetEmitter::EmitProcessorData(std::ostream &OS, // Begin processor itinerary table OS << "\n"; - OS << "static llvm::InstrItinerary " << Name << "[] = {\n"; + OS << "static const llvm::InstrItinerary " << Name << "[] = {\n"; // For each itinerary class std::vector &ItinList = *ProcListIter++; -- cgit v1.2.3-70-g09d2