[llvm] r248473 - TableGen: Add LLVM_READONLY to generated InstrMapping functions

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 00:51:20 PDT 2015


Author: arsenm
Date: Thu Sep 24 02:51:20 2015
New Revision: 248473

URL: http://llvm.org/viewvc/llvm-project?rev=248473&view=rev
Log:
TableGen: Add LLVM_READONLY to generated InstrMapping functions

These just read from a generated table.

Modified:
    llvm/trunk/utils/TableGen/CodeGenMapTable.cpp

Modified: llvm/trunk/utils/TableGen/CodeGenMapTable.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenMapTable.cpp?rev=248473&r1=248472&r2=248473&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenMapTable.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenMapTable.cpp Thu Sep 24 02:51:20 2015
@@ -471,7 +471,7 @@ void MapTableEmitter::emitTablesWithFunc
 
   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()) {




More information about the llvm-commits mailing list