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 12 using namespace mlir; 13 using namespace mlir::LLVM; 14 TEST_F(LLVMIRTest,IsStructTypeMutable)15TEST_F(LLVMIRTest, IsStructTypeMutable) { 16 auto structTy = LLVMStructType::getIdentified(&context, "foo"); 17 ASSERT_TRUE(bool(structTy)); 18 ASSERT_TRUE(structTy.hasTrait<TypeTrait::IsMutable>()); 19 } 20