@@ -1004,13 +1004,17 @@ static LogicalResult printOperation(CppEmitter &emitter, ClassOp classOp) {
1004
1004
os << " public:\n " ;
1005
1005
1006
1006
os.indent ();
1007
+ <<<<<<< Updated upstream
1007
1008
for (Operation &op : classOp) {
1008
1009
if (isa<FieldOp>(op)) {
1009
1010
if (failed (emitter.emitOperation (op, /* trailingSemicolon=*/ true )))
1010
1011
return failure ();
1011
1012
}
1012
1013
}
1013
1014
os << " \n const std::map<std::string, char*> _buffer_map {\n " ;
1015
+ =======
1016
+ os << " const std::map<std::string, char*> _buffer_map {\n " ;
1017
+ >>>>>>> Stashed changes
1014
1018
for (Operation &op : classOp) {
1015
1019
if (auto fieldOp = dyn_cast<FieldOp>(op)) {
1016
1020
os << " { \" " << fieldOp.getSymName () << " \" , reinterpret_cast<char*>(&"
@@ -1022,12 +1026,19 @@ static LogicalResult printOperation(CppEmitter &emitter, ClassOp classOp) {
1022
1026
os << " char* getBufferForName(const std::string& name) const {\n " ;
1023
1027
os << " auto it = _buffer_map.find(name);\n " ;
1024
1028
os << " return (it == _buffer_map.end()) ? nullptr : it->second;\n " ;
1029
+ <<<<<<< Updated upstream
1025
1030
os << " }\n\n " ;
1026
1031
for (Operation &op : classOp) {
1027
1032
if (!isa<FieldOp>(op)) {
1028
1033
if (failed (emitter.emitOperation (op, /* trailingSemicolon=*/ false )))
1029
1034
return failure ();
1030
1035
}
1036
+ =======
1037
+ os << " }\n " ;
1038
+ for (Operation &op : classOp) {
1039
+ if (failed (emitter.emitOperation (op, /* trailingSemicolon=*/ false )))
1040
+ return failure ();
1041
+ >>>>>>> Stashed changes
1031
1042
}
1032
1043
1033
1044
os.unindent ();
@@ -1037,11 +1048,17 @@ static LogicalResult printOperation(CppEmitter &emitter, ClassOp classOp) {
1037
1048
1038
1049
static LogicalResult printOperation (CppEmitter &emitter, FieldOp fieldOp) {
1039
1050
raw_ostream &os = emitter.ostream ();
1051
+ <<<<<<< Updated upstream
1040
1052
Location loc = fieldOp->getLoc ();
1041
1053
Type type = fieldOp.getType ();
1042
1054
if (failed (emitter.emitType (loc, type)))
1043
1055
return failure ();
1044
1056
os << " " << fieldOp.getSymName ();
1057
+ =======
1058
+ if (failed (emitter.emitType (fieldOp->getLoc (), fieldOp.getType ())))
1059
+ return failure ();
1060
+ os << " " << fieldOp.getSymName () << " ;" ;
1061
+ >>>>>>> Stashed changes
1045
1062
return success ();
1046
1063
}
1047
1064
0 commit comments