diff --git a/include/Support/STLExtras.h b/include/Support/STLExtras.h index 233b7438a4d..961407f5040 100644 --- a/include/Support/STLExtras.h +++ b/include/Support/STLExtras.h @@ -53,6 +53,12 @@ struct bitwise_or : public std::binary_function { } }; +template +struct less_ptr : public std::binary_function { + bool operator()(const Ty* left, const Ty* right) const { + return *left < *right; + } +}; // deleter - Very very very simple method that is used to invoke operator // delete on something. It is used like this: diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h index 233b7438a4d..961407f5040 100644 --- a/include/llvm/ADT/STLExtras.h +++ b/include/llvm/ADT/STLExtras.h @@ -53,6 +53,12 @@ struct bitwise_or : public std::binary_function { } }; +template +struct less_ptr : public std::binary_function { + bool operator()(const Ty* left, const Ty* right) const { + return *left < *right; + } +}; // deleter - Very very very simple method that is used to invoke operator // delete on something. It is used like this: