Skip to content

Commit 414d9f2

Browse files
committed
[SYCL-PTX] Apply review comment: pedentic changes regarding auto
Signed-off-by: Victor Lomuller <[email protected]>
1 parent 695b984 commit 414d9f2

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

clang/utils/TableGen/ClangProgModelBuiltinEmitter.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ class JSONBuiltinInterfaceEmitter : public BuiltinNameEmitter {
269269
bool IsConst;
270270
// "volatile" qualifier.
271271
bool IsVolatile;
272-
std::string AddrSpace;
272+
llvm::StringRef AddrSpace;
273273
};
274274

275275
public:
@@ -935,11 +935,11 @@ JSONBuiltinInterfaceEmitter::TypeDesc::TypeDesc(const Record *T)
935935

936936
AddrSpace = StringSwitch<const char *>(T->getValueAsString("AddrSpace"))
937937
.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");
943943
}
944944

945945
std::string JSONBuiltinInterfaceEmitter::TypeDesc::GetBaseTypeAsStr() const {
@@ -1005,7 +1005,6 @@ void JSONBuiltinInterfaceEmitter::ExpandType(const Record *Ty) {
10051005
TypeStr += " const";
10061006
if (TypeDesc.IsVolatile)
10071007
TypeStr += " volatile";
1008-
TypeStr += " ";
10091008
TypeStr += TypeDesc.AddrSpace;
10101009
TypeStr += " *";
10111010
}
@@ -1057,11 +1056,13 @@ void JSONBuiltinInterfaceEmitter::EmitBuiltins() {
10571056
StringMap<SmallVector<FnDesc, 16>> NameToProtoList;
10581057

10591058
// 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) {
10621062
SmallVectorImpl<FnDesc> &PrototypeList = NameToProtoList[Name];
10631063

1064-
for (const auto &Overload : SLM.second.Signatures) {
1064+
for (const std::pair<const Record *, unsigned> &Overload :
1065+
SLM.second.Signatures) {
10651066
std::vector<Record *> Signature =
10661067
Overload.first->getValueAsListOfDefs("Signature");
10671068
auto SignatureTypesIt = llvm::map_range(

0 commit comments

Comments
 (0)