Skip to content
Snippets Groups Projects
Commit d6b8079c authored by Chandler Carruth's avatar Chandler Carruth
Browse files

Update Clang for an API change to LLVM's switch case iterator (it is now

an actual iterator and so we need to look through it to the case
handle).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300035 91177308-0d34-0410-b5e6-96231b3b80d8
parent 7c10f25f
No related branches found
No related tags found
No related merge requests found
...@@ -609,7 +609,7 @@ static void destroyOptimisticNormalEntry(CodeGenFunction &CGF, ...@@ -609,7 +609,7 @@ static void destroyOptimisticNormalEntry(CodeGenFunction &CGF,
llvm::SwitchInst *si = cast<llvm::SwitchInst>(use.getUser()); llvm::SwitchInst *si = cast<llvm::SwitchInst>(use.getUser());
if (si->getNumCases() == 1 && si->getDefaultDest() == unreachableBB) { if (si->getNumCases() == 1 && si->getDefaultDest() == unreachableBB) {
// Replace the switch with a branch. // Replace the switch with a branch.
llvm::BranchInst::Create(si->case_begin().getCaseSuccessor(), si); llvm::BranchInst::Create(si->case_begin()->getCaseSuccessor(), si);
// The switch operand is a load from the cleanup-dest alloca. // The switch operand is a load from the cleanup-dest alloca.
llvm::LoadInst *condition = cast<llvm::LoadInst>(si->getCondition()); llvm::LoadInst *condition = cast<llvm::LoadInst>(si->getCondition());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment