TableGen: Add LLVM_READONLY to generated InstrMapping functions
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 24 Sep 2015 07:51:20 +0000 (07:51 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 24 Sep 2015 07:51:20 +0000 (07:51 +0000)
These just read from a generated table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248473 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/CodeGenMapTable.cpp

index 48df4391fe1648363b5d3c5683ea82dd9af7a86b..f66dd082709ba821190bc593e2e754c4e0437375 100644 (file)
@@ -471,7 +471,7 @@ void MapTableEmitter::emitTablesWithFunc(raw_ostream &OS) {
 
   ListInit *ColFields = InstrMapDesc.getColFields();
   const std::vector<ListInit*> &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()) {