aboutsummaryrefslogtreecommitdiff
path: root/mlir/unittests/Dialect/SPIRV/SerializationTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/unittests/Dialect/SPIRV/SerializationTest.cpp')
-rw-r--r--mlir/unittests/Dialect/SPIRV/SerializationTest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/mlir/unittests/Dialect/SPIRV/SerializationTest.cpp b/mlir/unittests/Dialect/SPIRV/SerializationTest.cpp
index ef89c16..af55296 100644
--- a/mlir/unittests/Dialect/SPIRV/SerializationTest.cpp
+++ b/mlir/unittests/Dialect/SPIRV/SerializationTest.cpp
@@ -71,8 +71,8 @@ protected:
spirv::GlobalVariableOp addGlobalVar(Type type, llvm::StringRef name) {
OpBuilder builder(module->getRegion());
auto ptrType = spirv::PointerType::get(type, spirv::StorageClass::Uniform);
- return builder.create<spirv::GlobalVariableOp>(
- UnknownLoc::get(&context), TypeAttr::get(ptrType),
+ return spirv::GlobalVariableOp::create(
+ builder, UnknownLoc::get(&context), TypeAttr::get(ptrType),
builder.getStringAttr(name), nullptr);
}
@@ -82,14 +82,14 @@ protected:
auto loc = UnknownLoc::get(&context);
if (auto intType = dyn_cast<IntegerType>(type)) {
- return builder.create<spirv::ConstantOp>(
- loc, type, builder.getIntegerAttr(type, val));
+ return spirv::ConstantOp::create(builder, loc, type,
+ builder.getIntegerAttr(type, val));
}
if (auto vectorType = dyn_cast<VectorType>(type)) {
Type elemType = vectorType.getElementType();
if (auto intType = dyn_cast<IntegerType>(elemType)) {
- return builder.create<spirv::ConstantOp>(
- loc, type,
+ return spirv::ConstantOp::create(
+ builder, loc, type,
DenseElementsAttr::get(vectorType,
IntegerAttr::get(elemType, val).getValue()));
}