diff options
| author | Yong He <yonghe@outlook.com> | 2018-02-20 16:34:59 -0500 |
|---|---|---|
| committer | Yong He <yonghe@outlook.com> | 2018-02-20 16:34:59 -0500 |
| commit | 61a6d18c4870eb55b804d36a30608a34c55e801d (patch) | |
| tree | d2b5f7c7da2d6a9065a9b2d59f79d0c1cab7f436 /source/slang/slang.cpp | |
| parent | 5de62bbe4dddc64895ddb17c4eb3572c3c9be248 (diff) | |
make CompileRequest retain specailized IR module.
This is to workaround with the issue that the Types returned in ProgramLayout may reference to IRWitnessTables via GlobalGenericParamSubstitution.
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index b65ec5615..42e412438 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -123,7 +123,13 @@ CompileRequest::CompileRequest(Session* session) } CompileRequest::~CompileRequest() -{} +{ + // delete things that may reference IR objects first + targets = decltype(targets)(); + translationUnits = decltype(translationUnits)(); + entryPoints = decltype(entryPoints)(); + types = decltype(types)(); +} RefPtr<Expr> CompileRequest::parseTypeString(TranslationUnitRequest * translationUnit, String typeStr, RefPtr<Scope> scope) |
