mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-25 03:14:00 +08:00
2002-06-25 Jessica Han <jessica@cup.hp.com>
* config/os/hpux/os_defines.h Define _GLIBCPP_VTABLE_PADDING * libsupc++/tinfo.cc Handle the 8 byte aligned vtable entries when _GLIBCPP_VTABLE_PADDING is defined. From-SVN: r54991
This commit is contained in:
parent
72ea9226fb
commit
0e20c0b56f
@ -1,3 +1,9 @@
|
||||
2002-06-25 Jessica Han <jessica@cup.hp.com>
|
||||
|
||||
* config/os/hpux/os_defines.h Define _GLIBCPP_VTABLE_PADDING
|
||||
* libsupc++/tinfo.cc Handle the 8 byte aligned vtable entries when
|
||||
_GLIBCPP_VTABLE_PADDING is defined.
|
||||
|
||||
2002-06-25 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* include/bits/stl_alloc.h: Additional formatting.
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Specific definitions for generic platforms -*- C++ -*-
|
||||
// Specific definitions for HPUX -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
@ -28,7 +28,7 @@
|
||||
// the GNU General Public License.
|
||||
|
||||
#ifndef _GLIBCPP_OS_DEFINES
|
||||
#define _GLIBCPP_OS_DEFINES
|
||||
#define _GLIBCPP_OS_DEFINES 1
|
||||
|
||||
// System-specific #define, typedefs, corrections, etc, go here. This
|
||||
// file will come before all others.
|
||||
@ -62,7 +62,8 @@
|
||||
|
||||
We also force _GLIBCPP_USE_LONG_LONG here so that we don't have
|
||||
to bastardize configure to deal with this sillyness. */
|
||||
namespace std {
|
||||
namespace std
|
||||
{
|
||||
#ifndef __LP64__
|
||||
__extension__ extern "C" long long strtoll (const char *, char **, int)
|
||||
__asm ("__strtoll");
|
||||
@ -75,5 +76,14 @@ namespace std {
|
||||
__asm ("strtoul");
|
||||
#endif
|
||||
}
|
||||
|
||||
#define _GLIBCPP_USE_LONG_LONG 1
|
||||
|
||||
// HPUX on IA64 requires vtable to be 64 bit aligned even at 32 bit
|
||||
// mode. We need to pad the vtable structure to achieve this.
|
||||
#if !defined(_LP64) && defined (__ia64__)
|
||||
#define _GLIBCPP_VTABLE_PADDING 8
|
||||
typedef long int __padding_type;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -28,6 +28,7 @@
|
||||
// invalidate any other reasons why the executable file might be covered by
|
||||
// the GNU General Public License.
|
||||
|
||||
#include <bits/c++config.h>
|
||||
#include <cstddef>
|
||||
#include "tinfo.h"
|
||||
#include "new" // for placement new
|
||||
@ -91,12 +92,28 @@ namespace {
|
||||
using namespace std;
|
||||
using namespace abi;
|
||||
|
||||
// initial part of a vtable, this structure is used with offsetof, so we don't
|
||||
// Initial part of a vtable, this structure is used with offsetof, so we don't
|
||||
// have to keep alignments consistent manually.
|
||||
struct vtable_prefix {
|
||||
ptrdiff_t whole_object; // offset to most derived object
|
||||
const __class_type_info *whole_type; // pointer to most derived type_info
|
||||
const void *origin; // what a class's vptr points to
|
||||
struct vtable_prefix
|
||||
{
|
||||
// Offset to most derived object.
|
||||
ptrdiff_t whole_object;
|
||||
|
||||
// Additional padding if necessary.
|
||||
#ifdef _GLIBCPP_VTABLE_PADDING
|
||||
ptrdiff_t padding1;
|
||||
#endif
|
||||
|
||||
// Pointer to most derived type_info.
|
||||
const __class_type_info *whole_type;
|
||||
|
||||
// Additional padding if necessary.
|
||||
#ifdef _GLIBCPP_VTABLE_PADDING
|
||||
ptrdiff_t padding2;
|
||||
#endif
|
||||
|
||||
// What a class's vptr points to.
|
||||
const void *origin;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
Loading…
Reference in New Issue
Block a user