[llvm] [NFC] SimplifyCFG: Detect switch replacement earlier in `switchToLookup` (PR #155602)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 28 06:02:17 PDT 2025


================
@@ -6491,13 +6496,15 @@ class SwitchLookupTable {
   ConstantInt *LinearMultiplier = nullptr;
   bool LinearMapValWrapped = false;
 
-  // For ArrayKind, this is the array.
-  GlobalVariable *Array = nullptr;
+  // For LookupTableKind, this is the table.
+  GlobalVariable *Table = nullptr;
----------------
nikic wrote:

I'm also not sure Table needs to be stored, but maybe I missed a use.

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


More information about the llvm-commits mailing list