Guest User

Untitled

a guest
Jan 4th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. llvm::SmallVector<llvm::Loop *> workList;
  2. auto &LI = getAnalysis<llvm::LoopInfoWrapperPass>(CurFunc).getLoopInfo();
  3.  
  4. std::for_each(LI.begin(), LI.end(), [&workList](llvm::Loop *e) { workList.push_back(e); });
  5.  
  6. for(auto *e : workList) {
  7. auto line = e->getStartLoc().getLine();
  8. auto *scope = llvm::dyn_cast<llvm::DIScope>(e->getStartLoc().getScope());
  9. auto filename = scope->getFilename();
  10.  
  11. // do stuff here
  12. }
Add Comment
Please, Sign In to add comment