[llvm-exegesis] Remove unused Counter::read method (#76651)
[llvm-project.git] / clang / utils / TableGen / ClangDataCollectorsEmitter.cpp
blob45082935c1f794324bb165e24199fff73733d0d4
1 #include "TableGenBackends.h"
2 #include "llvm/TableGen/Record.h"
3 #include "llvm/TableGen/TableGenBackend.h"
5 using namespace llvm;
7 void clang::EmitClangDataCollectors(RecordKeeper &RK, raw_ostream &OS) {
8 const auto &Defs = RK.getClasses();
9 for (const auto &Entry : Defs) {
10 Record &R = *Entry.second;
11 OS << "DEF_ADD_DATA(" << R.getName() << ", {\n";
12 auto Code = R.getValue("Code")->getValue();
13 OS << Code->getAsUnquotedString() << "}\n)";
14 OS << "\n";
16 OS << "#undef DEF_ADD_DATA\n";