X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FSjLjEHPrepare.cpp;h=d14e29b6cc08f3144fa0b61efd34d83677bce96b;hb=049ffbbdf2a43d5529cb56b6bb696d20d28ff217;hp=1cfd4d255edf1b88a077b02f46f38bfd33e81bf6;hpb=a4697dad1926a8c91c12cd6663f5ddc7c4cd16c7;p=oota-llvm.git diff --git a/lib/CodeGen/SjLjEHPrepare.cpp b/lib/CodeGen/SjLjEHPrepare.cpp index 1cfd4d255ed..d14e29b6cc0 100644 --- a/lib/CodeGen/SjLjEHPrepare.cpp +++ b/lib/CodeGen/SjLjEHPrepare.cpp @@ -31,6 +31,7 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetLowering.h" +#include "llvm/Target/TargetSubtargetInfo.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Transforms/Utils/Local.h" @@ -142,8 +143,8 @@ static void MarkBlocksLiveIn(BasicBlock *BB, if (!LiveBBs.insert(BB)) return; // already been here. - for (BasicBlock *Pred : predecessors(BB)) - MarkBlocksLiveIn(Pred, LiveBBs); + for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) + MarkBlocksLiveIn(*PI, LiveBBs); } /// substituteLPadValues - Substitute the values returned by the landingpad @@ -190,7 +191,7 @@ Value *SjLjEHPrepare::setupFunctionContext(Function &F, // Create an alloca for the incoming jump buffer ptr and the new jump buffer // that needs to be restored on all exits from the function. This is an alloca // because the value needs to be added to the global context list. - const TargetLowering *TLI = TM->getTargetLowering(); + const TargetLowering *TLI = TM->getSubtargetImpl()->getTargetLowering(); unsigned Align = TLI->getDataLayout()->getPrefTypeAlignment(FunctionContextTy); FuncCtx = new AllocaInst(FunctionContextTy, nullptr, Align, "fn_context",