}
}
-TEST(ConstantsTest, BitcastToGEP) {
+void bitcastToGEPHelper(bool useOpaquePointers) {
LLVMContext Context;
std::unique_ptr<Module> M(new Module("MyModule", Context));
+ if (useOpaquePointers)
+ Context.enableOpaquePointers();
auto *i32 = Type::getInt32Ty(Context);
auto *U = StructType::create(Context, "Unsized");
}
}
+TEST(ConstantsTest, BitcastToGEP) {
+ bitcastToGEPHelper(true);
+ bitcastToGEPHelper(false);
+}
+
bool foldFuncPtrAndConstToNull(LLVMContext &Context, Module *TheModule,
uint64_t AndValue,
MaybeAlign FunctionAlign = llvm::None) {