OSDN Git Service

EE/JIT: Do not invoke parent's ctors/dtors from main()! (PR3897)
authorNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 30 Aug 2010 14:00:29 +0000 (14:00 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 30 Aug 2010 14:00:29 +0000 (14:00 +0000)
commit37ce5650e60979fe3b02cabbd6724cc2c8fe463e
treec715f2f58d8e161f2c1a7ce9cb39901cabea4377
parent51799ddc7c51efef8ffab1d1cc9731ee7a5db6a5
EE/JIT: Do not invoke parent's ctors/dtors from main()! (PR3897)

On Mingw and Cygwin, the symbol __main is resolved to
callee's(eg. tools/lli) one, to invoke wrong duplicated ctors
(and register wrong callee's dtors with atexit(3)).
We expect, by callee, ExecutionEngine::runStaticConstructorsDestructors()
is called before ExecutionEngine::runFunctionAsMain() is called.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112474 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ExecutionEngine/JIT/Intercept.cpp