X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=mangle.c;h=f8f32b154c441455af19c196da25ab83d3303971;hb=853c4c59c67930035ac59bd2bffbfa8a8c21b767;hp=1eb6a16b30410a426d861e453ee8bcd7cdcad53e;hpb=6276fe9d7f9520aa34b932f54506ece316158841;p=cparser diff --git a/mangle.c b/mangle.c index 1eb6a16..f8f32b1 100644 --- a/mangle.c +++ b/mangle.c @@ -1,6 +1,6 @@ /* * This file is part of cparser. - * Copyright (C) 2007-2008 Matthias Braun + * Copyright (C) 2007-2009 Matthias Braun * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -222,7 +222,6 @@ static void mangle_type(type_t *orig_type) case TYPE_BITFIELD: panic("no mangling for this type implemented yet"); - break; } panic("invalid type encountered while mangling"); } @@ -262,12 +261,11 @@ ident *create_name_win32(entity_t *entity) assert(is_declaration(entity)); - if (entity->declaration.modifiers & DM_DLLIMPORT) { - /* add prefix for imported symbols */ - obstack_printf(o, "__imp_"); - } - if (entity->kind == ENTITY_FUNCTION) { + if (entity->declaration.modifiers & DM_DLLIMPORT) + /* add prefix for imported symbols */ + obstack_printf(o, "__imp_"); + cc_kind_t cc = entity->declaration.type->function.calling_convention; /* calling convention prefix */