diff options
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r-- | lib/Transforms/Scalar/GVN.cpp | 5 | ||||
-rw-r--r-- | lib/Transforms/Scalar/GVNPRE.cpp | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index 7f809e7..c6b50a4 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -145,7 +145,7 @@ namespace { } namespace llvm { -template <> struct DenseMapKeyInfo<Expression> { +template <> struct DenseMapInfo<Expression> { static inline Expression getEmptyKey() { return Expression(Expression::EMPTY); } @@ -171,6 +171,9 @@ template <> struct DenseMapKeyInfo<Expression> { return hash; } + static bool isEqual(const Expression &LHS, const Expression &RHS) { + return LHS == RHS; + } static bool isPod() { return true; } }; } diff --git a/lib/Transforms/Scalar/GVNPRE.cpp b/lib/Transforms/Scalar/GVNPRE.cpp index d362f54..b3d2fe2 100644 --- a/lib/Transforms/Scalar/GVNPRE.cpp +++ b/lib/Transforms/Scalar/GVNPRE.cpp @@ -155,7 +155,7 @@ namespace { } namespace llvm { -template <> struct DenseMapKeyInfo<Expression> { +template <> struct DenseMapInfo<Expression> { static inline Expression getEmptyKey() { return Expression(Expression::EMPTY); } @@ -181,6 +181,9 @@ template <> struct DenseMapKeyInfo<Expression> { return hash; } + static bool isEqual(const Expression &LHS, const Expression &RHS) { + return LHS == RHS; + } static bool isPod() { return true; } }; } |