]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
Pull in r178240 from upstream llvm trunk:
authordim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 11 May 2013 21:23:55 +0000 (21:23 +0000)
committerdim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 11 May 2013 21:23:55 +0000 (21:23 +0000)
commitfcca29576508eb7c338a49905a43fbb70af3851e
tree4bf19f8be9aea5edf6b673ea3d8f748fc94d0346
parent5fcbad093c999ce5f7d483d408c35fc705f62f45
Pull in r178240 from upstream llvm trunk:

  Section 24.2.2 of the C++ standard, [iterator.iterators], Table 106
  requires that the return type of *r for all iterators r be reference,
  where reference is defined in [iterator.requirements.general]/p11 as
  iterator_traits<X>::reference, and X is the type of r.

  But in CFG.h, the dereference operator of PredIterator and
  SuccIterator return pointer, not reference.

  Furthermore the nested type reference is value_type&, which is not
  the type returned from operator*().

  This patch simply makes the iterator::reference type value_type*,
  which is what the operator*() returns, and then re-lables the return
  type as reference.

  From a functionality point of view, the only difference is that the
  nested reference type is now value_type* instead of value_type&.

This enables building clang 3.2 with the newer version of libc++ that
was merged in r250514 (and which has stricter iterator requirements for
the vector member templates).

This is a direct commit to stable/9, since head has a complete import of
llvm/clang trunk, and there is no single commit to merge.

git-svn-id: svn://svn.freebsd.org/base/stable/9@250529 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
contrib/llvm/include/llvm/Support/CFG.h