1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -g -o /dev/null 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc typedef long unsigned int size_t; 4*f4a2713aSLionel Sambuc typedef unsigned short int uint16_t; 5*f4a2713aSLionel Sambuc typedef unsigned int uint32_t; 6*f4a2713aSLionel Sambuc typedef unsigned long int uint64_t; 7*f4a2713aSLionel Sambuc typedef uint16_t Elf64_Half; 8*f4a2713aSLionel Sambuc typedef uint32_t Elf64_Word; 9*f4a2713aSLionel Sambuc typedef uint64_t Elf64_Xword; 10*f4a2713aSLionel Sambuc typedef uint64_t Elf64_Addr; 11*f4a2713aSLionel Sambuc typedef uint64_t Elf64_Off; 12*f4a2713aSLionel Sambuc typedef struct 13*f4a2713aSLionel Sambuc { 14*f4a2713aSLionel Sambuc Elf64_Word p_type; 15*f4a2713aSLionel Sambuc Elf64_Off p_offset; 16*f4a2713aSLionel Sambuc Elf64_Addr p_vaddr; 17*f4a2713aSLionel Sambuc Elf64_Xword p_align; 18*f4a2713aSLionel Sambuc } 19*f4a2713aSLionel Sambuc Elf64_Phdr; 20*f4a2713aSLionel Sambuc struct dl_phdr_info 21*f4a2713aSLionel Sambuc { 22*f4a2713aSLionel Sambuc const char *dlpi_name; 23*f4a2713aSLionel Sambuc const Elf64_Phdr *dlpi_phdr; 24*f4a2713aSLionel Sambuc Elf64_Half dlpi_phnum; 25*f4a2713aSLionel Sambuc unsigned long long int dlpi_adds; 26*f4a2713aSLionel Sambuc }; 27*f4a2713aSLionel Sambuc typedef unsigned _Unwind_Ptr; 28*f4a2713aSLionel Sambuc struct object 29*f4a2713aSLionel Sambuc { 30*f4a2713aSLionel Sambuc union 31*f4a2713aSLionel Sambuc { 32*f4a2713aSLionel Sambuc const struct dwarf_fde *single; 33*f4a2713aSLionel Sambuc struct dwarf_fde **array; 34*f4a2713aSLionel Sambuc struct fde_vector *sort; 35*f4a2713aSLionel Sambuc } 36*f4a2713aSLionel Sambuc u; 37*f4a2713aSLionel Sambuc union 38*f4a2713aSLionel Sambuc { 39*f4a2713aSLionel Sambuc struct 40*f4a2713aSLionel Sambuc { 41*f4a2713aSLionel Sambuc } 42*f4a2713aSLionel Sambuc b; 43*f4a2713aSLionel Sambuc } 44*f4a2713aSLionel Sambuc s; 45*f4a2713aSLionel Sambuc struct object *next; 46*f4a2713aSLionel Sambuc }; 47*f4a2713aSLionel Sambuc typedef int sword; 48*f4a2713aSLionel Sambuc typedef unsigned int uword; 49*f4a2713aSLionel Sambuc struct dwarf_fde 50*f4a2713aSLionel Sambuc { 51*f4a2713aSLionel Sambuc uword length; 52*f4a2713aSLionel Sambuc sword CIE_delta; 53*f4a2713aSLionel Sambuc unsigned char pc_begin[]; 54*f4a2713aSLionel Sambuc }; 55*f4a2713aSLionel Sambuc typedef struct dwarf_fde fde; 56*f4a2713aSLionel Sambuc struct unw_eh_callback_data 57*f4a2713aSLionel Sambuc { 58*f4a2713aSLionel Sambuc const fde *ret; 59*f4a2713aSLionel Sambuc struct frame_hdr_cache_element *link; 60*f4a2713aSLionel Sambuc } 61*f4a2713aSLionel Sambuc frame_hdr_cache[8]; 62*f4a2713aSLionel Sambuc 63*f4a2713aSLionel Sambuc _Unwind_Ptr base_from_cb_data(struct unw_eh_callback_data * data)64*f4a2713aSLionel Sambucbase_from_cb_data (struct unw_eh_callback_data *data) 65*f4a2713aSLionel Sambuc { 66*f4a2713aSLionel Sambuc } 67*f4a2713aSLionel Sambuc 68*f4a2713aSLionel Sambuc void _Unwind_IteratePhdrCallback(struct dl_phdr_info * info,size_t size,void * ptr)69*f4a2713aSLionel Sambuc_Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr) 70*f4a2713aSLionel Sambuc { 71*f4a2713aSLionel Sambuc const unsigned char *p; 72*f4a2713aSLionel Sambuc const struct unw_eh_frame_hdr *hdr; 73*f4a2713aSLionel Sambuc struct object ob; 74*f4a2713aSLionel Sambuc } 75