diff options
author | Gabor Greif <ggreif@gmail.com> | 2009-02-27 08:41:37 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2009-02-27 08:41:37 +0000 |
commit | 0a0e68a7eac0513505aff3079e2d5d6864e51895 (patch) | |
tree | c54400d09f9606629635d0a926cb5999440ca74c /include/llvm/ADT/ilist_node.h | |
parent | 8b3894cdfd9784725ec33755eb270f12b0e74f0f (diff) | |
download | external_llvm-0a0e68a7eac0513505aff3079e2d5d6864e51895.zip external_llvm-0a0e68a7eac0513505aff3079e2d5d6864e51895.tar.gz external_llvm-0a0e68a7eac0513505aff3079e2d5d6864e51895.tar.bz2 |
Introduce a new technique for merging BasicBlock with Instruction sentinel by superposition.
This looks dangerous, but isn't because the sentinel is accessed in special way only,
namely the Next and Prev fields of it, and these are guaranteed to exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65626 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/ilist_node.h')
-rw-r--r-- | include/llvm/ADT/ilist_node.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/ADT/ilist_node.h b/include/llvm/ADT/ilist_node.h index d68f3f2..86d5a50 100644 --- a/include/llvm/ADT/ilist_node.h +++ b/include/llvm/ADT/ilist_node.h @@ -20,6 +20,9 @@ namespace llvm { template<typename NodeTy> struct ilist_nextprev_traits; +template<typename NodeTy> +struct ilist_traits; + /// ilist_node - Base class that provides next/prev services for nodes /// that use ilist_nextprev_traits or ilist_default_traits. /// @@ -36,6 +39,7 @@ private: void setNext(NodeTy *N) { Next = N; } protected: ilist_node() : Prev(0), Next(0) {} + friend struct ilist_traits<NodeTy>; }; } // End llvm namespace |