[PATCH] Use value semantics for list of ScopStmt(s) instead of std::owningptr

Johannes Doerfert doerfert at cs.uni-saarland.de
Tue May 26 16:14:36 PDT 2015


I think this is much more intuitive than the smart pointer version.

If you do only worry about the order but you would like to use a list, define the begin()/end() function of a Scop as rbegin()/rend() of the underlying list of scopstmts, that should give us the same order but avoid the deque (which isn't that bad I guess).


================
Comment at: lib/Analysis/ScopInfo.cpp:2024
@@ -2030,3 +2023,3 @@
 ScopStmt *Scop::getStmtForBasicBlock(BasicBlock *BB) const {
-  const auto &StmtMapIt = StmtMap.find(BB);
+  auto StmtMapIt = StmtMap.find(BB);
   if (StmtMapIt == StmtMap.end())
----------------
Why no const &?

http://reviews.llvm.org/D10041

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list