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//===----------------------------------------------------------------------===//
8
9#include "LLVMTestBase.h"
10#include "mlir/Dialect/LLVMIR/LLVMTypes.h"
11
12using namespace mlir;
13using namespace mlir::LLVM;
14
15TEST_F(LLVMIRTest, IsStructTypeMutable) {
16 auto structTy = LLVMStructType::getIdentified(context: &context, name: "foo");
17 ASSERT_TRUE(bool(structTy));
18 ASSERT_TRUE(structTy.hasTrait<TypeTrait::IsMutable>());
19}
20

source code of mlir/unittests/Dialect/LLVMIR/LLVMTypeTest.cpp