From 06baaacdc0b882e493a3c140c741a05467d9b71e Mon Sep 17 00:00:00 2001 From: Alexey Prokhin Date: Tue, 19 Jul 2011 20:20:00 +0400 Subject: [PATCH] Fixed an undefined reference if a postblit is annotated with @disabled --- gen/typinf.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gen/typinf.cpp b/gen/typinf.cpp index a6262c29..f5753c0f 100644 --- a/gen/typinf.cpp +++ b/gen/typinf.cpp @@ -698,7 +698,10 @@ void TypeInfoStructDeclaration::llvmDefine() b.push_funcptr(sd->dtor); //void function(void*) xpostblit; - b.push_funcptr(sd->postblit); + FuncDeclaration *xpostblit = sd->postblit; + if (xpostblit && sd->postblit->storage_class & STCdisable) + xpostblit = 0; + b.push_funcptr(xpostblit); //uint m_align; b.push_uint(tc->alignsize());