aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveInterval.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/LiveInterval.cpp')
-rw-r--r--lib/CodeGen/LiveInterval.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp
index 199e5000b6..fd5fe787b6 100644
--- a/lib/CodeGen/LiveInterval.cpp
+++ b/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());