search for: l371

Displaying 2 results from an estimated 2 matches for "l371".

Did you mean: 371
2018 Jun 25
2
runStaticConstructorsDestructors() causes crash on exit
...JITReplacement does. > What you need is to get list of constructors and destructors functions > from a module. You can just reuse this code snippet in your code: > > https://github.com/llvm-mirror/llvm/blob/91b6092209489b4790826efc66fce178a6ec7f46/lib/ExecutionEngine/ExecutionEngine.cpp#L371 > > Then, before running main (or whatever else function you want to run) you > just iterate through the list of constructors, ask JIT for a pointer to a > constructor given it's mangled name, and just run it as you would run any > other function. > After running main do the s...
2018 Jun 21
2
runStaticConstructorsDestructors() causes crash on exit
When OrcMCJITReplacement is given a new module, it asks for the module's constructors, gives them names like $static_ctor.0, $static_ctor.1, etc., and saves the mangled names in a map. Later, to execute them, it uses runViaLayer(), which looks for those symbol names in the given JIT layer. Could one not simply execute the constructors straight away, rather than naming them and looking them up