Index: lib/IR/Core.cpp =================================================================== --- lib/IR/Core.cpp +++ lib/IR/Core.cpp @@ -2632,6 +2632,8 @@ return EV->getNumIndices(); if (auto *IV = dyn_cast(I)) return IV->getNumIndices(); + if (auto *CE = dyn_cast(I)) + return CE->getIndices().size(); llvm_unreachable( "LLVMGetNumIndices applies only to extractvalue and insertvalue!"); } @@ -2642,6 +2644,8 @@ return EV->getIndices().data(); if (auto *IV = dyn_cast(I)) return IV->getIndices().data(); + if (auto *CE = dyn_cast(I)) + return CE->getIndices().data(); llvm_unreachable( "LLVMGetIndices applies only to extractvalue and insertvalue!"); }