1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[unittest/ReverseIteration] Unbreak when compiling with GCC.

llvm-svn: 312579
This commit is contained in:
Davide Italiano 2017-09-05 21:27:23 +00:00
parent 1edc7207b0
commit 591160dcce

View File

@ -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");