Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- llvm::SmallVector<llvm::Loop *> workList;
- auto &LI = getAnalysis<llvm::LoopInfoWrapperPass>(CurFunc).getLoopInfo();
- std::for_each(LI.begin(), LI.end(), [&workList](llvm::Loop *e) { workList.push_back(e); });
- for(auto *e : workList) {
- auto line = e->getStartLoc().getLine();
- auto *scope = llvm::dyn_cast<llvm::DIScope>(e->getStartLoc().getScope());
- auto filename = scope->getFilename();
- // do stuff here
- }
Add Comment
Please, Sign In to add comment