[llvm] r233857 - TableGen: Generate more const goodness
Matthias Braun
matze at braunis.de
Wed Apr 1 15:09:55 PDT 2015
Author: matze
Date: Wed Apr 1 17:09:55 2015
New Revision: 233857
URL: http://llvm.org/viewvc/llvm-project?rev=233857&view=rev
Log:
TableGen: Generate more const goodness
Modified:
llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp
Modified: llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp?rev=233857&r1=233856&r2=233857&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp Wed Apr 1 17:09:55 2015
@@ -233,7 +233,7 @@ EmitRegUnitPressure(raw_ostream &OS, con
OS << "// Get the name of this register unit pressure set.\n"
<< "const char *" << ClassName << "::\n"
<< "getRegPressureSetName(unsigned Idx) const {\n"
- << " static const char *PressureNameTable[] = {\n";
+ << " static const char *const PressureNameTable[] = {\n";
unsigned MaxRegUnitWeight = 0;
for (unsigned i = 0; i < NumSets; ++i ) {
const RegUnitSet &RegUnits = RegBank.getRegSetAt(i);
@@ -752,7 +752,7 @@ RegisterInfoEmitter::emitComposeSubRegIn
Idx += Sequence.size() + 1;
}
OS << " };\n"
- " static const MaskRolOp *CompositeSequences[] = {\n";
+ " static const MaskRolOp *const CompositeSequences[] = {\n";
for (size_t i = 0, e = SubRegIndices.size(); i != e; ++i) {
OS << " ";
unsigned Idx = SubReg2SequenceIndexMap[i];
More information about the llvm-commits
mailing list