1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

[Attributor][NFC] Add IntegerState raw_ostream << operator

llvm-svn: 368622
This commit is contained in:
Johannes Doerfert 2019-08-12 22:07:34 +00:00
parent 4ed70fe678
commit 20276aec2c
2 changed files with 6 additions and 0 deletions

View File

@ -871,6 +871,7 @@ raw_ostream &operator<<(raw_ostream &OS, ChangeStatus S);
raw_ostream &operator<<(raw_ostream &OS, IRPosition::Kind);
raw_ostream &operator<<(raw_ostream &OS, const IRPosition &);
raw_ostream &operator<<(raw_ostream &OS, const AbstractState &State);
raw_ostream &operator<<(raw_ostream &OS, const IntegerState &S);
///}
struct AttributorPass : public PassInfoMixin<AttributorPass> {

View File

@ -2498,6 +2498,11 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const IRPosition &Pos) {
<< Pos.getAnchorValue().getName() << "@" << Pos.getArgNo() << "]}";
}
raw_ostream &llvm::operator<<(raw_ostream &OS, const IntegerState &S) {
return OS << "(" << S.getKnown() << "-" << S.getAssumed() << ")"
<< static_cast<const AbstractState &>(S);
}
raw_ostream &llvm::operator<<(raw_ostream &OS, const AbstractState &S) {
return OS << (!S.isValidState() ? "top" : (S.isAtFixpoint() ? "fix" : ""));
}