The generated index array should be const.
authorChris Lattner <sabre@nondot.org>
Fri, 14 Jul 2006 23:14:02 +0000 (23:14 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 14 Jul 2006 23:14:02 +0000 (23:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29155 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/AsmWriterEmitter.cpp

index 2cd17d95fd70db32383a0434731b003b199f9bed..c168a914ec72e1b57af42cb8266990d615b6878e 100644 (file)
@@ -362,7 +362,7 @@ void AsmWriterEmitter::run(std::ostream &O) {
   std::string AggregateString;
   AggregateString += '\0';
   
-  O << "  static unsigned short OpStrIdxs[] = {\n";
+  O << "  static const unsigned short OpStrIdxs[] = {\n";
   for (unsigned i = 0, e = NumberedInstructions.size(); i != e; ++i) {
     AsmWriterInst *AWI = CGIAWIMap[NumberedInstructions[i]];
     unsigned Idx;