diff options
| author | Yong He <yonghe@outlook.com> | 2023-02-16 16:44:04 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-16 16:44:04 -0800 |
| commit | 245466d89cfe54b78da486f06d470bc6daaf4625 (patch) | |
| tree | 522e0af1a9d2756182e143cdc85031ea1bbc2aa0 /source/slang/slang-ir-link.cpp | |
| parent | 4c4826d47eeef4675daae4ae53ff76f4d5ebd84a (diff) | |
Remove `SharedIRBuilder`. (#2657)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-link.cpp')
| -rw-r--r-- | source/slang/slang-ir-link.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/source/slang/slang-ir-link.cpp b/source/slang/slang-ir-link.cpp index 55048484f..bcff5621c 100644 --- a/source/slang/slang-ir-link.cpp +++ b/source/slang/slang-ir-link.cpp @@ -54,7 +54,6 @@ struct IRSharedSpecContext typedef Dictionary<String, RefPtr<IRSpecSymbol>> SymbolDictionary; SymbolDictionary symbols; - SharedIRBuilder sharedBuilderStorage; IRBuilder builderStorage; // The "global" specialization environment. @@ -1369,19 +1368,13 @@ void initializeSharedSpecContext( CodeGenTarget target, TargetRequest* targetReq) { - - SharedIRBuilder* sharedBuilder = &sharedContext->sharedBuilderStorage; - - IRBuilder* builder = &sharedContext->builderStorage; - RefPtr<IRModule> module = inModule; if( !module ) { module = IRModule::create(session); } - sharedBuilder->init(module); - builder->init(sharedBuilder); + sharedContext->builderStorage = IRBuilder(module); sharedContext->module = module; sharedContext->target = target; @@ -1506,12 +1499,11 @@ LinkedIR linkIR( // Combine all of the contents of IRGlobalHashedStringLiterals { StringSlicePool pool(StringSlicePool::Style::Empty); - IRBuilder& builder = sharedContext->builderStorage; for (IRModule* irModule : irModules) { findGlobalHashedStringLiterals(irModule, pool); } - addGlobalHashedStringLiterals(pool, *builder.getSharedBuilder()); + addGlobalHashedStringLiterals(pool, state->irModule); } // Set up shared and builder insert point |
