Suppress all uses of LLVM_END_WITH_NULL. NFC.
Use variadic templates instead of relying on <cstdarg> + sentinel.
This enforces better type checking and makes code more readable.
Differential Revision: https://reviews.llvm.org/D32541
llvm-svn: 302571
diff --git a/llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h b/llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h
index 7fb2663..dff72c6 100644
--- a/llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h
+++ b/llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h
@@ -101,7 +101,7 @@
public:
static StructType *get(LLVMContext &Context) {
return StructType::get(
- TypeBuilder<types::i<32>[256], XCompile>::get(Context), nullptr);
+ TypeBuilder<types::i<32>[256], XCompile>::get(Context));
}
};
diff --git a/llvm/unittests/IR/TypeBuilderTest.cpp b/llvm/unittests/IR/TypeBuilderTest.cpp
index f2dccac..9ba7765 100644
--- a/llvm/unittests/IR/TypeBuilderTest.cpp
+++ b/llvm/unittests/IR/TypeBuilderTest.cpp
@@ -264,23 +264,21 @@
TEST(TypeBuilderTest, Extensions) {
LLVMContext Context;
- EXPECT_EQ(PointerType::getUnqual(StructType::get(
- TypeBuilder<int, false>::get(Context),
- TypeBuilder<int *, false>::get(Context),
- TypeBuilder<void *[], false>::get(Context), (void *)nullptr)),
+ EXPECT_EQ(PointerType::getUnqual(
+ StructType::get(TypeBuilder<int, false>::get(Context),
+ TypeBuilder<int *, false>::get(Context),
+ TypeBuilder<void *[], false>::get(Context))),
(TypeBuilder<MyType *, false>::get(Context)));
- EXPECT_EQ(
- PointerType::getUnqual(StructType::get(
- TypeBuilder<types::i<32>, false>::get(Context),
- TypeBuilder<types::i<32> *, false>::get(Context),
- TypeBuilder<types::i<8> *[], false>::get(Context), (void *)nullptr)),
- (TypeBuilder<MyPortableType *, false>::get(Context)));
- EXPECT_EQ(
- PointerType::getUnqual(StructType::get(
- TypeBuilder<types::i<32>, false>::get(Context),
- TypeBuilder<types::i<32> *, false>::get(Context),
- TypeBuilder<types::i<8> *[], false>::get(Context), (void *)nullptr)),
- (TypeBuilder<MyPortableType *, true>::get(Context)));
+ EXPECT_EQ(PointerType::getUnqual(StructType::get(
+ TypeBuilder<types::i<32>, false>::get(Context),
+ TypeBuilder<types::i<32> *, false>::get(Context),
+ TypeBuilder<types::i<8> *[], false>::get(Context))),
+ (TypeBuilder<MyPortableType *, false>::get(Context)));
+ EXPECT_EQ(PointerType::getUnqual(StructType::get(
+ TypeBuilder<types::i<32>, false>::get(Context),
+ TypeBuilder<types::i<32> *, false>::get(Context),
+ TypeBuilder<types::i<8> *[], false>::get(Context))),
+ (TypeBuilder<MyPortableType *, true>::get(Context)));
}
} // anonymous namespace