Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Add support for DW_TAG_unspecified_type (nullptr_t in C++11)
[simgrid.git] / src / mc / mc_compare.c
index 193a90c..ca2d81a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013. The SimGrid Team.
+/* Copyright (c) 2012-2014. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -107,6 +107,9 @@ static int compare_areas_with_type(void *area1, void *area2, mc_object_info_t in
   void *addr_pointed1, *addr_pointed2;
 
   switch(type->type){
+  case DW_TAG_unspecified_type:
+    return 1;
+
   case DW_TAG_base_type:
   case DW_TAG_enumeration_type:
   case DW_TAG_union_type:
@@ -120,10 +123,16 @@ static int compare_areas_with_type(void *area1, void *area2, mc_object_info_t in
   case DW_TAG_array_type:
     subtype = type->subtype;
     switch(subtype->type){
+    case DW_TAG_unspecified_type:
+      return 1;
+
     case DW_TAG_base_type:
     case DW_TAG_enumeration_type:
     case DW_TAG_pointer_type:
+    case DW_TAG_reference_type:
+    case DW_TAG_rvalue_reference_type:
     case DW_TAG_structure_type:
+    case DW_TAG_class_type:
     case DW_TAG_union_type:
       if(subtype->byte_size == 0){ /*declaration of the type, need the complete description */
           subtype = subtype->other_object_same_type;
@@ -155,6 +164,8 @@ static int compare_areas_with_type(void *area1, void *area2, mc_object_info_t in
     }
     break;
   case DW_TAG_pointer_type:
+  case DW_TAG_reference_type:
+  case DW_TAG_rvalue_reference_type:
     if(type->subtype && type->subtype->type == DW_TAG_subroutine_type){
       addr_pointed1 = *((void **)(area1)); 
       addr_pointed2 = *((void **)(area2));
@@ -198,6 +209,7 @@ static int compare_areas_with_type(void *area1, void *area2, mc_object_info_t in
     }
     break;
   case DW_TAG_structure_type:
+  case DW_TAG_class_type:
     xbt_dynar_foreach(type->members, cursor, member){
       XBT_DEBUG("Compare member %s", member->name);
       res = compare_areas_with_type((char *)area1 + member->offset, (char *)area2 + member->offset, info, other_info, member->subtype, region_size, region_type, start_data, pointer_level);