Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions llvm/test/TableGen/dynamic-tables.td
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
include "llvm/TableGen/DynamicTable.td"

// CHECK-LABEL: GET_ATable_IMPL
// CHECK: std::map<std::string, AEntry> ATable = {
// CHECK: inline std::map<std::string, AEntry> ATable = {
// CHECK: { "bar", {0x5, 0x3 }}, // 0
// CHECK: { "baz", {0x2, 0x6 }}, // 1
// CHECK: { "foo", {0x4, 0x4 }}, // 2
Expand All @@ -30,7 +30,7 @@ def ATable : DynamicTable {


// CHECK-LABEL: GET_BTable_IMPL
// CHECK: std::map<std::string, BTypeName> BTable = {
// CHECK: inline std::map<std::string, BTypeName> BTable = {
// CHECK: { "BAlice", {0xAC, false, }}, // 0
// CHECK: { "BBob", {0x14, false, Bob == 13 }}, // 1
// CHECK: { "BCharlie", {0x80, true, Charlie == 42 }}, // 2
Expand All @@ -57,7 +57,7 @@ def BTable : DynamicTable {
}

// CHECK-LABEL: GET_CTable_IMPL
// CHECK: std::map<std::string, CEntry> CTable = {
// CHECK: inline std::map<std::string, CEntry> CTable = {
// CHECK: { "alice", {0xA }}, // 0
// CHECK: { "alice", {0xD }}, // 1
// CHECK: { "bob", {0xF }}, // 2
Expand All @@ -78,7 +78,7 @@ def CTable : DynamicTable {
}

// CHECK-LABEL: GET_DTable_IMPL
// CHECK: std::map<std::string, DEntry> DTable = {
// CHECK: inline std::map<std::string, DEntry> DTable = {
// CHECK: };

class DEntry<string name> {
Expand Down
4 changes: 2 additions & 2 deletions llvm/utils/TableGen/DynamicTableEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ void DynamicTableEmitter::emitDynamicTable(const DynamicTable &Table,
emitIfdef((Twine("GET_") + Table.PreprocessorGuard + "_IMPL"), OS);

// The primary data table contains all the fields defined for this map.
OS << "std::map<std::string, " << Table.CppTypeName << "> " << Table.Name
<< " = {\n";
OS << "inline std::map<std::string, " << Table.CppTypeName << "> "
<< Table.Name << " = {\n";
// Iterate over the key-value pairs the dynamic table will contain.
for (unsigned I = 0; I < Table.Entries.size(); ++I) {
const Record *Entry = Table.Entries[I];
Expand Down
Loading