mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 12:50:00 +00:00
Add support for TypeBuilder<const/volatile void*, false>.
Thanks to Jochen Wilhelmy for the suggestion! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95677 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d2592ff69b
commit
5e24737d16
@ -231,6 +231,12 @@ public:
|
||||
/// we special case it.
|
||||
template<> class TypeBuilder<void*, false>
|
||||
: public TypeBuilder<types::i<8>*, false> {};
|
||||
template<> class TypeBuilder<const void*, false>
|
||||
: public TypeBuilder<types::i<8>*, false> {};
|
||||
template<> class TypeBuilder<volatile void*, false>
|
||||
: public TypeBuilder<types::i<8>*, false> {};
|
||||
template<> class TypeBuilder<const volatile void*, false>
|
||||
: public TypeBuilder<types::i<8>*, false> {};
|
||||
|
||||
template<typename R, bool cross> class TypeBuilder<R(), cross> {
|
||||
public:
|
||||
|
@ -19,9 +19,16 @@ namespace {
|
||||
TEST(TypeBuilderTest, Void) {
|
||||
EXPECT_EQ(Type::getVoidTy(getGlobalContext()), (TypeBuilder<void, true>::get(getGlobalContext())));
|
||||
EXPECT_EQ(Type::getVoidTy(getGlobalContext()), (TypeBuilder<void, false>::get(getGlobalContext())));
|
||||
// Special case for C compatibility:
|
||||
// Special cases for C compatibility:
|
||||
EXPECT_EQ(Type::getInt8PtrTy(getGlobalContext()),
|
||||
(TypeBuilder<void*, false>::get(getGlobalContext())));
|
||||
EXPECT_EQ(Type::getInt8PtrTy(getGlobalContext()),
|
||||
(TypeBuilder<const void*, false>::get(getGlobalContext())));
|
||||
EXPECT_EQ(Type::getInt8PtrTy(getGlobalContext()),
|
||||
(TypeBuilder<volatile void*, false>::get(getGlobalContext())));
|
||||
EXPECT_EQ(Type::getInt8PtrTy(getGlobalContext()),
|
||||
(TypeBuilder<const volatile void*, false>::get(
|
||||
getGlobalContext())));
|
||||
}
|
||||
|
||||
TEST(TypeBuilderTest, HostIntegers) {
|
||||
|
Loading…
Reference in New Issue
Block a user