projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
372ec6a
)
Don't try to eliminate invokes to __cxa_atexit.
author
Anders Carlsson
<andersca@mac.com>
Sun, 20 Mar 2011 20:21:33 +0000
(20:21 +0000)
committer
Anders Carlsson
<andersca@mac.com>
Sun, 20 Mar 2011 20:21:33 +0000
(20:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127976
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/IPO/GlobalOpt.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/IPO/GlobalOpt.cpp
b/lib/Transforms/IPO/GlobalOpt.cpp
index 1a8b944363f70848df0119f7064d3ee96efa19e1..2b9b7f2430278684d1a1bad7f85e65403990b81e 100644
(file)
--- a/
lib/Transforms/IPO/GlobalOpt.cpp
+++ b/
lib/Transforms/IPO/GlobalOpt.cpp
@@
-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)