diff options
author | Luc Van Oostenryck <lucvoo@kernel.org> | 2024-01-20 01:24:12 +0100 |
---|---|---|
committer | Luc Van Oostenryck <lucvoo@kernel.org> | 2024-01-20 01:25:38 +0100 |
commit | b753d383f731984c0789366f064f59883d30d229 (patch) | |
tree | ecf84b17c0da0a8e40f845e3b3931e4a8799bc80 | |
parent | d5a73d316e38f533d3ec61879149a1c33fac51a3 (diff) | |
download | sparse-dev-b753d383f731984c0789366f064f59883d30d229.tar.gz |
llvm: ensure SYM_NODE is stripped before accessing the return type
Signed-off-by: Luc Van Oostenryck <lucvoo@kernel.org>
-rw-r--r-- | sparse-llvm.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); } |