From 4d20fd329956ac89408b1628a8291fea01bc9a6d Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 20 Feb 2024 12:24:00 -0800 Subject: Refactor compiler option representations. (#3598) * Refactor compiler option representation. * Fix binary compatibility. * Add a test for specifying compiler options at link time. * Fix binary compatibility. * Fix binary compatibility. * Fix backward compatibility on matrix layout. * Fix. * Fix. * Fix. * Fix gfx. * Fix gfx. * Fix dynamic dispatch. * Polish. --- source/slang/slang-ir-generics-lowering-context.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/slang/slang-ir-generics-lowering-context.cpp') diff --git a/source/slang/slang-ir-generics-lowering-context.cpp b/source/slang/slang-ir-generics-lowering-context.cpp index 212e16483..a7f75d7be 100644 --- a/source/slang/slang-ir-generics-lowering-context.cpp +++ b/source/slang/slang-ir-generics-lowering-context.cpp @@ -66,7 +66,7 @@ namespace Slang // For now the only type info we encapsualte is type size. IRSizeAndAlignment sizeAndAlignment; - getNaturalSizeAndAlignment(targetReq, (IRType*)typeInst, &sizeAndAlignment); + getNaturalSizeAndAlignment(targetProgram->getOptionSet(), (IRType*)typeInst, &sizeAndAlignment); builder->addRTTITypeSizeDecoration(result, sizeAndAlignment.size); // Give a name to the rtti object. @@ -235,7 +235,7 @@ namespace Slang // value must be stored out-of-line. // IRSizeAndAlignment sizeAndAlignment; - Result result = getNaturalSizeAndAlignment(targetReq, concreteType, &sizeAndAlignment); + Result result = getNaturalSizeAndAlignment(targetProgram->getOptionSet(), concreteType, &sizeAndAlignment); if(SLANG_FAILED(result) || (sizeAndAlignment.size > anyValueSize)) { // If the value must be stored out-of-line, we construct @@ -386,7 +386,7 @@ namespace Slang if (outLimit) *outLimit = anyValueSize; IRSizeAndAlignment sizeAndAlignment; - Result result = getNaturalSizeAndAlignment(targetReq, concreteType, &sizeAndAlignment); + Result result = getNaturalSizeAndAlignment(targetProgram->getOptionSet(), concreteType, &sizeAndAlignment); if (outTypeSize) *outTypeSize = sizeAndAlignment.size; if(SLANG_FAILED(result) || (sizeAndAlignment.size > anyValueSize)) -- cgit v1.2.3