diff options
author | Johannes Doerfert <johannes@jdoerfert.de> | 2023-06-14 21:44:24 -0700 |
---|---|---|
committer | Johannes Doerfert <johannes@jdoerfert.de> | 2023-07-03 10:07:03 -0700 |
commit | a90ac20c528f65ea50d14bc261bb65f7446b2231 (patch) | |
tree | cb462c852fb913f811c0882572b2e1aac261f799 /llvm/lib/IR/Attributes.cpp | |
parent | 1b102886c0c33bb01ff8f2360b57c7b8d039abcc (diff) | |
download | llvm-a90ac20c528f65ea50d14bc261bb65f7446b2231.zip llvm-a90ac20c528f65ea50d14bc261bb65f7446b2231.tar.gz llvm-a90ac20c528f65ea50d14bc261bb65f7446b2231.tar.bz2 |
[MemoryEffects][NFCI] Make the MemoryEffects class reusable
In a follow up we will reuse the logic in MemoryEffectsBase to merge
AAMemoryLocation and AAMemoryBehavior without duplicating all the bit
fiddling code already available in MemoryEffectsBase.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D153305
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r-- | llvm/lib/IR/Attributes.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp index 710e29e..3d89d18 100644 --- a/llvm/lib/IR/Attributes.cpp +++ b/llvm/lib/IR/Attributes.cpp @@ -523,7 +523,7 @@ std::string Attribute::getAsString(bool InAttrGrp) const { // Print access kind for "other" as the default access kind. This way it // will apply to any new location kinds that get split out of "other". - ModRefInfo OtherMR = ME.getModRef(MemoryEffects::Other); + ModRefInfo OtherMR = ME.getModRef(IRMemLocation::Other); if (OtherMR != ModRefInfo::NoModRef || ME.getModRef() == OtherMR) { First = false; OS << getModRefStr(OtherMR); @@ -539,13 +539,13 @@ std::string Attribute::getAsString(bool InAttrGrp) const { First = false; switch (Loc) { - case MemoryEffects::ArgMem: + case IRMemLocation::ArgMem: OS << "argmem: "; break; - case MemoryEffects::InaccessibleMem: + case IRMemLocation::InaccessibleMem: OS << "inaccessiblemem: "; break; - case MemoryEffects::Other: + case IRMemLocation::Other: llvm_unreachable("This is represented as the default access kind"); } OS << getModRefStr(MR); |