File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -11874,14 +11874,24 @@ struct AAUnderlyingObjectsImpl
11874
11874
11875
11875
// / See AbstractAttribute::getAsStr().
11876
11876
const std::string getAsStr (Attributor *A) const override {
11877
- return std::string (" UnderlyingObjects " ) +
11878
- (isValidState ()
11879
- ? (std::string (" inter #" ) +
11880
- std::to_string (InterAssumedUnderlyingObjects.size ()) +
11881
- " objs" + std::string (" , intra #" ) +
11882
- std::to_string (IntraAssumedUnderlyingObjects.size ()) +
11883
- " objs" )
11884
- : " <invalid>" );
11877
+ if (!isValidState ())
11878
+ return " <invalid>" ;
11879
+ std::string Str;
11880
+ llvm::raw_string_ostream OS (Str);
11881
+ OS << " underlying objects: inter " << InterAssumedUnderlyingObjects.size ()
11882
+ << " objects, intra " << IntraAssumedUnderlyingObjects.size ()
11883
+ << " objects.\n " ;
11884
+ if (!InterAssumedUnderlyingObjects.empty ()) {
11885
+ OS << " inter objects:\n " ;
11886
+ for (auto *Obj : InterAssumedUnderlyingObjects)
11887
+ OS << *Obj << ' \n ' ;
11888
+ }
11889
+ if (!IntraAssumedUnderlyingObjects.empty ()) {
11890
+ OS << " intra objects:\n " ;
11891
+ for (auto *Obj : IntraAssumedUnderlyingObjects)
11892
+ OS << *Obj << ' \n ' ;
11893
+ }
11894
+ return Str;
11885
11895
}
11886
11896
11887
11897
// / See AbstractAttribute::trackStatistics()
You can’t perform that action at this time.
0 commit comments