mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-09 22:24:37 +00:00
Revert r225053: Add an ArrayRef upcasting constructor from ArrayRef<U*> -> ArrayRef<T*> where T is a base of U.
This appears to have broken at least the windows build bots due to compile errors in the predicate that didn't simply supress the overload. I'm not sure what the fix is, and the bots have been broken for a long time now so I'm just reverting until Michael can figure out a fix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225064 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -90,39 +90,4 @@ TEST(ArrayRefTest, ConstConvert) {
|
||||
a = ArrayRef<int *>(A);
|
||||
}
|
||||
|
||||
struct A {
|
||||
int data;
|
||||
|
||||
A() : data(0) {}
|
||||
};
|
||||
|
||||
struct B : A {
|
||||
int data2;
|
||||
|
||||
B() : A(), data2(0) {}
|
||||
};
|
||||
|
||||
TEST(ArrayRefTest, UpcastConvert) {
|
||||
B Data[5];
|
||||
|
||||
for (unsigned i = 0, e = 5; i != e; ++i) {
|
||||
Data[i].data = i + 5;
|
||||
Data[i].data2 = i + 30;
|
||||
}
|
||||
|
||||
B *DataPtrs[5];
|
||||
for (unsigned i = 0, e = 5; i != e; ++i) {
|
||||
DataPtrs[i] = &Data[i];
|
||||
}
|
||||
|
||||
ArrayRef<B *> BArray(DataPtrs, 5);
|
||||
ArrayRef<A *> AArray(BArray);
|
||||
|
||||
EXPECT_TRUE(AArray.size() == 5);
|
||||
for (unsigned i = 0, e = 5; i != e; ++i) {
|
||||
A *a = AArray[i];
|
||||
EXPECT_TRUE(a->data == int(i + 5));
|
||||
}
|
||||
}
|
||||
|
||||
} // end anonymous namespace
|
||||
|
Reference in New Issue
Block a user