diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-05-04 00:20:48 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-05-04 00:20:48 +0000 |
commit | fea3ecb60ce0f48d893c549ce92ae7dbb2ee76e4 (patch) | |
tree | 878af03e4d136a7dfb7ae8ed371a4c7fbe6884c3 /tools/bugpoint/CrashDebugger.cpp | |
parent | 7212e1ee9696659a1097ca9e65b1f5f4d3612fce (diff) |
[GlobalDCE, Misc] Don't remove functions referenced by ifuncs
We forgot to consider the target of ifuncs when considering if a
function was alive or dead.
N.B. Also update a few auxiliary tools like bugpoint and
verify-uselistorder.
This fixes PR27593.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268468 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/CrashDebugger.cpp')
-rw-r--r-- | tools/bugpoint/CrashDebugger.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/bugpoint/CrashDebugger.cpp b/tools/bugpoint/CrashDebugger.cpp index d494007665a..b161d88882a 100644 --- a/tools/bugpoint/CrashDebugger.cpp +++ b/tools/bugpoint/CrashDebugger.cpp @@ -264,8 +264,8 @@ bool ReduceCrashingFunctions::TestFuncs(std::vector<Function*> &Funcs) { std::vector<GlobalValue*> ToRemove; // First, remove aliases to functions we're about to purge. for (GlobalAlias &Alias : M->aliases()) { - Constant *Root = Alias.getAliasee()->stripPointerCasts(); - Function *F = dyn_cast<Function>(Root); + GlobalObject *Root = Alias.getBaseObject(); + Function *F = dyn_cast_or_null<Function>(Root); if (F) { if (Functions.count(F)) // We're keeping this function. |