void IRLandingPad::push(llvm::BasicBlock* inBB) { // store infos such that matches are right to left nInfos.push(infos.size()); infos.insert(infos.end(), unpushed_infos.begin(), unpushed_infos.end()); unpushed_infos.clear(); constructLandingPad(inBB); // store as invoke target padBBs.push(inBB); }
void IRLandingPad::pop() { llvm::BasicBlock *inBB = padBBs.top(); padBBs.pop(); gIR->func()->gen->landingPad = get(); size_t n = nInfos.top(); for (int i = n, c = infos.size(); i < c; ++i) infos.at(i).toIR(); constructLandingPad(inBB); infos.resize(n); nInfos.pop(); }