================
@@ -2568,20 +2568,37 @@ bool LLParser::parseAllocKind(AllocFnKind &Kind) {
return false;
}
-static std::optional<MemoryEffects::Location> keywordToLoc(lltok::Kind Tok) {
+static ArrayRef<IRMemLocation> keywordToLoc(lltok::Kind Tok) {
+ using Loc = IRMemLocation;
+
+ static constexpr auto ArgMem = Loc::ArgMem;
+ static constexpr auto InaccessibleMem = Loc::InaccessibleMem;
+ static constexpr auto ErrnoMem = Loc::ErrnoMem;
+ static constexpr auto TargetMem0 = Loc::TargetMem0;
+ static constexpr auto TargetMem1 = Loc::TargetMem1;
+ static constexpr auto TargetMem = {Loc::TargetMem0, Loc::TargetMem1};
----------------
nikic wrote:
TBH I'm not a big fan of of this "return ArrayRef to static constexpr" pattern,
and would probably just make this a SmallVector. But not going to insist.
https://github.com/llvm/llvm-project/pull/176968
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits