[llvm] [TableGen] Use StringMap in getValueType instead of StringSwitch (PR #213229)

Manasij Mukherjee via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 10:07:07 PDT 2026


================
@@ -43,12 +43,13 @@ static cl::opt<unsigned>
 /// Returns the MVT that the specified TableGen
 /// record corresponds to.
 MVT llvm::getValueType(const Record *Rec) {
-  return StringSwitch<MVT>(Rec->getValueAsString("LLVMName"))
+  static const StringMap<MVT> ValueTypes = {
----------------
manasij7479 wrote:

Okay, changed to DenseMap.

https://github.com/llvm/llvm-project/pull/213229


More information about the llvm-commits mailing list