From 4cccdb89c0112931e451bc0719880813d15d14dc Mon Sep 17 00:00:00 2001 From: van Hauser Date: Sun, 16 Feb 2020 16:45:30 +0100 Subject: fix for instrim (not the important one) --- llvm_mode/LLVMInsTrim.so.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm_mode/LLVMInsTrim.so.cc') diff --git a/llvm_mode/LLVMInsTrim.so.cc b/llvm_mode/LLVMInsTrim.so.cc index 995a7217..08d3f68f 100644 --- a/llvm_mode/LLVMInsTrim.so.cc +++ b/llvm_mode/LLVMInsTrim.so.cc @@ -175,7 +175,8 @@ struct InsTrim : public ModulePass { for (Function &F : M) { - if (!F.size()) { continue; } + // if it is external or only contains one basic block: skip it + if (F.size() < 2) { continue; } if (!myWhitelist.empty()) { -- cgit 1.4.1