From 245466d89cfe54b78da486f06d470bc6daaf4625 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 16 Feb 2023 16:44:04 -0800 Subject: Remove `SharedIRBuilder`. (#2657) Co-authored-by: Yong He --- source/slang/slang-ir-layout.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'source/slang/slang-ir-layout.cpp') diff --git a/source/slang/slang-ir-layout.cpp b/source/slang/slang-ir-layout.cpp index 0e4ccc1fe..ab24d3354 100644 --- a/source/slang/slang-ir-layout.cpp +++ b/source/slang/slang-ir-layout.cpp @@ -155,9 +155,7 @@ static Result _calcNaturalSizeAndAlignment( // cache the field offset on the IR field // instruction. // - SharedIRBuilder sharedBuilder(module); - - IRBuilder builder(sharedBuilder); + IRBuilder builder(module); auto intType = builder.getIntType(); builder.addDecoration( @@ -247,8 +245,7 @@ static Result _calcNaturalSizeAndAlignment( auto matType = cast(type); auto rowCount = getIntegerValueFromInst(matType->getRowCount()); auto colCount = getIntegerValueFromInst(matType->getColumnCount()); - SharedIRBuilder sharedBuilder(type->getModule()); - IRBuilder builder(sharedBuilder); + IRBuilder builder(type->getModule()); return _calcNaturalArraySizeAndAlignment( target, matType->getElementType(), @@ -307,9 +304,7 @@ Result getNaturalSizeAndAlignment(TargetRequest* target, IRType* type, IRSizeAnd if( auto module = type->getModule() ) { - SharedIRBuilder sharedBuilder(module); - - IRBuilder builder(sharedBuilder); + IRBuilder builder(module); auto intType = builder.getIntType(); builder.addDecoration( -- cgit v1.2.3