@@ -12854,7 +12854,7 @@ struct AANoAliasAddrSpaceImpl : public AANoAliasAddrSpace {
1285412854 ChangeStatus manifest (Attributor &A) override {
1285512855 auto FlatAS = A.getInfoCache ().getFlatAddressSpace ();
1285612856 if (!FlatAS.has_value ())
12857- return ChangeStatus::UNCHANGED ;
12857+ llvm_unreachable ( " Must have flat address space! " ) ;
1285812858
1285912859 unsigned AS = getAssociatedType ()->getPointerAddressSpace ();
1286012860 if (AS != FlatAS.value ())
@@ -12863,18 +12863,18 @@ struct AANoAliasAddrSpaceImpl : public AANoAliasAddrSpace {
1286312863 LLVMContext &Ctx = getAssociatedValue ().getContext ();
1286412864 MDNode *NoAliasASNode = nullptr ;
1286512865 MDBuilder MDB (Ctx);
12866- for (auto range : ASRanges) {
12866+ for (std::pair< unsigned , unsigned > Range : ASRanges) {
1286712867 if (NoAliasASNode == nullptr ) {
1286812868 NoAliasASNode =
12869- MDB.createRange (APInt (32 , range .first ), APInt (32 , range .second ));
12869+ MDB.createRange (APInt (32 , Range .first ), APInt (32 , Range .second ));
1287012870 } else {
1287112871 MDNode *ASRange =
12872- MDB.createRange (APInt (32 , range .first ), APInt (32 , range .second ));
12872+ MDB.createRange (APInt (32 , Range .first ), APInt (32 , Range .second ));
1287312873 NoAliasASNode = MDNode::getMostGenericRange (NoAliasASNode, ASRange);
1287412874 }
1287512875 }
1287612876
12877- if (!NoAliasASNode || NoAliasASNode-> getNumOperands () == 0 )
12877+ if (!NoAliasASNode)
1287812878 return ChangeStatus::UNCHANGED;
1287912879
1288012880 Value *AssociatedValue = &getAssociatedValue ();
0 commit comments