@@ -269,7 +269,7 @@ class JSONBuiltinInterfaceEmitter : public BuiltinNameEmitter {
269
269
bool IsConst;
270
270
// "volatile" qualifier.
271
271
bool IsVolatile;
272
- std::string AddrSpace;
272
+ llvm::StringRef AddrSpace;
273
273
};
274
274
275
275
public:
@@ -935,11 +935,11 @@ JSONBuiltinInterfaceEmitter::TypeDesc::TypeDesc(const Record *T)
935
935
936
936
AddrSpace = StringSwitch<const char *>(T->getValueAsString (" AddrSpace" ))
937
937
.Case (" clang::LangAS::Default" , " " )
938
- .Case (" clang::LangAS::opencl_private" , " __private" )
939
- .Case (" clang::LangAS::opencl_global" , " __global" )
940
- .Case (" clang::LangAS::opencl_constant" , " __constant" )
941
- .Case (" clang::LangAS::opencl_local" , " __local" )
942
- .Default (" __generic" );
938
+ .Case (" clang::LangAS::opencl_private" , " __private" )
939
+ .Case (" clang::LangAS::opencl_global" , " __global" )
940
+ .Case (" clang::LangAS::opencl_constant" , " __constant" )
941
+ .Case (" clang::LangAS::opencl_local" , " __local" )
942
+ .Default (" __generic" );
943
943
}
944
944
945
945
std::string JSONBuiltinInterfaceEmitter::TypeDesc::GetBaseTypeAsStr () const {
@@ -1005,7 +1005,6 @@ void JSONBuiltinInterfaceEmitter::ExpandType(const Record *Ty) {
1005
1005
TypeStr += " const" ;
1006
1006
if (TypeDesc.IsVolatile )
1007
1007
TypeStr += " volatile" ;
1008
- TypeStr += " " ;
1009
1008
TypeStr += TypeDesc.AddrSpace ;
1010
1009
TypeStr += " *" ;
1011
1010
}
@@ -1057,11 +1056,13 @@ void JSONBuiltinInterfaceEmitter::EmitBuiltins() {
1057
1056
StringMap<SmallVector<FnDesc, 16 >> NameToProtoList;
1058
1057
1059
1058
// For each function names, gather the list of overloads
1060
- for (const auto &SLM : SignatureListMap) {
1061
- for (const auto &Name : SLM.second .Names ) {
1059
+ for (const MapVector<BuiltinIndexListTy *, BuiltinTableEntries>::value_type
1060
+ &SLM : SignatureListMap) {
1061
+ for (StringRef Name : SLM.second .Names ) {
1062
1062
SmallVectorImpl<FnDesc> &PrototypeList = NameToProtoList[Name];
1063
1063
1064
- for (const auto &Overload : SLM.second .Signatures ) {
1064
+ for (const std::pair<const Record *, unsigned > &Overload :
1065
+ SLM.second .Signatures ) {
1065
1066
std::vector<Record *> Signature =
1066
1067
Overload.first ->getValueAsListOfDefs (" Signature" );
1067
1068
auto SignatureTypesIt = llvm::map_range (
0 commit comments