mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-07 16:54:48 +00:00
ad715f86c9
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91611 91177308-0d34-0410-b5e6-96231b3b80d8
32 lines
835 B
C++
32 lines
835 B
C++
//===- llvm/unittest/VMCore/DerivedTypesTest.cpp - Types unit tests -------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "gtest/gtest.h"
|
|
#include "../lib/VMCore/LLVMContextImpl.h"
|
|
#include "llvm/Type.h"
|
|
#include "llvm/DerivedTypes.h"
|
|
#include "llvm/LLVMContext.h"
|
|
using namespace llvm;
|
|
|
|
namespace {
|
|
|
|
TEST(OpaqueTypeTest, RegisterWithContext) {
|
|
LLVMContext C;
|
|
LLVMContextImpl *pImpl = C.pImpl;
|
|
|
|
EXPECT_EQ(0u, pImpl->OpaqueTypes.size());
|
|
{
|
|
PATypeHolder Type = OpaqueType::get(C);
|
|
EXPECT_EQ(1u, pImpl->OpaqueTypes.size());
|
|
}
|
|
EXPECT_EQ(0u, pImpl->OpaqueTypes.size());
|
|
}
|
|
|
|
} // namespace
|