From f7a8e93b76010b5715671324afb519d8418d381a Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Tue, 21 Sep 2010 18:34:17 +0000 Subject: Don't pollute the global namespace. llvm-svn: 114459 --- llvm/lib/CodeGen/LiveInterval.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/CodeGen/LiveInterval.cpp') diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp index 199e5000b60..fd5fe787b6b 100644 --- a/llvm/lib/CodeGen/LiveInterval.cpp +++ b/llvm/lib/CodeGen/LiveInterval.cpp @@ -31,6 +31,7 @@ using namespace llvm; // CompEnd - Compare LiveRange end to Pos. +namespace { struct CompEnd { bool operator()(SlotIndex Pos, const LiveRange &LR) const { return Pos < LR.end; @@ -39,6 +40,7 @@ struct CompEnd { return LR.end < Pos; } }; +} LiveInterval::iterator LiveInterval::find(SlotIndex Pos) { return std::upper_bound(begin(), end(), Pos, CompEnd()); -- cgit v1.2.3