From 77aa8aa32741d263e7f3678ca19b727b9cf7e494 Mon Sep 17 00:00:00 2001 From: Luc Van Oostenryck Date: Sat, 20 Jan 2024 01:55:06 +0100 Subject: [PATCH] llvm: ensure SYM_NODE is stripped before accessing the return type Signed-off-by: Luc Van Oostenryck Signed-off-by: Dan Carpenter --- sparse-llvm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sparse-llvm.c b/sparse-llvm.c index fc0399b4..1028e861 100644 --- a/sparse-llvm.c +++ b/sparse-llvm.c @@ -29,6 +29,8 @@ static LLVMTypeRef symbol_type(struct symbol *sym); static LLVMTypeRef func_return_type(struct symbol *sym) { + if (sym->type == SYM_NODE) + sym = sym->ctype.base_type; return symbol_type(sym->ctype.base_type); } -- 2.11.4.GIT