[llvm] [DirectX][NFC] Change specification of overload types and attribute in DXIL.td (PR #81184)
David Peixotto via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 12 09:25:42 PST 2024
================
@@ -267,38 +296,51 @@ static void emitDXILIntrinsicMap(std::vector<DXILOperationDesc> &Ops,
OS << "\n";
}
-static std::string emitDXILOperationFnAttr(StringRef FnAttr) {
- return StringSwitch<std::string>(FnAttr)
- .Case("rn", "Attribute::ReadNone")
- .Case("ro", "Attribute::ReadOnly")
+// Convert operation attribute string to Attribute enum
+//
+// @param Attr string reference
+// @return std::string Attribute enum string
+static std::string emitDXILOperationAttr(StringRef Attr) {
+ return StringSwitch<std::string>(Attr)
----------------
dmpots wrote:
I see this is just following the existing code, but should we add some error handling for unexpected attributes here?
https://github.com/llvm/llvm-project/pull/81184
More information about the llvm-commits
mailing list