From e36385214c046644ab6e990f4228acfcd1a21c53 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Sun, 20 Oct 2013 00:36:34 +0200 Subject: [PATCH] Do not leave __xopEquals for structs undefined. --- gen/declarations.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gen/declarations.cpp b/gen/declarations.cpp index f209d1a6..83df49f9 100644 --- a/gen/declarations.cpp +++ b/gen/declarations.cpp @@ -99,6 +99,12 @@ void StructDeclaration::codegen(IRState *p) // emit typeinfo DtoTypeInfoOf(type); + + // Emit __xopEquals/__xopCmp. + if (xeq && xeq != xerreq) + xeq->codegen(p); + if (xcmp && xcmp != xerrcmp) + xcmp->codegen(p); } }