parser: Remove the unused attribute alignment from struct declaration_specifiers_t.
[cparser] / mangle.c
index 6188d2a..fb02128 100644 (file)
--- a/mangle.c
+++ b/mangle.c
@@ -7,12 +7,11 @@
 #include <libfirm/firm.h>
 #include <string.h>
 
+#include "adt/obst.h"
 #include "entity_t.h"
 #include "type_t.h"
 #include "symbol_t.h"
 #include "mangle.h"
-#include "diagnostic.h"
-#include "ast2firm.h"
 #include "lang_features.h"
 #include "adt/error.h"
 
@@ -292,10 +291,9 @@ ident *create_name_win32(entity_t *entity)
 
                case CC_STDCALL:
                case CC_FASTCALL: {
-                       ir_type  *irtype = get_ir_type(entity->declaration.type);
-                       unsigned size    = 0;
-                       for (int i = get_method_n_params(irtype) - 1; i >= 0; --i) {
-                               size += get_type_size_bytes(get_method_param_type(irtype, i));
+                       unsigned size = 0;
+                       for (function_parameter_t const* i = type->function.parameters; i; i = i->next) {
+                               size += get_type_size(i->type);
                        }
                        obstack_printf(o, "@%u", size);
                        break;