mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
Don't try to eliminate invokes to __cxa_atexit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127976 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
372ec6aa91
commit
4f735ca185
@ -2780,6 +2780,12 @@ bool GlobalOpt::OptimizeEmptyGlobalCXXDtors(Function *CXAAtExitFn) {
|
||||
if (!CS)
|
||||
continue;
|
||||
|
||||
// We're only interested in calls. Theoretically, we could handle invoke
|
||||
// instructions as well, but neither llvm-gcc nor clang generate invokes
|
||||
// to __cxa_atexit.
|
||||
if (!CS.isCall())
|
||||
continue;
|
||||
|
||||
Function *DtorFn =
|
||||
dyn_cast<Function>(CS.getArgument(0)->stripPointerCasts());
|
||||
if (!DtorFn)
|
||||
|
Loading…
Reference in New Issue
Block a user