llvm2alive: check libfn is available in given platform
MODIFY
llvm_util/known_fns.cpp
llvm_util/known_fns.cpp
@@ -47,7 +47,7 @@ known_call(llvm::CallInst &i, const llvm::TargetLibraryInfo &TLI,
auto decl = i.getCalledFunction();
llvm::LibFunc libfn;
- if (!decl || !TLI.getLibFunc(*decl, libfn))
+ if (!decl || !TLI.getLibFunc(*decl, libfn) || !TLI.has(libfn))
return { nullptr, false };
switch (libfn) {

llvm2alive: check libfn is available in given platform