@@ -89,13 +89,13 @@ struct CasedTypeInfo {
8989
9090class ASTPropsEmitter {
9191 raw_ostream &Out;
92- RecordKeeper &Records;
92+ const RecordKeeper &Records;
9393 std::map<HasProperties, NodeInfo> NodeInfos;
9494 std::vector<PropertyType> AllPropertyTypes;
9595 std::map<PropertyType, CasedTypeInfo> CasedTypeInfos;
9696
9797public:
98- ASTPropsEmitter (RecordKeeper &records, raw_ostream &out)
98+ ASTPropsEmitter (const RecordKeeper &records, raw_ostream &out)
9999 : Out(out), Records(records) {
100100
101101 // Find all the properties.
@@ -587,28 +587,28 @@ void ASTPropsEmitter::emitWriteOfProperty(StringRef writerName,
587587// / Emit an .inc file that defines the AbstractFooReader class
588588// / for the given AST class hierarchy.
589589template <class NodeClass >
590- static void emitASTReader (RecordKeeper &records, raw_ostream &out,
590+ static void emitASTReader (const RecordKeeper &records, raw_ostream &out,
591591 StringRef description) {
592592 emitSourceFileHeader (description, out, records);
593593
594594 ASTPropsEmitter (records, out).emitNodeReaderClass <NodeClass>();
595595}
596596
597- void clang::EmitClangTypeReader (RecordKeeper &records, raw_ostream &out) {
597+ void clang::EmitClangTypeReader (const RecordKeeper &records, raw_ostream &out) {
598598 emitASTReader<TypeNode>(records, out, " A CRTP reader for Clang Type nodes" );
599599}
600600
601601// / Emit an .inc file that defines the AbstractFooWriter class
602602// / for the given AST class hierarchy.
603603template <class NodeClass >
604- static void emitASTWriter (RecordKeeper &records, raw_ostream &out,
604+ static void emitASTWriter (const RecordKeeper &records, raw_ostream &out,
605605 StringRef description) {
606606 emitSourceFileHeader (description, out, records);
607607
608608 ASTPropsEmitter (records, out).emitNodeWriterClass <NodeClass>();
609609}
610610
611- void clang::EmitClangTypeWriter (RecordKeeper &records, raw_ostream &out) {
611+ void clang::EmitClangTypeWriter (const RecordKeeper &records, raw_ostream &out) {
612612 emitASTWriter<TypeNode>(records, out, " A CRTP writer for Clang Type nodes" );
613613}
614614
@@ -847,7 +847,8 @@ void ASTPropsEmitter::emitBasicReaderWriterFile(const ReaderWriterInfo &info) {
847847
848848// / Emit an .inc file that defines some helper classes for reading
849849// / basic values.
850- void clang::EmitClangBasicReader (RecordKeeper &records, raw_ostream &out) {
850+ void clang::EmitClangBasicReader (const RecordKeeper &records,
851+ raw_ostream &out) {
851852 emitSourceFileHeader (" Helper classes for BasicReaders" , out, records);
852853
853854 // Use any property, we won't be using those properties.
@@ -857,7 +858,8 @@ void clang::EmitClangBasicReader(RecordKeeper &records, raw_ostream &out) {
857858
858859// / Emit an .inc file that defines some helper classes for writing
859860// / basic values.
860- void clang::EmitClangBasicWriter (RecordKeeper &records, raw_ostream &out) {
861+ void clang::EmitClangBasicWriter (const RecordKeeper &records,
862+ raw_ostream &out) {
861863 emitSourceFileHeader (" Helper classes for BasicWriters" , out, records);
862864
863865 // Use any property, we won't be using those properties.
0 commit comments