From: Chandler Carruth Date: Wed, 12 Apr 2017 08:12:30 +0000 (+0000) Subject: Update Clang for an API change to LLVM's switch case iterator (it is now X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d6b8079c9e35e216a902394bb267d5df9030d266;p=clang 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 --- diff --git a/lib/CodeGen/CGCleanup.cpp b/lib/CodeGen/CGCleanup.cpp index df6741da4a..437ab7dd46 100644 --- a/lib/CodeGen/CGCleanup.cpp +++ b/lib/CodeGen/CGCleanup.cpp @@ -609,7 +609,7 @@ static void destroyOptimisticNormalEntry(CodeGenFunction &CGF, llvm::SwitchInst *si = cast(use.getUser()); if (si->getNumCases() == 1 && si->getDefaultDest() == unreachableBB) { // 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. llvm::LoadInst *condition = cast(si->getCondition());