1 //===- LLVMTypeTest.cpp - Tests for LLVM types ----------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "LLVMTestBase.h"
10 #include "mlir/Dialect/LLVMIR/LLVMTypes.h"
13 using namespace mlir::LLVM
;
15 TEST_F(LLVMIRTest
, IsStructTypeMutable
) {
16 auto structTy
= LLVMStructType::getIdentified(&context
, "foo");
17 ASSERT_TRUE(bool(structTy
));
18 ASSERT_TRUE(structTy
.hasTrait
<TypeTrait::IsMutable
>());