Skip to content
Commit 70f78e39 authored by Lang Hames's avatar Lang Hames
Browse files

[Orc] Fix a bug in the LazyEmittingLayer - capture names by value (as

std::strings) rather than StringRefs in JITSymbol get-address lambda.

Capturing a StringRef by-value is still effectively capturing a reference, which
is no good here because the referenced string may be gone by the time the lambda
is being evaluated the original value may be gone. Make sure to capture a
std::string instead.

No test case: This bug doesn't manifest under OrcMCJITReplacement, since it
keeps IR modules (from which the StringRefs are sourced) alive permanently.

llvm-svn: 228676
parent 5b8cf293
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment