diff options
author | Julian Büning <julian.buening@rwth-aachen.de> | 2020-10-10 15:13:40 +0200 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2020-11-12 10:13:54 +0000 |
commit | bda35257b64545870c6de5fe8aba573ef82945d9 (patch) | |
tree | 0ed00a0d18ffb012518abc23342701e20459035e /lib/Module | |
parent | c763a4087f1d8fa4dbdfb9c8f30d545cdb66a0aa (diff) | |
download | klee-bda35257b64545870c6de5fe8aba573ef82945d9.tar.gz |
Casting.h: isa_and_nonnull<>
Diffstat (limited to 'lib/Module')
-rw-r--r-- | lib/Module/FunctionAlias.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/Module/FunctionAlias.cpp b/lib/Module/FunctionAlias.cpp index 2ab8cfd4..3fb0ec9a 100644 --- a/lib/Module/FunctionAlias.cpp +++ b/lib/Module/FunctionAlias.cpp @@ -9,8 +9,9 @@ #include "Passes.h" -#include "klee/Support/OptionCategories.h" +#include "klee/Support/Casting.h" #include "klee/Support/ErrorHandling.h" +#include "klee/Support/OptionCategories.h" #include "llvm/IR/GlobalAlias.h" #include "llvm/Support/CommandLine.h" @@ -221,13 +222,10 @@ bool FunctionAliasPass::tryToReplace(GlobalValue *match, } bool FunctionAliasPass::isFunctionOrGlobalFunctionAlias(const GlobalValue *gv) { - if (gv == nullptr) - return false; - - if (isa<Function>(gv)) + if (isa_and_nonnull<Function>(gv)) return true; - if (const auto *ga = dyn_cast<GlobalAlias>(gv)) { + if (const auto *ga = dyn_cast_or_null<GlobalAlias>(gv)) { const auto *aliasee = dyn_cast<GlobalValue>(ga->getAliasee()); if (!aliasee) { // check if GlobalAlias is alias bitcast |