diff options
| author | Chris Lattner <sabre@nondot.org> | 2011-07-21 06:21:31 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2011-07-21 06:21:31 +0000 |
| commit | 5cf753c95eea1d1d92c0fa8e93e946901202d6af (patch) | |
| tree | bbe7dda995dce1094b28d769128fde0db08e37e1 /llvm/include | |
| parent | 6f228b5a5364ba1ab0432c441294ae24b7e85dd3 (diff) | |
| download | bcm5719-llvm-5cf753c95eea1d1d92c0fa8e93e946901202d6af.tar.gz bcm5719-llvm-5cf753c95eea1d1d92c0fa8e93e946901202d6af.zip | |
move tier out of an anonymous namespace, it doesn't make sense
to for it to be an an anon namespace and be in a header.
Eliminate some extraenous uses of tie.
llvm-svn: 135669
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/ADT/STLExtras.h | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h index 0b0346be2cc..5da906dc8cf 100644 --- a/llvm/include/llvm/ADT/STLExtras.h +++ b/llvm/include/llvm/ADT/STLExtras.h @@ -186,25 +186,21 @@ inline ItTy prior(ItTy it) // // do stuff // else // // do other stuff - -namespace -{ - template <typename T1, typename T2> - struct tier { - typedef T1 &first_type; - typedef T2 &second_type; - - first_type first; - second_type second; - - tier(first_type f, second_type s) : first(f), second(s) { } - tier& operator=(const std::pair<T1, T2>& p) { - first = p.first; - second = p.second; - return *this; - } - }; -} +template <typename T1, typename T2> +struct tier { + typedef T1 &first_type; + typedef T2 &second_type; + + first_type first; + second_type second; + + tier(first_type f, second_type s) : first(f), second(s) { } + tier& operator=(const std::pair<T1, T2>& p) { + first = p.first; + second = p.second; + return *this; + } +}; template <typename T1, typename T2> inline tier<T1, T2> tie(T1& f, T2& s) { |

