mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-13 23:25:06 +00:00
Reverting r215966, r215965, r215964, r215963, r215960, r215959, r215958, and r215957 (these commits all rely on previous commits) due to build breakage. These commits cause failed assertions when testing Clang using MSVC 2013. The asserts are triggered from the std::equal call within ArrayRef::equals due to being passed invalid input (ArrayRef.begin() is returning a nullptr which is problematic).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215981 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -274,30 +274,5 @@ TEST(ConstantsTest, ReplaceWithConstantTest) {
|
||||
|
||||
#undef CHECK
|
||||
|
||||
TEST(ConstantsTest, ConstantArrayReplaceWithConstant) {
|
||||
LLVMContext Context;
|
||||
std::unique_ptr<Module> M(new Module("MyModule", Context));
|
||||
|
||||
Type *IntTy = Type::getInt8Ty(Context);
|
||||
ArrayType *ArrayTy = ArrayType::get(IntTy, 2);
|
||||
Constant *A01Vals[2] = {ConstantInt::get(IntTy, 0),
|
||||
ConstantInt::get(IntTy, 1)};
|
||||
Constant *A01 = ConstantArray::get(ArrayTy, A01Vals);
|
||||
|
||||
Constant *Global = new GlobalVariable(*M, IntTy, false,
|
||||
GlobalValue::ExternalLinkage, nullptr);
|
||||
Constant *GlobalInt = ConstantExpr::getPtrToInt(Global, IntTy);
|
||||
Constant *A0GVals[2] = {ConstantInt::get(IntTy, 0), GlobalInt};
|
||||
Constant *A0G = ConstantArray::get(ArrayTy, A0GVals);
|
||||
ASSERT_NE(A01, A0G);
|
||||
|
||||
GlobalVariable *RefArray =
|
||||
new GlobalVariable(*M, ArrayTy, false, GlobalValue::ExternalLinkage, A0G);
|
||||
ASSERT_EQ(A0G, RefArray->getInitializer());
|
||||
|
||||
GlobalInt->replaceAllUsesWith(ConstantInt::get(IntTy, 1));
|
||||
ASSERT_EQ(A01, RefArray->getInitializer());
|
||||
}
|
||||
|
||||
} // end anonymous namespace
|
||||
} // end namespace llvm
|
||||
|
Reference in New Issue
Block a user