summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-emit.cpp9
-rw-r--r--source/slang/slang-lower-to-ir.cpp1
2 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp
index 74b11079d..16164b957 100644
--- a/source/slang/slang-emit.cpp
+++ b/source/slang/slang-emit.cpp
@@ -698,6 +698,15 @@ Result linkAndOptimizeIR(
// bit_cast on basic types.
lowerBitCast(targetRequest, irModule);
eliminateDeadCode(irModule);
+
+
+ // We include one final step to (optionally) dump the IR and validate
+ // it after all of the optimization passes are complete. This should
+ // reflect the IR that code is generated from as closely as possible.
+ //
+#if 0
+ dumpIRIfEnabled(compileRequest, irModule, "OPTIMIZED");
+#endif
validateIRModuleIfEnabled(compileRequest, irModule);
return SLANG_OK;
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp
index de5a07c0d..ab488a41f 100644
--- a/source/slang/slang-lower-to-ir.cpp
+++ b/source/slang/slang-lower-to-ir.cpp
@@ -5475,6 +5475,7 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo>
// a field that holds the base type...
//
auto irKey = getBuilder()->createStructKey();
+ addLinkageDecoration(context, irKey, inheritanceDecl);
auto keyVal = LoweredValInfo::simple(irKey);
setGlobalValue(context, inheritanceDecl, keyVal);
return keyVal;