From b5a559c4b80ceb697212c98badea2e0192710e0c Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 1 Jan 2017 21:20:01 +0800 Subject: Trans - Tweaks to forward declarations --- src/trans/codegen_c.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/trans/codegen_c.cpp') diff --git a/src/trans/codegen_c.cpp b/src/trans/codegen_c.cpp index b73b4d37..ef64ebcd 100644 --- a/src/trans/codegen_c.cpp +++ b/src/trans/codegen_c.cpp @@ -77,7 +77,7 @@ namespace { { TRACE_FUNCTION_F(ty); TU_IFLET( ::HIR::TypeRef::Data, ty.m_data, Tuple, te, - // TODO: Pre-define tuple name + m_of << "typedef struct "; emit_ctype(ty); m_of << " "; emit_ctype(ty); m_of << ";\n"; ) else TU_IFLET( ::HIR::TypeRef::Data, ty.m_data, Function, te, // TODO: Pre-define function type name @@ -116,7 +116,7 @@ namespace { TU_IFLET( ::HIR::TypeRef::Data, ty.m_data, Tuple, te, if( te.size() > 0 ) { - m_of << "typedef struct {\n"; + m_of << "typedef struct "; emit_ctype(ty); m_of << " {\n"; for(unsigned int i = 0; i < te.size(); i++) { m_of << "\t"; -- cgit v1.2.3