X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FADT%2FPointerUnion.h;h=f27b81113ec504eb91d321f201285f0a94db3150;hb=1e2c16606dc69989c6358918d57099320d9acb51;hp=8bab186c236aad87d3a3ea9e128513ef2c547148;hpb=d898d31ebc4de1ca54013afd28d803d84dab3aa1;p=oota-llvm.git diff --git a/include/llvm/ADT/PointerUnion.h b/include/llvm/ADT/PointerUnion.h index 8bab186c236..f27b81113ec 100644 --- a/include/llvm/ADT/PointerUnion.h +++ b/include/llvm/ADT/PointerUnion.h @@ -195,6 +195,12 @@ namespace llvm { return lhs.getOpaqueValue() != rhs.getOpaqueValue(); } + template + static bool operator<(PointerUnion lhs, + PointerUnion rhs) { + return lhs.getOpaqueValue() < rhs.getOpaqueValue(); + } + // Teach SmallPtrSet that PointerUnion is "basically a pointer", that has // # low bits available = min(PT1bits,PT2bits)-1. template