[mlir] Update Ch-2.md (#121379)
[llvm-project.git] / mlir / unittests / Dialect / LLVMIR / LLVMTypeTest.cpp
blob083dec819a0e05432a49411cfb9790a25c20a224
1 //===- LLVMTypeTest.cpp - Tests for LLVM types ----------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
9 #include "LLVMTestBase.h"
10 #include "mlir/Dialect/LLVMIR/LLVMTypes.h"
12 using namespace mlir;
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>());