[llvm-commits] [llvm] r41830 - /llvm/trunk/include/llvm/ADT/SparseBitVector.h
Chris Lattner
clattner at apple.com
Mon Sep 10 19:57:57 PDT 2007
On Sep 10, 2007, at 6:38 PM, Daniel Berlin wrote:
> +// Convenience functions to allow Or and And without dereferencing
> in the user
> +// code.
It is generally bad form to overload operators like this. Usually
having the extra dereference is a good thing from the consistency and
"magic reduction" standpoint. Do you really need these?
-Chris
> +template <unsigned ElementSize>
> +inline void operator |=(SparseBitVector<ElementSize> *LHS,
> + const SparseBitVector<ElementSize> &RHS) {
> + LHS->operator|=(RHS);
> +}
> +
> +template <unsigned ElementSize>
> +inline void operator |=(SparseBitVector<ElementSize> *LHS,
> + const SparseBitVector<ElementSize> *RHS) {
> + LHS->operator|=(RHS);
> +}
> +
> +template <unsigned ElementSize>
> +inline void operator &=(SparseBitVector<ElementSize> *LHS,
> + const SparseBitVector<ElementSize> &RHS) {
> + LHS->operator&=(RHS);
> +}
> +
> +template <unsigned ElementSize>
> +inline void operator &=(SparseBitVector<ElementSize> *LHS,
> + const SparseBitVector<ElementSize> *RHS) {
More information about the llvm-commits
mailing list