From: Duncan P. N. Exon Smith Date: Fri, 9 Oct 2015 16:51:23 +0000 (+0000) Subject: Revert "Support: Partially revert r249782 to unbreak clang build" X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=42247d0394a75c1594f2da9ea622cdf15aee9ae5 Revert "Support: Partially revert r249782 to unbreak clang build" This reverts commit r249783, fully reinstating r249782. I've fixed the bug in clang: it was a non-const iterator that dereferenced to const (but had an implicit conversion to non-const). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249850 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/GenericDomTree.h b/include/llvm/Support/GenericDomTree.h index a790d754d20..8751f272cd2 100644 --- a/include/llvm/Support/GenericDomTree.h +++ b/include/llvm/Support/GenericDomTree.h @@ -734,13 +734,13 @@ public: for (typename TraitsTy::nodes_iterator I = TraitsTy::nodes_begin(&F), E = TraitsTy::nodes_end(&F); I != E; ++I) { - if (TraitsTy::child_begin(I) == TraitsTy::child_end(I)) - addRoot(I); + if (TraitsTy::child_begin(&*I) == TraitsTy::child_end(&*I)) + addRoot(&*I); // Prepopulate maps so that we don't get iterator invalidation issues // later. - this->IDoms[I] = nullptr; - this->DomTreeNodes[I] = nullptr; + this->IDoms[&*I] = nullptr; + this->DomTreeNodes[&*I] = nullptr; } Calculate>(*this, F);