From c3f9d293cf8e090b6f267d7e7b55e7f8bd91d266 Mon Sep 17 00:00:00 2001 From: TimePath Date: Sat, 12 May 2018 14:14:12 +1000 Subject: [PATCH] Only erase functions --- ir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ir.cpp b/ir.cpp index facbc33..5e6cfaa 100644 --- a/ir.cpp +++ b/ir.cpp @@ -3322,7 +3322,7 @@ bool ir_builder::generateGlobal(ir_value *global, bool islocal) * if we're eraseable and the function isn't referenced ignore outputting * the function. */ - if (global->m_flags & IR_FLAG_ERASABLE && global->m_reads.empty()) { + if (global->m_flags & IR_FLAG_ERASABLE && global->m_reads.empty() && global->m_vtype == TYPE_FUNCTION) { return true; } -- 2.39.2