From a1c2a90c14b964f15344f81458dee46f2ac2b8ec Mon Sep 17 00:00:00 2001 From: Yulei Sui <7608399+yuleisui@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:08:28 +1100 Subject: [PATCH] fix issue #1609 --- svf-llvm/lib/CppUtil.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/svf-llvm/lib/CppUtil.cpp b/svf-llvm/lib/CppUtil.cpp index 1509fcb38..8f17530d6 100644 --- a/svf-llvm/lib/CppUtil.cpp +++ b/svf-llvm/lib/CppUtil.cpp @@ -893,7 +893,9 @@ bool cppUtil::matchesLabel(const std::string &foo, const std::string &label) */ bool cppUtil::isTemplateFunc(const Function *foo) { - assert(foo->hasName() && "foo does not have a name? possible indirect call"); + /// if the function does not have a name, it can be a compiler generated internal function. + if(foo->hasName() == false) + return false; const std::string &name = foo->getName().str(); bool matchedLabel = matchesLabel(name, znstLabel) || matchesLabel(name, znkstLabel) || matchesLabel(name, znkLabel);