]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/cp/vtable-class-hierarchy.c
Merge from trunk.
[thirdparty/gcc.git] / gcc / cp / vtable-class-hierarchy.c
index 39c75ce5c33ca929b26ba173350232a58f6f32fb..00d4feee0227afc1347dc2825a7dbf385c97702b 100644 (file)
@@ -118,7 +118,10 @@ along with GCC; see the file COPYING3.  If not see
 #include "cgraph.h"
 #include "tree-iterator.h"
 #include "vtable-verify.h"
+#include "gimple.h"
 #include "gimplify.h"
+#include "stringpool.h"
+#include "stor-layout.h"
 
 static int num_calls_to_regset = 0;
 static int num_calls_to_regpair = 0;
@@ -450,7 +453,7 @@ check_and_record_registered_pairs (tree vtable_decl, tree vptr_address,
     vptr_address = TREE_OPERAND (vptr_address, 0);
 
   if (TREE_OPERAND_LENGTH (vptr_address) > 1)
-    offset = TREE_INT_CST_LOW (TREE_OPERAND (vptr_address, 1));
+    offset = tree_to_uhwi (TREE_OPERAND (vptr_address, 1));
   else
     offset = 0;
 
@@ -873,7 +876,7 @@ output_set_info (tree record_type, vec<tree> vtbl_ptr_array)
             vptr_name = IDENTIFIER_POINTER (DECL_NAME (arg0));
 
           if (TREE_CODE (arg1) == INTEGER_CST)
-            vptr_offset = TREE_INT_CST_LOW (arg1);
+            vptr_offset = tree_to_uhwi (arg1);
         }
 
       snprintf (buffer, sizeof (buffer), "%s %s %s + %d\n",