diff options
| author | Lang Hames <lhames@gmail.com> | 2021-09-27 15:25:30 -0700 |
|---|---|---|
| committer | Lang Hames <lhames@gmail.com> | 2021-09-27 15:46:56 -0700 |
| commit | 6fe2e9a9cc87cd938aeaa7d76065d22d0ad87706 (patch) | |
| tree | 12d916315e0fe3c0a0c98094c5c48dfa90243566 /llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp | |
| parent | c42772752a51849d311d5a379a042528c75795a8 (diff) | |
| download | llvm-6fe2e9a9cc87cd938aeaa7d76065d22d0ad87706.zip llvm-6fe2e9a9cc87cd938aeaa7d76065d22d0ad87706.tar.gz llvm-6fe2e9a9cc87cd938aeaa7d76065d22d0ad87706.tar.bz2 | |
[ORC] Hold shared_ptr<SymbolStringPool> in errors containing SymbolStringPtrs.
This allows these error values to remain valid, even if they tear down the JIT
itself.
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp')
| -rw-r--r-- | llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp b/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp index c663f5c..40d4f19 100644 --- a/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp @@ -279,8 +279,9 @@ public: // If there were missing symbols then report the error. if (!MissingSymbols.empty()) - return make_error<MissingSymbolDefinitions>(G.getName(), - std::move(MissingSymbols)); + return make_error<MissingSymbolDefinitions>( + Layer.getExecutionSession().getSymbolStringPool(), G.getName(), + std::move(MissingSymbols)); // If there are more definitions than expected, add them to the // ExtraSymbols vector. @@ -293,8 +294,9 @@ public: // If there were extra definitions then report the error. if (!ExtraSymbols.empty()) - return make_error<UnexpectedSymbolDefinitions>(G.getName(), - std::move(ExtraSymbols)); + return make_error<UnexpectedSymbolDefinitions>( + Layer.getExecutionSession().getSymbolStringPool(), G.getName(), + std::move(ExtraSymbols)); } if (auto Err = MR->notifyResolved(InternedResult)) |
