From b12c0d9e3874506272b20b7504f7fd831754e7f7 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Thu, 24 Sep 2015 07:51:20 +0000 Subject: [PATCH] TableGen: Add LLVM_READONLY to generated InstrMapping functions These just read from a generated table. llvm-svn: 248473 --- llvm/utils/TableGen/CodeGenMapTable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/utils/TableGen/CodeGenMapTable.cpp b/llvm/utils/TableGen/CodeGenMapTable.cpp index 48df4391fe16..f66dd082709b 100644 --- a/llvm/utils/TableGen/CodeGenMapTable.cpp +++ b/llvm/utils/TableGen/CodeGenMapTable.cpp @@ -471,7 +471,7 @@ void MapTableEmitter::emitTablesWithFunc(raw_ostream &OS) { ListInit *ColFields = InstrMapDesc.getColFields(); const std::vector &ValueCols = InstrMapDesc.getValueCols(); - OS << "// "<< InstrMapDesc.getName() << "\n"; + OS << "// "<< InstrMapDesc.getName() << "\nLLVM_READONLY\n"; OS << "int "<< InstrMapDesc.getName() << "(uint16_t Opcode"; if (ValueCols.size() > 1) { for (Init *CF : ColFields->getValues()) {