@@ -89,13 +89,13 @@ struct CasedTypeInfo {
89
89
90
90
class ASTPropsEmitter {
91
91
raw_ostream &Out;
92
- RecordKeeper &Records;
92
+ const RecordKeeper &Records;
93
93
std::map<HasProperties, NodeInfo> NodeInfos;
94
94
std::vector<PropertyType> AllPropertyTypes;
95
95
std::map<PropertyType, CasedTypeInfo> CasedTypeInfos;
96
96
97
97
public:
98
- ASTPropsEmitter (RecordKeeper &records, raw_ostream &out)
98
+ ASTPropsEmitter (const RecordKeeper &records, raw_ostream &out)
99
99
: Out(out), Records(records) {
100
100
101
101
// Find all the properties.
@@ -587,28 +587,28 @@ void ASTPropsEmitter::emitWriteOfProperty(StringRef writerName,
587
587
// / Emit an .inc file that defines the AbstractFooReader class
588
588
// / for the given AST class hierarchy.
589
589
template <class NodeClass >
590
- static void emitASTReader (RecordKeeper &records, raw_ostream &out,
590
+ static void emitASTReader (const RecordKeeper &records, raw_ostream &out,
591
591
StringRef description) {
592
592
emitSourceFileHeader (description, out, records);
593
593
594
594
ASTPropsEmitter (records, out).emitNodeReaderClass <NodeClass>();
595
595
}
596
596
597
- void clang::EmitClangTypeReader (RecordKeeper &records, raw_ostream &out) {
597
+ void clang::EmitClangTypeReader (const RecordKeeper &records, raw_ostream &out) {
598
598
emitASTReader<TypeNode>(records, out, " A CRTP reader for Clang Type nodes" );
599
599
}
600
600
601
601
// / Emit an .inc file that defines the AbstractFooWriter class
602
602
// / for the given AST class hierarchy.
603
603
template <class NodeClass >
604
- static void emitASTWriter (RecordKeeper &records, raw_ostream &out,
604
+ static void emitASTWriter (const RecordKeeper &records, raw_ostream &out,
605
605
StringRef description) {
606
606
emitSourceFileHeader (description, out, records);
607
607
608
608
ASTPropsEmitter (records, out).emitNodeWriterClass <NodeClass>();
609
609
}
610
610
611
- void clang::EmitClangTypeWriter (RecordKeeper &records, raw_ostream &out) {
611
+ void clang::EmitClangTypeWriter (const RecordKeeper &records, raw_ostream &out) {
612
612
emitASTWriter<TypeNode>(records, out, " A CRTP writer for Clang Type nodes" );
613
613
}
614
614
@@ -847,7 +847,8 @@ void ASTPropsEmitter::emitBasicReaderWriterFile(const ReaderWriterInfo &info) {
847
847
848
848
// / Emit an .inc file that defines some helper classes for reading
849
849
// / basic values.
850
- void clang::EmitClangBasicReader (RecordKeeper &records, raw_ostream &out) {
850
+ void clang::EmitClangBasicReader (const RecordKeeper &records,
851
+ raw_ostream &out) {
851
852
emitSourceFileHeader (" Helper classes for BasicReaders" , out, records);
852
853
853
854
// Use any property, we won't be using those properties.
@@ -857,7 +858,8 @@ void clang::EmitClangBasicReader(RecordKeeper &records, raw_ostream &out) {
857
858
858
859
// / Emit an .inc file that defines some helper classes for writing
859
860
// / basic values.
860
- void clang::EmitClangBasicWriter (RecordKeeper &records, raw_ostream &out) {
861
+ void clang::EmitClangBasicWriter (const RecordKeeper &records,
862
+ raw_ostream &out) {
861
863
emitSourceFileHeader (" Helper classes for BasicWriters" , out, records);
862
864
863
865
// Use any property, we won't be using those properties.
0 commit comments