mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-04 08:37:45 +00:00
[unittest/ReverseIteration] Unbreak when compiling with GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312579 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d92ccb5856
commit
74bef679f3
@ -11,8 +11,9 @@
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/Support/ReverseIteration.h"
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/ADT/DenseMapInfo.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
using namespace llvm;
|
||||
@ -57,6 +58,8 @@ TEST(ReverseIterationTest, DenseMapTest1) {
|
||||
// Define a pointer-like int.
|
||||
struct PtrLikeInt { int value; };
|
||||
|
||||
namespace llvm {
|
||||
|
||||
template<> struct DenseMapInfo<PtrLikeInt *> {
|
||||
static PtrLikeInt *getEmptyKey() {
|
||||
static PtrLikeInt EmptyKey;
|
||||
@ -77,6 +80,8 @@ template<> struct DenseMapInfo<PtrLikeInt *> {
|
||||
}
|
||||
};
|
||||
|
||||
} // end namespace llvm
|
||||
|
||||
TEST(ReverseIterationTest, DenseMapTest2) {
|
||||
static_assert(detail::IsPointerLike<PtrLikeInt *>::value,
|
||||
"PtrLikeInt * is pointer-like");
|
||||
|
Loading…
x
Reference in New Issue
Block a user