@@ -533,7 +533,7 @@ static const char *getModRefStr(ModRefInfo MR) {
533
533
llvm_unreachable (" Invalid ModRefInfo" );
534
534
}
535
535
536
- std::string Attribute::getAsString (const Triple *TT, bool InAttrGrp) const {
536
+ std::string Attribute::getAsString (bool InAttrGrp) const {
537
537
if (!pImpl) return {};
538
538
539
539
if (isEnumAttribute ())
@@ -663,12 +663,10 @@ std::string Attribute::getAsString(const Triple *TT, bool InAttrGrp) const {
663
663
default : {
664
664
InaccessibleTargetMemLocation TargetLoc =
665
665
static_cast <InaccessibleTargetMemLocation>(Loc);
666
- if (TargetLoc == InaccessibleTargetMemLocation::MEM_TARGET_0)
667
- OS << TT->getTargetMemLocName (
668
- static_cast <Triple::InaccessibleTargetMemLocation>(TargetLoc));
669
- if (TargetLoc == InaccessibleTargetMemLocation::MEM_TARGET_1)
670
- OS << TT->getTargetMemLocName (
671
- static_cast <Triple::InaccessibleTargetMemLocation>(TargetLoc));
666
+ if (TargetLoc == InaccessibleTargetMemLocation::TargetMem0)
667
+ OS << " target_mem0 " ;
668
+ if (TargetLoc == InaccessibleTargetMemLocation::TargetMem1)
669
+ OS << " target_mem1 " ;
672
670
OS << " : " ;
673
671
break ;
674
672
}
@@ -1222,8 +1220,8 @@ FPClassTest AttributeSet::getNoFPClass() const {
1222
1220
return SetNode ? SetNode->getNoFPClass () : fcNone;
1223
1221
}
1224
1222
1225
- std::string AttributeSet::getAsString (const Triple *TT, bool InAttrGrp) const {
1226
- return SetNode ? SetNode->getAsString (TT, InAttrGrp) : " " ;
1223
+ std::string AttributeSet::getAsString (bool InAttrGrp) const {
1224
+ return SetNode ? SetNode->getAsString (InAttrGrp) : " " ;
1227
1225
}
1228
1226
1229
1227
bool AttributeSet::hasParentContext (LLVMContext &C) const {
@@ -1246,7 +1244,7 @@ AttributeSet::iterator AttributeSet::end() const {
1246
1244
LLVM_DUMP_METHOD void AttributeSet::dump () const {
1247
1245
dbgs () << " AS =\n " ;
1248
1246
dbgs () << " { " ;
1249
- dbgs () << getAsString (nullptr , true ) << " }\n " ;
1247
+ dbgs () << getAsString (true ) << " }\n " ;
1250
1248
}
1251
1249
#endif
1252
1250
@@ -1418,13 +1416,12 @@ FPClassTest AttributeSetNode::getNoFPClass() const {
1418
1416
return fcNone;
1419
1417
}
1420
1418
1421
- std::string AttributeSetNode::getAsString (const Triple *TT,
1422
- bool InAttrGrp) const {
1419
+ std::string AttributeSetNode::getAsString (bool InAttrGrp) const {
1423
1420
std::string Str;
1424
1421
for (iterator I = begin (), E = end (); I != E; ++I) {
1425
1422
if (I != begin ())
1426
1423
Str += ' ' ;
1427
- Str += I->getAsString (TT, InAttrGrp);
1424
+ Str += I->getAsString (InAttrGrp);
1428
1425
}
1429
1426
return Str;
1430
1427
}
@@ -2015,7 +2012,7 @@ MemoryEffects AttributeList::getMemoryEffects() const {
2015
2012
}
2016
2013
2017
2014
std::string AttributeList::getAsString (unsigned Index, bool InAttrGrp) const {
2018
- return getAttributes (Index).getAsString (nullptr , InAttrGrp);
2015
+ return getAttributes (Index).getAsString (InAttrGrp);
2019
2016
}
2020
2017
2021
2018
AttributeSet AttributeList::getAttributes (unsigned Index) const {
0 commit comments