aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc/objc-gnu-runtime-abi-01.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-01-14 16:56:44 +0100
committerMartin Liska <mliska@suse.cz>2022-01-17 22:12:04 +0100
commit5c69acb32329d49e58c26fa41ae74229a52b9106 (patch)
treeddb05f9d73afb6f998457d2ac4b720e3b3b60483 /gcc/objc/objc-gnu-runtime-abi-01.c
parent490e23032baaece71f2ec09fa1805064b150fbc2 (diff)
downloadgcc-5c69acb32329d49e58c26fa41ae74229a52b9106.zip
gcc-5c69acb32329d49e58c26fa41ae74229a52b9106.tar.gz
gcc-5c69acb32329d49e58c26fa41ae74229a52b9106.tar.bz2
Rename .c files to .cc files.
gcc/ada/ChangeLog: * adadecode.c: Moved to... * adadecode.cc: ...here. * affinity.c: Moved to... * affinity.cc: ...here. * argv-lynxos178-raven-cert.c: Moved to... * argv-lynxos178-raven-cert.cc: ...here. * argv.c: Moved to... * argv.cc: ...here. * aux-io.c: Moved to... * aux-io.cc: ...here. * cio.c: Moved to... * cio.cc: ...here. * cstreams.c: Moved to... * cstreams.cc: ...here. * env.c: Moved to... * env.cc: ...here. * exit.c: Moved to... * exit.cc: ...here. * expect.c: Moved to... * expect.cc: ...here. * final.c: Moved to... * final.cc: ...here. * gcc-interface/cuintp.c: Moved to... * gcc-interface/cuintp.cc: ...here. * gcc-interface/decl.c: Moved to... * gcc-interface/decl.cc: ...here. * gcc-interface/misc.c: Moved to... * gcc-interface/misc.cc: ...here. * gcc-interface/targtyps.c: Moved to... * gcc-interface/targtyps.cc: ...here. * gcc-interface/trans.c: Moved to... * gcc-interface/trans.cc: ...here. * gcc-interface/utils.c: Moved to... * gcc-interface/utils.cc: ...here. * gcc-interface/utils2.c: Moved to... * gcc-interface/utils2.cc: ...here. * init.c: Moved to... * init.cc: ...here. * initialize.c: Moved to... * initialize.cc: ...here. * libgnarl/thread.c: Moved to... * libgnarl/thread.cc: ...here. * link.c: Moved to... * link.cc: ...here. * locales.c: Moved to... * locales.cc: ...here. * mkdir.c: Moved to... * mkdir.cc: ...here. * raise.c: Moved to... * raise.cc: ...here. * rtfinal.c: Moved to... * rtfinal.cc: ...here. * rtinit.c: Moved to... * rtinit.cc: ...here. * seh_init.c: Moved to... * seh_init.cc: ...here. * sigtramp-armdroid.c: Moved to... * sigtramp-armdroid.cc: ...here. * sigtramp-ios.c: Moved to... * sigtramp-ios.cc: ...here. * sigtramp-qnx.c: Moved to... * sigtramp-qnx.cc: ...here. * sigtramp-vxworks.c: Moved to... * sigtramp-vxworks.cc: ...here. * socket.c: Moved to... * socket.cc: ...here. * tracebak.c: Moved to... * tracebak.cc: ...here. * version.c: Moved to... * version.cc: ...here. * vx_stack_info.c: Moved to... * vx_stack_info.cc: ...here. gcc/ChangeLog: * adjust-alignment.c: Moved to... * adjust-alignment.cc: ...here. * alias.c: Moved to... * alias.cc: ...here. * alloc-pool.c: Moved to... * alloc-pool.cc: ...here. * asan.c: Moved to... * asan.cc: ...here. * attribs.c: Moved to... * attribs.cc: ...here. * auto-inc-dec.c: Moved to... * auto-inc-dec.cc: ...here. * auto-profile.c: Moved to... * auto-profile.cc: ...here. * bb-reorder.c: Moved to... * bb-reorder.cc: ...here. * bitmap.c: Moved to... * bitmap.cc: ...here. * btfout.c: Moved to... * btfout.cc: ...here. * builtins.c: Moved to... * builtins.cc: ...here. * caller-save.c: Moved to... * caller-save.cc: ...here. * calls.c: Moved to... * calls.cc: ...here. * ccmp.c: Moved to... * ccmp.cc: ...here. * cfg.c: Moved to... * cfg.cc: ...here. * cfganal.c: Moved to... * cfganal.cc: ...here. * cfgbuild.c: Moved to... * cfgbuild.cc: ...here. * cfgcleanup.c: Moved to... * cfgcleanup.cc: ...here. * cfgexpand.c: Moved to... * cfgexpand.cc: ...here. * cfghooks.c: Moved to... * cfghooks.cc: ...here. * cfgloop.c: Moved to... * cfgloop.cc: ...here. * cfgloopanal.c: Moved to... * cfgloopanal.cc: ...here. * cfgloopmanip.c: Moved to... * cfgloopmanip.cc: ...here. * cfgrtl.c: Moved to... * cfgrtl.cc: ...here. * cgraph.c: Moved to... * cgraph.cc: ...here. * cgraphbuild.c: Moved to... * cgraphbuild.cc: ...here. * cgraphclones.c: Moved to... * cgraphclones.cc: ...here. * cgraphunit.c: Moved to... * cgraphunit.cc: ...here. * collect-utils.c: Moved to... * collect-utils.cc: ...here. * collect2-aix.c: Moved to... * collect2-aix.cc: ...here. * collect2.c: Moved to... * collect2.cc: ...here. * combine-stack-adj.c: Moved to... * combine-stack-adj.cc: ...here. * combine.c: Moved to... * combine.cc: ...here. * common/common-targhooks.c: Moved to... * common/common-targhooks.cc: ...here. * common/config/aarch64/aarch64-common.c: Moved to... * common/config/aarch64/aarch64-common.cc: ...here. * common/config/alpha/alpha-common.c: Moved to... * common/config/alpha/alpha-common.cc: ...here. * common/config/arc/arc-common.c: Moved to... * common/config/arc/arc-common.cc: ...here. * common/config/arm/arm-common.c: Moved to... * common/config/arm/arm-common.cc: ...here. * common/config/avr/avr-common.c: Moved to... * common/config/avr/avr-common.cc: ...here. * common/config/bfin/bfin-common.c: Moved to... * common/config/bfin/bfin-common.cc: ...here. * common/config/bpf/bpf-common.c: Moved to... * common/config/bpf/bpf-common.cc: ...here. * common/config/c6x/c6x-common.c: Moved to... * common/config/c6x/c6x-common.cc: ...here. * common/config/cr16/cr16-common.c: Moved to... * common/config/cr16/cr16-common.cc: ...here. * common/config/cris/cris-common.c: Moved to... * common/config/cris/cris-common.cc: ...here. * common/config/csky/csky-common.c: Moved to... * common/config/csky/csky-common.cc: ...here. * common/config/default-common.c: Moved to... * common/config/default-common.cc: ...here. * common/config/epiphany/epiphany-common.c: Moved to... * common/config/epiphany/epiphany-common.cc: ...here. * common/config/fr30/fr30-common.c: Moved to... * common/config/fr30/fr30-common.cc: ...here. * common/config/frv/frv-common.c: Moved to... * common/config/frv/frv-common.cc: ...here. * common/config/gcn/gcn-common.c: Moved to... * common/config/gcn/gcn-common.cc: ...here. * common/config/h8300/h8300-common.c: Moved to... * common/config/h8300/h8300-common.cc: ...here. * common/config/i386/i386-common.c: Moved to... * common/config/i386/i386-common.cc: ...here. * common/config/ia64/ia64-common.c: Moved to... * common/config/ia64/ia64-common.cc: ...here. * common/config/iq2000/iq2000-common.c: Moved to... * common/config/iq2000/iq2000-common.cc: ...here. * common/config/lm32/lm32-common.c: Moved to... * common/config/lm32/lm32-common.cc: ...here. * common/config/m32r/m32r-common.c: Moved to... * common/config/m32r/m32r-common.cc: ...here. * common/config/m68k/m68k-common.c: Moved to... * common/config/m68k/m68k-common.cc: ...here. * common/config/mcore/mcore-common.c: Moved to... * common/config/mcore/mcore-common.cc: ...here. * common/config/microblaze/microblaze-common.c: Moved to... * common/config/microblaze/microblaze-common.cc: ...here. * common/config/mips/mips-common.c: Moved to... * common/config/mips/mips-common.cc: ...here. * common/config/mmix/mmix-common.c: Moved to... * common/config/mmix/mmix-common.cc: ...here. * common/config/mn10300/mn10300-common.c: Moved to... * common/config/mn10300/mn10300-common.cc: ...here. * common/config/msp430/msp430-common.c: Moved to... * common/config/msp430/msp430-common.cc: ...here. * common/config/nds32/nds32-common.c: Moved to... * common/config/nds32/nds32-common.cc: ...here. * common/config/nios2/nios2-common.c: Moved to... * common/config/nios2/nios2-common.cc: ...here. * common/config/nvptx/nvptx-common.c: Moved to... * common/config/nvptx/nvptx-common.cc: ...here. * common/config/or1k/or1k-common.c: Moved to... * common/config/or1k/or1k-common.cc: ...here. * common/config/pa/pa-common.c: Moved to... * common/config/pa/pa-common.cc: ...here. * common/config/pdp11/pdp11-common.c: Moved to... * common/config/pdp11/pdp11-common.cc: ...here. * common/config/pru/pru-common.c: Moved to... * common/config/pru/pru-common.cc: ...here. * common/config/riscv/riscv-common.c: Moved to... * common/config/riscv/riscv-common.cc: ...here. * common/config/rs6000/rs6000-common.c: Moved to... * common/config/rs6000/rs6000-common.cc: ...here. * common/config/rx/rx-common.c: Moved to... * common/config/rx/rx-common.cc: ...here. * common/config/s390/s390-common.c: Moved to... * common/config/s390/s390-common.cc: ...here. * common/config/sh/sh-common.c: Moved to... * common/config/sh/sh-common.cc: ...here. * common/config/sparc/sparc-common.c: Moved to... * common/config/sparc/sparc-common.cc: ...here. * common/config/tilegx/tilegx-common.c: Moved to... * common/config/tilegx/tilegx-common.cc: ...here. * common/config/tilepro/tilepro-common.c: Moved to... * common/config/tilepro/tilepro-common.cc: ...here. * common/config/v850/v850-common.c: Moved to... * common/config/v850/v850-common.cc: ...here. * common/config/vax/vax-common.c: Moved to... * common/config/vax/vax-common.cc: ...here. * common/config/visium/visium-common.c: Moved to... * common/config/visium/visium-common.cc: ...here. * common/config/xstormy16/xstormy16-common.c: Moved to... * common/config/xstormy16/xstormy16-common.cc: ...here. * common/config/xtensa/xtensa-common.c: Moved to... * common/config/xtensa/xtensa-common.cc: ...here. * compare-elim.c: Moved to... * compare-elim.cc: ...here. * config/aarch64/aarch64-bti-insert.c: Moved to... * config/aarch64/aarch64-bti-insert.cc: ...here. * config/aarch64/aarch64-builtins.c: Moved to... * config/aarch64/aarch64-builtins.cc: ...here. * config/aarch64/aarch64-c.c: Moved to... * config/aarch64/aarch64-c.cc: ...here. * config/aarch64/aarch64-d.c: Moved to... * config/aarch64/aarch64-d.cc: ...here. * config/aarch64/aarch64.c: Moved to... * config/aarch64/aarch64.cc: ...here. * config/aarch64/cortex-a57-fma-steering.c: Moved to... * config/aarch64/cortex-a57-fma-steering.cc: ...here. * config/aarch64/driver-aarch64.c: Moved to... * config/aarch64/driver-aarch64.cc: ...here. * config/aarch64/falkor-tag-collision-avoidance.c: Moved to... * config/aarch64/falkor-tag-collision-avoidance.cc: ...here. * config/aarch64/host-aarch64-darwin.c: Moved to... * config/aarch64/host-aarch64-darwin.cc: ...here. * config/alpha/alpha.c: Moved to... * config/alpha/alpha.cc: ...here. * config/alpha/driver-alpha.c: Moved to... * config/alpha/driver-alpha.cc: ...here. * config/arc/arc-c.c: Moved to... * config/arc/arc-c.cc: ...here. * config/arc/arc.c: Moved to... * config/arc/arc.cc: ...here. * config/arc/driver-arc.c: Moved to... * config/arc/driver-arc.cc: ...here. * config/arm/aarch-common.c: Moved to... * config/arm/aarch-common.cc: ...here. * config/arm/arm-builtins.c: Moved to... * config/arm/arm-builtins.cc: ...here. * config/arm/arm-c.c: Moved to... * config/arm/arm-c.cc: ...here. * config/arm/arm-d.c: Moved to... * config/arm/arm-d.cc: ...here. * config/arm/arm.c: Moved to... * config/arm/arm.cc: ...here. * config/arm/driver-arm.c: Moved to... * config/arm/driver-arm.cc: ...here. * config/avr/avr-c.c: Moved to... * config/avr/avr-c.cc: ...here. * config/avr/avr-devices.c: Moved to... * config/avr/avr-devices.cc: ...here. * config/avr/avr-log.c: Moved to... * config/avr/avr-log.cc: ...here. * config/avr/avr.c: Moved to... * config/avr/avr.cc: ...here. * config/avr/driver-avr.c: Moved to... * config/avr/driver-avr.cc: ...here. * config/avr/gen-avr-mmcu-specs.c: Moved to... * config/avr/gen-avr-mmcu-specs.cc: ...here. * config/avr/gen-avr-mmcu-texi.c: Moved to... * config/avr/gen-avr-mmcu-texi.cc: ...here. * config/bfin/bfin.c: Moved to... * config/bfin/bfin.cc: ...here. * config/bpf/bpf.c: Moved to... * config/bpf/bpf.cc: ...here. * config/bpf/coreout.c: Moved to... * config/bpf/coreout.cc: ...here. * config/c6x/c6x.c: Moved to... * config/c6x/c6x.cc: ...here. * config/cr16/cr16.c: Moved to... * config/cr16/cr16.cc: ...here. * config/cris/cris.c: Moved to... * config/cris/cris.cc: ...here. * config/csky/csky.c: Moved to... * config/csky/csky.cc: ...here. * config/darwin-c.c: Moved to... * config/darwin-c.cc: ...here. * config/darwin-d.c: Moved to... * config/darwin-d.cc: ...here. * config/darwin-driver.c: Moved to... * config/darwin-driver.cc: ...here. * config/darwin-f.c: Moved to... * config/darwin-f.cc: ...here. * config/darwin.c: Moved to... * config/darwin.cc: ...here. * config/default-c.c: Moved to... * config/default-c.cc: ...here. * config/default-d.c: Moved to... * config/default-d.cc: ...here. * config/dragonfly-d.c: Moved to... * config/dragonfly-d.cc: ...here. * config/epiphany/epiphany.c: Moved to... * config/epiphany/epiphany.cc: ...here. * config/epiphany/mode-switch-use.c: Moved to... * config/epiphany/mode-switch-use.cc: ...here. * config/epiphany/resolve-sw-modes.c: Moved to... * config/epiphany/resolve-sw-modes.cc: ...here. * config/fr30/fr30.c: Moved to... * config/fr30/fr30.cc: ...here. * config/freebsd-d.c: Moved to... * config/freebsd-d.cc: ...here. * config/frv/frv.c: Moved to... * config/frv/frv.cc: ...here. * config/ft32/ft32.c: Moved to... * config/ft32/ft32.cc: ...here. * config/gcn/driver-gcn.c: Moved to... * config/gcn/driver-gcn.cc: ...here. * config/gcn/gcn-run.c: Moved to... * config/gcn/gcn-run.cc: ...here. * config/gcn/gcn-tree.c: Moved to... * config/gcn/gcn-tree.cc: ...here. * config/gcn/gcn.c: Moved to... * config/gcn/gcn.cc: ...here. * config/gcn/mkoffload.c: Moved to... * config/gcn/mkoffload.cc: ...here. * config/glibc-c.c: Moved to... * config/glibc-c.cc: ...here. * config/glibc-d.c: Moved to... * config/glibc-d.cc: ...here. * config/h8300/h8300.c: Moved to... * config/h8300/h8300.cc: ...here. * config/host-darwin.c: Moved to... * config/host-darwin.cc: ...here. * config/host-hpux.c: Moved to... * config/host-hpux.cc: ...here. * config/host-linux.c: Moved to... * config/host-linux.cc: ...here. * config/host-netbsd.c: Moved to... * config/host-netbsd.cc: ...here. * config/host-openbsd.c: Moved to... * config/host-openbsd.cc: ...here. * config/host-solaris.c: Moved to... * config/host-solaris.cc: ...here. * config/i386/djgpp.c: Moved to... * config/i386/djgpp.cc: ...here. * config/i386/driver-i386.c: Moved to... * config/i386/driver-i386.cc: ...here. * config/i386/driver-mingw32.c: Moved to... * config/i386/driver-mingw32.cc: ...here. * config/i386/gnu-property.c: Moved to... * config/i386/gnu-property.cc: ...here. * config/i386/host-cygwin.c: Moved to... * config/i386/host-cygwin.cc: ...here. * config/i386/host-i386-darwin.c: Moved to... * config/i386/host-i386-darwin.cc: ...here. * config/i386/host-mingw32.c: Moved to... * config/i386/host-mingw32.cc: ...here. * config/i386/i386-builtins.c: Moved to... * config/i386/i386-builtins.cc: ...here. * config/i386/i386-c.c: Moved to... * config/i386/i386-c.cc: ...here. * config/i386/i386-d.c: Moved to... * config/i386/i386-d.cc: ...here. * config/i386/i386-expand.c: Moved to... * config/i386/i386-expand.cc: ...here. * config/i386/i386-features.c: Moved to... * config/i386/i386-features.cc: ...here. * config/i386/i386-options.c: Moved to... * config/i386/i386-options.cc: ...here. * config/i386/i386.c: Moved to... * config/i386/i386.cc: ...here. * config/i386/intelmic-mkoffload.c: Moved to... * config/i386/intelmic-mkoffload.cc: ...here. * config/i386/msformat-c.c: Moved to... * config/i386/msformat-c.cc: ...here. * config/i386/winnt-cxx.c: Moved to... * config/i386/winnt-cxx.cc: ...here. * config/i386/winnt-d.c: Moved to... * config/i386/winnt-d.cc: ...here. * config/i386/winnt-stubs.c: Moved to... * config/i386/winnt-stubs.cc: ...here. * config/i386/winnt.c: Moved to... * config/i386/winnt.cc: ...here. * config/i386/x86-tune-sched-atom.c: Moved to... * config/i386/x86-tune-sched-atom.cc: ...here. * config/i386/x86-tune-sched-bd.c: Moved to... * config/i386/x86-tune-sched-bd.cc: ...here. * config/i386/x86-tune-sched-core.c: Moved to... * config/i386/x86-tune-sched-core.cc: ...here. * config/i386/x86-tune-sched.c: Moved to... * config/i386/x86-tune-sched.cc: ...here. * config/ia64/ia64-c.c: Moved to... * config/ia64/ia64-c.cc: ...here. * config/ia64/ia64.c: Moved to... * config/ia64/ia64.cc: ...here. * config/iq2000/iq2000.c: Moved to... * config/iq2000/iq2000.cc: ...here. * config/linux.c: Moved to... * config/linux.cc: ...here. * config/lm32/lm32.c: Moved to... * config/lm32/lm32.cc: ...here. * config/m32c/m32c-pragma.c: Moved to... * config/m32c/m32c-pragma.cc: ...here. * config/m32c/m32c.c: Moved to... * config/m32c/m32c.cc: ...here. * config/m32r/m32r.c: Moved to... * config/m32r/m32r.cc: ...here. * config/m68k/m68k.c: Moved to... * config/m68k/m68k.cc: ...here. * config/mcore/mcore.c: Moved to... * config/mcore/mcore.cc: ...here. * config/microblaze/microblaze-c.c: Moved to... * config/microblaze/microblaze-c.cc: ...here. * config/microblaze/microblaze.c: Moved to... * config/microblaze/microblaze.cc: ...here. * config/mips/driver-native.c: Moved to... * config/mips/driver-native.cc: ...here. * config/mips/frame-header-opt.c: Moved to... * config/mips/frame-header-opt.cc: ...here. * config/mips/mips-d.c: Moved to... * config/mips/mips-d.cc: ...here. * config/mips/mips.c: Moved to... * config/mips/mips.cc: ...here. * config/mmix/mmix.c: Moved to... * config/mmix/mmix.cc: ...here. * config/mn10300/mn10300.c: Moved to... * config/mn10300/mn10300.cc: ...here. * config/moxie/moxie.c: Moved to... * config/moxie/moxie.cc: ...here. * config/msp430/driver-msp430.c: Moved to... * config/msp430/driver-msp430.cc: ...here. * config/msp430/msp430-c.c: Moved to... * config/msp430/msp430-c.cc: ...here. * config/msp430/msp430-devices.c: Moved to... * config/msp430/msp430-devices.cc: ...here. * config/msp430/msp430.c: Moved to... * config/msp430/msp430.cc: ...here. * config/nds32/nds32-cost.c: Moved to... * config/nds32/nds32-cost.cc: ...here. * config/nds32/nds32-fp-as-gp.c: Moved to... * config/nds32/nds32-fp-as-gp.cc: ...here. * config/nds32/nds32-intrinsic.c: Moved to... * config/nds32/nds32-intrinsic.cc: ...here. * config/nds32/nds32-isr.c: Moved to... * config/nds32/nds32-isr.cc: ...here. * config/nds32/nds32-md-auxiliary.c: Moved to... * config/nds32/nds32-md-auxiliary.cc: ...here. * config/nds32/nds32-memory-manipulation.c: Moved to... * config/nds32/nds32-memory-manipulation.cc: ...here. * config/nds32/nds32-pipelines-auxiliary.c: Moved to... * config/nds32/nds32-pipelines-auxiliary.cc: ...here. * config/nds32/nds32-predicates.c: Moved to... * config/nds32/nds32-predicates.cc: ...here. * config/nds32/nds32-relax-opt.c: Moved to... * config/nds32/nds32-relax-opt.cc: ...here. * config/nds32/nds32-utils.c: Moved to... * config/nds32/nds32-utils.cc: ...here. * config/nds32/nds32.c: Moved to... * config/nds32/nds32.cc: ...here. * config/netbsd-d.c: Moved to... * config/netbsd-d.cc: ...here. * config/netbsd.c: Moved to... * config/netbsd.cc: ...here. * config/nios2/nios2.c: Moved to... * config/nios2/nios2.cc: ...here. * config/nvptx/mkoffload.c: Moved to... * config/nvptx/mkoffload.cc: ...here. * config/nvptx/nvptx-c.c: Moved to... * config/nvptx/nvptx-c.cc: ...here. * config/nvptx/nvptx.c: Moved to... * config/nvptx/nvptx.cc: ...here. * config/openbsd-d.c: Moved to... * config/openbsd-d.cc: ...here. * config/or1k/or1k.c: Moved to... * config/or1k/or1k.cc: ...here. * config/pa/pa-d.c: Moved to... * config/pa/pa-d.cc: ...here. * config/pa/pa.c: Moved to... * config/pa/pa.cc: ...here. * config/pdp11/pdp11.c: Moved to... * config/pdp11/pdp11.cc: ...here. * config/pru/pru-passes.c: Moved to... * config/pru/pru-passes.cc: ...here. * config/pru/pru-pragma.c: Moved to... * config/pru/pru-pragma.cc: ...here. * config/pru/pru.c: Moved to... * config/pru/pru.cc: ...here. * config/riscv/riscv-builtins.c: Moved to... * config/riscv/riscv-builtins.cc: ...here. * config/riscv/riscv-c.c: Moved to... * config/riscv/riscv-c.cc: ...here. * config/riscv/riscv-d.c: Moved to... * config/riscv/riscv-d.cc: ...here. * config/riscv/riscv-shorten-memrefs.c: Moved to... * config/riscv/riscv-shorten-memrefs.cc: ...here. * config/riscv/riscv-sr.c: Moved to... * config/riscv/riscv-sr.cc: ...here. * config/riscv/riscv.c: Moved to... * config/riscv/riscv.cc: ...here. * config/rl78/rl78-c.c: Moved to... * config/rl78/rl78-c.cc: ...here. * config/rl78/rl78.c: Moved to... * config/rl78/rl78.cc: ...here. * config/rs6000/driver-rs6000.c: Moved to... * config/rs6000/driver-rs6000.cc: ...here. * config/rs6000/host-darwin.c: Moved to... * config/rs6000/host-darwin.cc: ...here. * config/rs6000/host-ppc64-darwin.c: Moved to... * config/rs6000/host-ppc64-darwin.cc: ...here. * config/rs6000/rbtree.c: Moved to... * config/rs6000/rbtree.cc: ...here. * config/rs6000/rs6000-c.c: Moved to... * config/rs6000/rs6000-c.cc: ...here. * config/rs6000/rs6000-call.c: Moved to... * config/rs6000/rs6000-call.cc: ...here. * config/rs6000/rs6000-d.c: Moved to... * config/rs6000/rs6000-d.cc: ...here. * config/rs6000/rs6000-gen-builtins.c: Moved to... * config/rs6000/rs6000-gen-builtins.cc: ...here. * config/rs6000/rs6000-linux.c: Moved to... * config/rs6000/rs6000-linux.cc: ...here. * config/rs6000/rs6000-logue.c: Moved to... * config/rs6000/rs6000-logue.cc: ...here. * config/rs6000/rs6000-p8swap.c: Moved to... * config/rs6000/rs6000-p8swap.cc: ...here. * config/rs6000/rs6000-pcrel-opt.c: Moved to... * config/rs6000/rs6000-pcrel-opt.cc: ...here. * config/rs6000/rs6000-string.c: Moved to... * config/rs6000/rs6000-string.cc: ...here. * config/rs6000/rs6000.c: Moved to... * config/rs6000/rs6000.cc: ...here. * config/rx/rx.c: Moved to... * config/rx/rx.cc: ...here. * config/s390/driver-native.c: Moved to... * config/s390/driver-native.cc: ...here. * config/s390/s390-c.c: Moved to... * config/s390/s390-c.cc: ...here. * config/s390/s390-d.c: Moved to... * config/s390/s390-d.cc: ...here. * config/s390/s390.c: Moved to... * config/s390/s390.cc: ...here. * config/sh/divtab-sh4-300.c: Moved to... * config/sh/divtab-sh4-300.cc: ...here. * config/sh/divtab-sh4.c: Moved to... * config/sh/divtab-sh4.cc: ...here. * config/sh/divtab.c: Moved to... * config/sh/divtab.cc: ...here. * config/sh/sh-c.c: Moved to... * config/sh/sh-c.cc: ...here. * config/sh/sh.c: Moved to... * config/sh/sh.cc: ...here. * config/sol2-c.c: Moved to... * config/sol2-c.cc: ...here. * config/sol2-cxx.c: Moved to... * config/sol2-cxx.cc: ...here. * config/sol2-d.c: Moved to... * config/sol2-d.cc: ...here. * config/sol2-stubs.c: Moved to... * config/sol2-stubs.cc: ...here. * config/sol2.c: Moved to... * config/sol2.cc: ...here. * config/sparc/driver-sparc.c: Moved to... * config/sparc/driver-sparc.cc: ...here. * config/sparc/sparc-c.c: Moved to... * config/sparc/sparc-c.cc: ...here. * config/sparc/sparc-d.c: Moved to... * config/sparc/sparc-d.cc: ...here. * config/sparc/sparc.c: Moved to... * config/sparc/sparc.cc: ...here. * config/stormy16/stormy16.c: Moved to... * config/stormy16/stormy16.cc: ...here. * config/tilegx/mul-tables.c: Moved to... * config/tilegx/mul-tables.cc: ...here. * config/tilegx/tilegx-c.c: Moved to... * config/tilegx/tilegx-c.cc: ...here. * config/tilegx/tilegx.c: Moved to... * config/tilegx/tilegx.cc: ...here. * config/tilepro/mul-tables.c: Moved to... * config/tilepro/mul-tables.cc: ...here. * config/tilepro/tilepro-c.c: Moved to... * config/tilepro/tilepro-c.cc: ...here. * config/tilepro/tilepro.c: Moved to... * config/tilepro/tilepro.cc: ...here. * config/v850/v850-c.c: Moved to... * config/v850/v850-c.cc: ...here. * config/v850/v850.c: Moved to... * config/v850/v850.cc: ...here. * config/vax/vax.c: Moved to... * config/vax/vax.cc: ...here. * config/visium/visium.c: Moved to... * config/visium/visium.cc: ...here. * config/vms/vms-c.c: Moved to... * config/vms/vms-c.cc: ...here. * config/vms/vms-f.c: Moved to... * config/vms/vms-f.cc: ...here. * config/vms/vms.c: Moved to... * config/vms/vms.cc: ...here. * config/vxworks-c.c: Moved to... * config/vxworks-c.cc: ...here. * config/vxworks.c: Moved to... * config/vxworks.cc: ...here. * config/winnt-c.c: Moved to... * config/winnt-c.cc: ...here. * config/xtensa/xtensa.c: Moved to... * config/xtensa/xtensa.cc: ...here. * context.c: Moved to... * context.cc: ...here. * convert.c: Moved to... * convert.cc: ...here. * coverage.c: Moved to... * coverage.cc: ...here. * cppbuiltin.c: Moved to... * cppbuiltin.cc: ...here. * cppdefault.c: Moved to... * cppdefault.cc: ...here. * cprop.c: Moved to... * cprop.cc: ...here. * cse.c: Moved to... * cse.cc: ...here. * cselib.c: Moved to... * cselib.cc: ...here. * ctfc.c: Moved to... * ctfc.cc: ...here. * ctfout.c: Moved to... * ctfout.cc: ...here. * data-streamer-in.c: Moved to... * data-streamer-in.cc: ...here. * data-streamer-out.c: Moved to... * data-streamer-out.cc: ...here. * data-streamer.c: Moved to... * data-streamer.cc: ...here. * dbgcnt.c: Moved to... * dbgcnt.cc: ...here. * dbxout.c: Moved to... * dbxout.cc: ...here. * dce.c: Moved to... * dce.cc: ...here. * ddg.c: Moved to... * ddg.cc: ...here. * debug.c: Moved to... * debug.cc: ...here. * df-core.c: Moved to... * df-core.cc: ...here. * df-problems.c: Moved to... * df-problems.cc: ...here. * df-scan.c: Moved to... * df-scan.cc: ...here. * dfp.c: Moved to... * dfp.cc: ...here. * diagnostic-color.c: Moved to... * diagnostic-color.cc: ...here. * diagnostic-show-locus.c: Moved to... * diagnostic-show-locus.cc: ...here. * diagnostic-spec.c: Moved to... * diagnostic-spec.cc: ...here. * diagnostic.c: Moved to... * diagnostic.cc: ...here. * dojump.c: Moved to... * dojump.cc: ...here. * dominance.c: Moved to... * dominance.cc: ...here. * domwalk.c: Moved to... * domwalk.cc: ...here. * double-int.c: Moved to... * double-int.cc: ...here. * dse.c: Moved to... * dse.cc: ...here. * dumpfile.c: Moved to... * dumpfile.cc: ...here. * dwarf2asm.c: Moved to... * dwarf2asm.cc: ...here. * dwarf2cfi.c: Moved to... * dwarf2cfi.cc: ...here. * dwarf2ctf.c: Moved to... * dwarf2ctf.cc: ...here. * dwarf2out.c: Moved to... * dwarf2out.cc: ...here. * early-remat.c: Moved to... * early-remat.cc: ...here. * edit-context.c: Moved to... * edit-context.cc: ...here. * emit-rtl.c: Moved to... * emit-rtl.cc: ...here. * errors.c: Moved to... * errors.cc: ...here. * et-forest.c: Moved to... * et-forest.cc: ...here. * except.c: Moved to... * except.cc: ...here. * explow.c: Moved to... * explow.cc: ...here. * expmed.c: Moved to... * expmed.cc: ...here. * expr.c: Moved to... * expr.cc: ...here. * fibonacci_heap.c: Moved to... * fibonacci_heap.cc: ...here. * file-find.c: Moved to... * file-find.cc: ...here. * file-prefix-map.c: Moved to... * file-prefix-map.cc: ...here. * final.c: Moved to... * final.cc: ...here. * fixed-value.c: Moved to... * fixed-value.cc: ...here. * fold-const-call.c: Moved to... * fold-const-call.cc: ...here. * fold-const.c: Moved to... * fold-const.cc: ...here. * fp-test.c: Moved to... * fp-test.cc: ...here. * function-tests.c: Moved to... * function-tests.cc: ...here. * function.c: Moved to... * function.cc: ...here. * fwprop.c: Moved to... * fwprop.cc: ...here. * gcc-ar.c: Moved to... * gcc-ar.cc: ...here. * gcc-main.c: Moved to... * gcc-main.cc: ...here. * gcc-rich-location.c: Moved to... * gcc-rich-location.cc: ...here. * gcc.c: Moved to... * gcc.cc: ...here. * gcov-dump.c: Moved to... * gcov-dump.cc: ...here. * gcov-io.c: Moved to... * gcov-io.cc: ...here. * gcov-tool.c: Moved to... * gcov-tool.cc: ...here. * gcov.c: Moved to... * gcov.cc: ...here. * gcse-common.c: Moved to... * gcse-common.cc: ...here. * gcse.c: Moved to... * gcse.cc: ...here. * genattr-common.c: Moved to... * genattr-common.cc: ...here. * genattr.c: Moved to... * genattr.cc: ...here. * genattrtab.c: Moved to... * genattrtab.cc: ...here. * genautomata.c: Moved to... * genautomata.cc: ...here. * gencfn-macros.c: Moved to... * gencfn-macros.cc: ...here. * gencheck.c: Moved to... * gencheck.cc: ...here. * genchecksum.c: Moved to... * genchecksum.cc: ...here. * gencodes.c: Moved to... * gencodes.cc: ...here. * genconditions.c: Moved to... * genconditions.cc: ...here. * genconfig.c: Moved to... * genconfig.cc: ...here. * genconstants.c: Moved to... * genconstants.cc: ...here. * genemit.c: Moved to... * genemit.cc: ...here. * genenums.c: Moved to... * genenums.cc: ...here. * generic-match-head.c: Moved to... * generic-match-head.cc: ...here. * genextract.c: Moved to... * genextract.cc: ...here. * genflags.c: Moved to... * genflags.cc: ...here. * gengenrtl.c: Moved to... * gengenrtl.cc: ...here. * gengtype-parse.c: Moved to... * gengtype-parse.cc: ...here. * gengtype-state.c: Moved to... * gengtype-state.cc: ...here. * gengtype.c: Moved to... * gengtype.cc: ...here. * genhooks.c: Moved to... * genhooks.cc: ...here. * genmatch.c: Moved to... * genmatch.cc: ...here. * genmddeps.c: Moved to... * genmddeps.cc: ...here. * genmddump.c: Moved to... * genmddump.cc: ...here. * genmodes.c: Moved to... * genmodes.cc: ...here. * genopinit.c: Moved to... * genopinit.cc: ...here. * genoutput.c: Moved to... * genoutput.cc: ...here. * genpeep.c: Moved to... * genpeep.cc: ...here. * genpreds.c: Moved to... * genpreds.cc: ...here. * genrecog.c: Moved to... * genrecog.cc: ...here. * gensupport.c: Moved to... * gensupport.cc: ...here. * gentarget-def.c: Moved to... * gentarget-def.cc: ...here. * genversion.c: Moved to... * genversion.cc: ...here. * ggc-common.c: Moved to... * ggc-common.cc: ...here. * ggc-none.c: Moved to... * ggc-none.cc: ...here. * ggc-page.c: Moved to... * ggc-page.cc: ...here. * ggc-tests.c: Moved to... * ggc-tests.cc: ...here. * gimple-builder.c: Moved to... * gimple-builder.cc: ...here. * gimple-expr.c: Moved to... * gimple-expr.cc: ...here. * gimple-fold.c: Moved to... * gimple-fold.cc: ...here. * gimple-iterator.c: Moved to... * gimple-iterator.cc: ...here. * gimple-laddress.c: Moved to... * gimple-laddress.cc: ...here. * gimple-loop-jam.c: Moved to... * gimple-loop-jam.cc: ...here. * gimple-low.c: Moved to... * gimple-low.cc: ...here. * gimple-match-head.c: Moved to... * gimple-match-head.cc: ...here. * gimple-pretty-print.c: Moved to... * gimple-pretty-print.cc: ...here. * gimple-ssa-backprop.c: Moved to... * gimple-ssa-backprop.cc: ...here. * gimple-ssa-evrp-analyze.c: Moved to... * gimple-ssa-evrp-analyze.cc: ...here. * gimple-ssa-evrp.c: Moved to... * gimple-ssa-evrp.cc: ...here. * gimple-ssa-isolate-paths.c: Moved to... * gimple-ssa-isolate-paths.cc: ...here. * gimple-ssa-nonnull-compare.c: Moved to... * gimple-ssa-nonnull-compare.cc: ...here. * gimple-ssa-split-paths.c: Moved to... * gimple-ssa-split-paths.cc: ...here. * gimple-ssa-sprintf.c: Moved to... * gimple-ssa-sprintf.cc: ...here. * gimple-ssa-store-merging.c: Moved to... * gimple-ssa-store-merging.cc: ...here. * gimple-ssa-strength-reduction.c: Moved to... * gimple-ssa-strength-reduction.cc: ...here. * gimple-ssa-warn-alloca.c: Moved to... * gimple-ssa-warn-alloca.cc: ...here. * gimple-ssa-warn-restrict.c: Moved to... * gimple-ssa-warn-restrict.cc: ...here. * gimple-streamer-in.c: Moved to... * gimple-streamer-in.cc: ...here. * gimple-streamer-out.c: Moved to... * gimple-streamer-out.cc: ...here. * gimple-walk.c: Moved to... * gimple-walk.cc: ...here. * gimple-warn-recursion.c: Moved to... * gimple-warn-recursion.cc: ...here. * gimple.c: Moved to... * gimple.cc: ...here. * gimplify-me.c: Moved to... * gimplify-me.cc: ...here. * gimplify.c: Moved to... * gimplify.cc: ...here. * godump.c: Moved to... * godump.cc: ...here. * graph.c: Moved to... * graph.cc: ...here. * graphds.c: Moved to... * graphds.cc: ...here. * graphite-dependences.c: Moved to... * graphite-dependences.cc: ...here. * graphite-isl-ast-to-gimple.c: Moved to... * graphite-isl-ast-to-gimple.cc: ...here. * graphite-optimize-isl.c: Moved to... * graphite-optimize-isl.cc: ...here. * graphite-poly.c: Moved to... * graphite-poly.cc: ...here. * graphite-scop-detection.c: Moved to... * graphite-scop-detection.cc: ...here. * graphite-sese-to-poly.c: Moved to... * graphite-sese-to-poly.cc: ...here. * graphite.c: Moved to... * graphite.cc: ...here. * haifa-sched.c: Moved to... * haifa-sched.cc: ...here. * hash-map-tests.c: Moved to... * hash-map-tests.cc: ...here. * hash-set-tests.c: Moved to... * hash-set-tests.cc: ...here. * hash-table.c: Moved to... * hash-table.cc: ...here. * hooks.c: Moved to... * hooks.cc: ...here. * host-default.c: Moved to... * host-default.cc: ...here. * hw-doloop.c: Moved to... * hw-doloop.cc: ...here. * hwint.c: Moved to... * hwint.cc: ...here. * ifcvt.c: Moved to... * ifcvt.cc: ...here. * inchash.c: Moved to... * inchash.cc: ...here. * incpath.c: Moved to... * incpath.cc: ...here. * init-regs.c: Moved to... * init-regs.cc: ...here. * input.c: Moved to... * input.cc: ...here. * internal-fn.c: Moved to... * internal-fn.cc: ...here. * intl.c: Moved to... * intl.cc: ...here. * ipa-comdats.c: Moved to... * ipa-comdats.cc: ...here. * ipa-cp.c: Moved to... * ipa-cp.cc: ...here. * ipa-devirt.c: Moved to... * ipa-devirt.cc: ...here. * ipa-fnsummary.c: Moved to... * ipa-fnsummary.cc: ...here. * ipa-icf-gimple.c: Moved to... * ipa-icf-gimple.cc: ...here. * ipa-icf.c: Moved to... * ipa-icf.cc: ...here. * ipa-inline-analysis.c: Moved to... * ipa-inline-analysis.cc: ...here. * ipa-inline-transform.c: Moved to... * ipa-inline-transform.cc: ...here. * ipa-inline.c: Moved to... * ipa-inline.cc: ...here. * ipa-modref-tree.c: Moved to... * ipa-modref-tree.cc: ...here. * ipa-modref.c: Moved to... * ipa-modref.cc: ...here. * ipa-param-manipulation.c: Moved to... * ipa-param-manipulation.cc: ...here. * ipa-polymorphic-call.c: Moved to... * ipa-polymorphic-call.cc: ...here. * ipa-predicate.c: Moved to... * ipa-predicate.cc: ...here. * ipa-profile.c: Moved to... * ipa-profile.cc: ...here. * ipa-prop.c: Moved to... * ipa-prop.cc: ...here. * ipa-pure-const.c: Moved to... * ipa-pure-const.cc: ...here. * ipa-ref.c: Moved to... * ipa-ref.cc: ...here. * ipa-reference.c: Moved to... * ipa-reference.cc: ...here. * ipa-split.c: Moved to... * ipa-split.cc: ...here. * ipa-sra.c: Moved to... * ipa-sra.cc: ...here. * ipa-utils.c: Moved to... * ipa-utils.cc: ...here. * ipa-visibility.c: Moved to... * ipa-visibility.cc: ...here. * ipa.c: Moved to... * ipa.cc: ...here. * ira-build.c: Moved to... * ira-build.cc: ...here. * ira-color.c: Moved to... * ira-color.cc: ...here. * ira-conflicts.c: Moved to... * ira-conflicts.cc: ...here. * ira-costs.c: Moved to... * ira-costs.cc: ...here. * ira-emit.c: Moved to... * ira-emit.cc: ...here. * ira-lives.c: Moved to... * ira-lives.cc: ...here. * ira.c: Moved to... * ira.cc: ...here. * jump.c: Moved to... * jump.cc: ...here. * langhooks.c: Moved to... * langhooks.cc: ...here. * lcm.c: Moved to... * lcm.cc: ...here. * lists.c: Moved to... * lists.cc: ...here. * loop-doloop.c: Moved to... * loop-doloop.cc: ...here. * loop-init.c: Moved to... * loop-init.cc: ...here. * loop-invariant.c: Moved to... * loop-invariant.cc: ...here. * loop-iv.c: Moved to... * loop-iv.cc: ...here. * loop-unroll.c: Moved to... * loop-unroll.cc: ...here. * lower-subreg.c: Moved to... * lower-subreg.cc: ...here. * lra-assigns.c: Moved to... * lra-assigns.cc: ...here. * lra-coalesce.c: Moved to... * lra-coalesce.cc: ...here. * lra-constraints.c: Moved to... * lra-constraints.cc: ...here. * lra-eliminations.c: Moved to... * lra-eliminations.cc: ...here. * lra-lives.c: Moved to... * lra-lives.cc: ...here. * lra-remat.c: Moved to... * lra-remat.cc: ...here. * lra-spills.c: Moved to... * lra-spills.cc: ...here. * lra.c: Moved to... * lra.cc: ...here. * lto-cgraph.c: Moved to... * lto-cgraph.cc: ...here. * lto-compress.c: Moved to... * lto-compress.cc: ...here. * lto-opts.c: Moved to... * lto-opts.cc: ...here. * lto-section-in.c: Moved to... * lto-section-in.cc: ...here. * lto-section-out.c: Moved to... * lto-section-out.cc: ...here. * lto-streamer-in.c: Moved to... * lto-streamer-in.cc: ...here. * lto-streamer-out.c: Moved to... * lto-streamer-out.cc: ...here. * lto-streamer.c: Moved to... * lto-streamer.cc: ...here. * lto-wrapper.c: Moved to... * lto-wrapper.cc: ...here. * main.c: Moved to... * main.cc: ...here. * mcf.c: Moved to... * mcf.cc: ...here. * mode-switching.c: Moved to... * mode-switching.cc: ...here. * modulo-sched.c: Moved to... * modulo-sched.cc: ...here. * multiple_target.c: Moved to... * multiple_target.cc: ...here. * omp-expand.c: Moved to... * omp-expand.cc: ...here. * omp-general.c: Moved to... * omp-general.cc: ...here. * omp-low.c: Moved to... * omp-low.cc: ...here. * omp-offload.c: Moved to... * omp-offload.cc: ...here. * omp-simd-clone.c: Moved to... * omp-simd-clone.cc: ...here. * opt-suggestions.c: Moved to... * opt-suggestions.cc: ...here. * optabs-libfuncs.c: Moved to... * optabs-libfuncs.cc: ...here. * optabs-query.c: Moved to... * optabs-query.cc: ...here. * optabs-tree.c: Moved to... * optabs-tree.cc: ...here. * optabs.c: Moved to... * optabs.cc: ...here. * opts-common.c: Moved to... * opts-common.cc: ...here. * opts-global.c: Moved to... * opts-global.cc: ...here. * opts.c: Moved to... * opts.cc: ...here. * passes.c: Moved to... * passes.cc: ...here. * plugin.c: Moved to... * plugin.cc: ...here. * postreload-gcse.c: Moved to... * postreload-gcse.cc: ...here. * postreload.c: Moved to... * postreload.cc: ...here. * predict.c: Moved to... * predict.cc: ...here. * prefix.c: Moved to... * prefix.cc: ...here. * pretty-print.c: Moved to... * pretty-print.cc: ...here. * print-rtl-function.c: Moved to... * print-rtl-function.cc: ...here. * print-rtl.c: Moved to... * print-rtl.cc: ...here. * print-tree.c: Moved to... * print-tree.cc: ...here. * profile-count.c: Moved to... * profile-count.cc: ...here. * profile.c: Moved to... * profile.cc: ...here. * read-md.c: Moved to... * read-md.cc: ...here. * read-rtl-function.c: Moved to... * read-rtl-function.cc: ...here. * read-rtl.c: Moved to... * read-rtl.cc: ...here. * real.c: Moved to... * real.cc: ...here. * realmpfr.c: Moved to... * realmpfr.cc: ...here. * recog.c: Moved to... * recog.cc: ...here. * ree.c: Moved to... * ree.cc: ...here. * reg-stack.c: Moved to... * reg-stack.cc: ...here. * regcprop.c: Moved to... * regcprop.cc: ...here. * reginfo.c: Moved to... * reginfo.cc: ...here. * regrename.c: Moved to... * regrename.cc: ...here. * regstat.c: Moved to... * regstat.cc: ...here. * reload.c: Moved to... * reload.cc: ...here. * reload1.c: Moved to... * reload1.cc: ...here. * reorg.c: Moved to... * reorg.cc: ...here. * resource.c: Moved to... * resource.cc: ...here. * rtl-error.c: Moved to... * rtl-error.cc: ...here. * rtl-tests.c: Moved to... * rtl-tests.cc: ...here. * rtl.c: Moved to... * rtl.cc: ...here. * rtlanal.c: Moved to... * rtlanal.cc: ...here. * rtlhash.c: Moved to... * rtlhash.cc: ...here. * rtlhooks.c: Moved to... * rtlhooks.cc: ...here. * rtx-vector-builder.c: Moved to... * rtx-vector-builder.cc: ...here. * run-rtl-passes.c: Moved to... * run-rtl-passes.cc: ...here. * sancov.c: Moved to... * sancov.cc: ...here. * sanopt.c: Moved to... * sanopt.cc: ...here. * sbitmap.c: Moved to... * sbitmap.cc: ...here. * sched-deps.c: Moved to... * sched-deps.cc: ...here. * sched-ebb.c: Moved to... * sched-ebb.cc: ...here. * sched-rgn.c: Moved to... * sched-rgn.cc: ...here. * sel-sched-dump.c: Moved to... * sel-sched-dump.cc: ...here. * sel-sched-ir.c: Moved to... * sel-sched-ir.cc: ...here. * sel-sched.c: Moved to... * sel-sched.cc: ...here. * selftest-diagnostic.c: Moved to... * selftest-diagnostic.cc: ...here. * selftest-rtl.c: Moved to... * selftest-rtl.cc: ...here. * selftest-run-tests.c: Moved to... * selftest-run-tests.cc: ...here. * selftest.c: Moved to... * selftest.cc: ...here. * sese.c: Moved to... * sese.cc: ...here. * shrink-wrap.c: Moved to... * shrink-wrap.cc: ...here. * simplify-rtx.c: Moved to... * simplify-rtx.cc: ...here. * sparseset.c: Moved to... * sparseset.cc: ...here. * spellcheck-tree.c: Moved to... * spellcheck-tree.cc: ...here. * spellcheck.c: Moved to... * spellcheck.cc: ...here. * sreal.c: Moved to... * sreal.cc: ...here. * stack-ptr-mod.c: Moved to... * stack-ptr-mod.cc: ...here. * statistics.c: Moved to... * statistics.cc: ...here. * stmt.c: Moved to... * stmt.cc: ...here. * stor-layout.c: Moved to... * stor-layout.cc: ...here. * store-motion.c: Moved to... * store-motion.cc: ...here. * streamer-hooks.c: Moved to... * streamer-hooks.cc: ...here. * stringpool.c: Moved to... * stringpool.cc: ...here. * substring-locations.c: Moved to... * substring-locations.cc: ...here. * symtab.c: Moved to... * symtab.cc: ...here. * target-globals.c: Moved to... * target-globals.cc: ...here. * targhooks.c: Moved to... * targhooks.cc: ...here. * timevar.c: Moved to... * timevar.cc: ...here. * toplev.c: Moved to... * toplev.cc: ...here. * tracer.c: Moved to... * tracer.cc: ...here. * trans-mem.c: Moved to... * trans-mem.cc: ...here. * tree-affine.c: Moved to... * tree-affine.cc: ...here. * tree-call-cdce.c: Moved to... * tree-call-cdce.cc: ...here. * tree-cfg.c: Moved to... * tree-cfg.cc: ...here. * tree-cfgcleanup.c: Moved to... * tree-cfgcleanup.cc: ...here. * tree-chrec.c: Moved to... * tree-chrec.cc: ...here. * tree-complex.c: Moved to... * tree-complex.cc: ...here. * tree-data-ref.c: Moved to... * tree-data-ref.cc: ...here. * tree-dfa.c: Moved to... * tree-dfa.cc: ...here. * tree-diagnostic.c: Moved to... * tree-diagnostic.cc: ...here. * tree-dump.c: Moved to... * tree-dump.cc: ...here. * tree-eh.c: Moved to... * tree-eh.cc: ...here. * tree-emutls.c: Moved to... * tree-emutls.cc: ...here. * tree-if-conv.c: Moved to... * tree-if-conv.cc: ...here. * tree-inline.c: Moved to... * tree-inline.cc: ...here. * tree-into-ssa.c: Moved to... * tree-into-ssa.cc: ...here. * tree-iterator.c: Moved to... * tree-iterator.cc: ...here. * tree-loop-distribution.c: Moved to... * tree-loop-distribution.cc: ...here. * tree-nested.c: Moved to... * tree-nested.cc: ...here. * tree-nrv.c: Moved to... * tree-nrv.cc: ...here. * tree-object-size.c: Moved to... * tree-object-size.cc: ...here. * tree-outof-ssa.c: Moved to... * tree-outof-ssa.cc: ...here. * tree-parloops.c: Moved to... * tree-parloops.cc: ...here. * tree-phinodes.c: Moved to... * tree-phinodes.cc: ...here. * tree-predcom.c: Moved to... * tree-predcom.cc: ...here. * tree-pretty-print.c: Moved to... * tree-pretty-print.cc: ...here. * tree-profile.c: Moved to... * tree-profile.cc: ...here. * tree-scalar-evolution.c: Moved to... * tree-scalar-evolution.cc: ...here. * tree-sra.c: Moved to... * tree-sra.cc: ...here. * tree-ssa-address.c: Moved to... * tree-ssa-address.cc: ...here. * tree-ssa-alias.c: Moved to... * tree-ssa-alias.cc: ...here. * tree-ssa-ccp.c: Moved to... * tree-ssa-ccp.cc: ...here. * tree-ssa-coalesce.c: Moved to... * tree-ssa-coalesce.cc: ...here. * tree-ssa-copy.c: Moved to... * tree-ssa-copy.cc: ...here. * tree-ssa-dce.c: Moved to... * tree-ssa-dce.cc: ...here. * tree-ssa-dom.c: Moved to... * tree-ssa-dom.cc: ...here. * tree-ssa-dse.c: Moved to... * tree-ssa-dse.cc: ...here. * tree-ssa-forwprop.c: Moved to... * tree-ssa-forwprop.cc: ...here. * tree-ssa-ifcombine.c: Moved to... * tree-ssa-ifcombine.cc: ...here. * tree-ssa-live.c: Moved to... * tree-ssa-live.cc: ...here. * tree-ssa-loop-ch.c: Moved to... * tree-ssa-loop-ch.cc: ...here. * tree-ssa-loop-im.c: Moved to... * tree-ssa-loop-im.cc: ...here. * tree-ssa-loop-ivcanon.c: Moved to... * tree-ssa-loop-ivcanon.cc: ...here. * tree-ssa-loop-ivopts.c: Moved to... * tree-ssa-loop-ivopts.cc: ...here. * tree-ssa-loop-manip.c: Moved to... * tree-ssa-loop-manip.cc: ...here. * tree-ssa-loop-niter.c: Moved to... * tree-ssa-loop-niter.cc: ...here. * tree-ssa-loop-prefetch.c: Moved to... * tree-ssa-loop-prefetch.cc: ...here. * tree-ssa-loop-split.c: Moved to... * tree-ssa-loop-split.cc: ...here. * tree-ssa-loop-unswitch.c: Moved to... * tree-ssa-loop-unswitch.cc: ...here. * tree-ssa-loop.c: Moved to... * tree-ssa-loop.cc: ...here. * tree-ssa-math-opts.c: Moved to... * tree-ssa-math-opts.cc: ...here. * tree-ssa-operands.c: Moved to... * tree-ssa-operands.cc: ...here. * tree-ssa-phiopt.c: Moved to... * tree-ssa-phiopt.cc: ...here. * tree-ssa-phiprop.c: Moved to... * tree-ssa-phiprop.cc: ...here. * tree-ssa-pre.c: Moved to... * tree-ssa-pre.cc: ...here. * tree-ssa-propagate.c: Moved to... * tree-ssa-propagate.cc: ...here. * tree-ssa-reassoc.c: Moved to... * tree-ssa-reassoc.cc: ...here. * tree-ssa-sccvn.c: Moved to... * tree-ssa-sccvn.cc: ...here. * tree-ssa-scopedtables.c: Moved to... * tree-ssa-scopedtables.cc: ...here. * tree-ssa-sink.c: Moved to... * tree-ssa-sink.cc: ...here. * tree-ssa-strlen.c: Moved to... * tree-ssa-strlen.cc: ...here. * tree-ssa-structalias.c: Moved to... * tree-ssa-structalias.cc: ...here. * tree-ssa-tail-merge.c: Moved to... * tree-ssa-tail-merge.cc: ...here. * tree-ssa-ter.c: Moved to... * tree-ssa-ter.cc: ...here. * tree-ssa-threadbackward.c: Moved to... * tree-ssa-threadbackward.cc: ...here. * tree-ssa-threadedge.c: Moved to... * tree-ssa-threadedge.cc: ...here. * tree-ssa-threadupdate.c: Moved to... * tree-ssa-threadupdate.cc: ...here. * tree-ssa-uncprop.c: Moved to... * tree-ssa-uncprop.cc: ...here. * tree-ssa-uninit.c: Moved to... * tree-ssa-uninit.cc: ...here. * tree-ssa.c: Moved to... * tree-ssa.cc: ...here. * tree-ssanames.c: Moved to... * tree-ssanames.cc: ...here. * tree-stdarg.c: Moved to... * tree-stdarg.cc: ...here. * tree-streamer-in.c: Moved to... * tree-streamer-in.cc: ...here. * tree-streamer-out.c: Moved to... * tree-streamer-out.cc: ...here. * tree-streamer.c: Moved to... * tree-streamer.cc: ...here. * tree-switch-conversion.c: Moved to... * tree-switch-conversion.cc: ...here. * tree-tailcall.c: Moved to... * tree-tailcall.cc: ...here. * tree-vect-data-refs.c: Moved to... * tree-vect-data-refs.cc: ...here. * tree-vect-generic.c: Moved to... * tree-vect-generic.cc: ...here. * tree-vect-loop-manip.c: Moved to... * tree-vect-loop-manip.cc: ...here. * tree-vect-loop.c: Moved to... * tree-vect-loop.cc: ...here. * tree-vect-patterns.c: Moved to... * tree-vect-patterns.cc: ...here. * tree-vect-slp-patterns.c: Moved to... * tree-vect-slp-patterns.cc: ...here. * tree-vect-slp.c: Moved to... * tree-vect-slp.cc: ...here. * tree-vect-stmts.c: Moved to... * tree-vect-stmts.cc: ...here. * tree-vector-builder.c: Moved to... * tree-vector-builder.cc: ...here. * tree-vectorizer.c: Moved to... * tree-vectorizer.cc: ...here. * tree-vrp.c: Moved to... * tree-vrp.cc: ...here. * tree.c: Moved to... * tree.cc: ...here. * tsan.c: Moved to... * tsan.cc: ...here. * typed-splay-tree.c: Moved to... * typed-splay-tree.cc: ...here. * ubsan.c: Moved to... * ubsan.cc: ...here. * valtrack.c: Moved to... * valtrack.cc: ...here. * value-prof.c: Moved to... * value-prof.cc: ...here. * var-tracking.c: Moved to... * var-tracking.cc: ...here. * varasm.c: Moved to... * varasm.cc: ...here. * varpool.c: Moved to... * varpool.cc: ...here. * vec-perm-indices.c: Moved to... * vec-perm-indices.cc: ...here. * vec.c: Moved to... * vec.cc: ...here. * vmsdbgout.c: Moved to... * vmsdbgout.cc: ...here. * vr-values.c: Moved to... * vr-values.cc: ...here. * vtable-verify.c: Moved to... * vtable-verify.cc: ...here. * web.c: Moved to... * web.cc: ...here. * xcoffout.c: Moved to... * xcoffout.cc: ...here. gcc/c-family/ChangeLog: * c-ada-spec.c: Moved to... * c-ada-spec.cc: ...here. * c-attribs.c: Moved to... * c-attribs.cc: ...here. * c-common.c: Moved to... * c-common.cc: ...here. * c-cppbuiltin.c: Moved to... * c-cppbuiltin.cc: ...here. * c-dump.c: Moved to... * c-dump.cc: ...here. * c-format.c: Moved to... * c-format.cc: ...here. * c-gimplify.c: Moved to... * c-gimplify.cc: ...here. * c-indentation.c: Moved to... * c-indentation.cc: ...here. * c-lex.c: Moved to... * c-lex.cc: ...here. * c-omp.c: Moved to... * c-omp.cc: ...here. * c-opts.c: Moved to... * c-opts.cc: ...here. * c-pch.c: Moved to... * c-pch.cc: ...here. * c-ppoutput.c: Moved to... * c-ppoutput.cc: ...here. * c-pragma.c: Moved to... * c-pragma.cc: ...here. * c-pretty-print.c: Moved to... * c-pretty-print.cc: ...here. * c-semantics.c: Moved to... * c-semantics.cc: ...here. * c-ubsan.c: Moved to... * c-ubsan.cc: ...here. * c-warn.c: Moved to... * c-warn.cc: ...here. * cppspec.c: Moved to... * cppspec.cc: ...here. * stub-objc.c: Moved to... * stub-objc.cc: ...here. gcc/c/ChangeLog: * c-aux-info.c: Moved to... * c-aux-info.cc: ...here. * c-convert.c: Moved to... * c-convert.cc: ...here. * c-decl.c: Moved to... * c-decl.cc: ...here. * c-errors.c: Moved to... * c-errors.cc: ...here. * c-fold.c: Moved to... * c-fold.cc: ...here. * c-lang.c: Moved to... * c-lang.cc: ...here. * c-objc-common.c: Moved to... * c-objc-common.cc: ...here. * c-parser.c: Moved to... * c-parser.cc: ...here. * c-typeck.c: Moved to... * c-typeck.cc: ...here. * gccspec.c: Moved to... * gccspec.cc: ...here. * gimple-parser.c: Moved to... * gimple-parser.cc: ...here. gcc/cp/ChangeLog: * call.c: Moved to... * call.cc: ...here. * class.c: Moved to... * class.cc: ...here. * constexpr.c: Moved to... * constexpr.cc: ...here. * cp-gimplify.c: Moved to... * cp-gimplify.cc: ...here. * cp-lang.c: Moved to... * cp-lang.cc: ...here. * cp-objcp-common.c: Moved to... * cp-objcp-common.cc: ...here. * cp-ubsan.c: Moved to... * cp-ubsan.cc: ...here. * cvt.c: Moved to... * cvt.cc: ...here. * cxx-pretty-print.c: Moved to... * cxx-pretty-print.cc: ...here. * decl.c: Moved to... * decl.cc: ...here. * decl2.c: Moved to... * decl2.cc: ...here. * dump.c: Moved to... * dump.cc: ...here. * error.c: Moved to... * error.cc: ...here. * except.c: Moved to... * except.cc: ...here. * expr.c: Moved to... * expr.cc: ...here. * friend.c: Moved to... * friend.cc: ...here. * g++spec.c: Moved to... * g++spec.cc: ...here. * init.c: Moved to... * init.cc: ...here. * lambda.c: Moved to... * lambda.cc: ...here. * lex.c: Moved to... * lex.cc: ...here. * mangle.c: Moved to... * mangle.cc: ...here. * method.c: Moved to... * method.cc: ...here. * name-lookup.c: Moved to... * name-lookup.cc: ...here. * optimize.c: Moved to... * optimize.cc: ...here. * parser.c: Moved to... * parser.cc: ...here. * pt.c: Moved to... * pt.cc: ...here. * ptree.c: Moved to... * ptree.cc: ...here. * rtti.c: Moved to... * rtti.cc: ...here. * search.c: Moved to... * search.cc: ...here. * semantics.c: Moved to... * semantics.cc: ...here. * tree.c: Moved to... * tree.cc: ...here. * typeck.c: Moved to... * typeck.cc: ...here. * typeck2.c: Moved to... * typeck2.cc: ...here. * vtable-class-hierarchy.c: Moved to... * vtable-class-hierarchy.cc: ...here. gcc/fortran/ChangeLog: * arith.c: Moved to... * arith.cc: ...here. * array.c: Moved to... * array.cc: ...here. * bbt.c: Moved to... * bbt.cc: ...here. * check.c: Moved to... * check.cc: ...here. * class.c: Moved to... * class.cc: ...here. * constructor.c: Moved to... * constructor.cc: ...here. * convert.c: Moved to... * convert.cc: ...here. * cpp.c: Moved to... * cpp.cc: ...here. * data.c: Moved to... * data.cc: ...here. * decl.c: Moved to... * decl.cc: ...here. * dependency.c: Moved to... * dependency.cc: ...here. * dump-parse-tree.c: Moved to... * dump-parse-tree.cc: ...here. * error.c: Moved to... * error.cc: ...here. * expr.c: Moved to... * expr.cc: ...here. * f95-lang.c: Moved to... * f95-lang.cc: ...here. * frontend-passes.c: Moved to... * frontend-passes.cc: ...here. * gfortranspec.c: Moved to... * gfortranspec.cc: ...here. * interface.c: Moved to... * interface.cc: ...here. * intrinsic.c: Moved to... * intrinsic.cc: ...here. * io.c: Moved to... * io.cc: ...here. * iresolve.c: Moved to... * iresolve.cc: ...here. * match.c: Moved to... * match.cc: ...here. * matchexp.c: Moved to... * matchexp.cc: ...here. * misc.c: Moved to... * misc.cc: ...here. * module.c: Moved to... * module.cc: ...here. * openmp.c: Moved to... * openmp.cc: ...here. * options.c: Moved to... * options.cc: ...here. * parse.c: Moved to... * parse.cc: ...here. * primary.c: Moved to... * primary.cc: ...here. * resolve.c: Moved to... * resolve.cc: ...here. * scanner.c: Moved to... * scanner.cc: ...here. * simplify.c: Moved to... * simplify.cc: ...here. * st.c: Moved to... * st.cc: ...here. * symbol.c: Moved to... * symbol.cc: ...here. * target-memory.c: Moved to... * target-memory.cc: ...here. * trans-array.c: Moved to... * trans-array.cc: ...here. * trans-common.c: Moved to... * trans-common.cc: ...here. * trans-const.c: Moved to... * trans-const.cc: ...here. * trans-decl.c: Moved to... * trans-decl.cc: ...here. * trans-expr.c: Moved to... * trans-expr.cc: ...here. * trans-intrinsic.c: Moved to... * trans-intrinsic.cc: ...here. * trans-io.c: Moved to... * trans-io.cc: ...here. * trans-openmp.c: Moved to... * trans-openmp.cc: ...here. * trans-stmt.c: Moved to... * trans-stmt.cc: ...here. * trans-types.c: Moved to... * trans-types.cc: ...here. * trans.c: Moved to... * trans.cc: ...here. gcc/go/ChangeLog: * go-backend.c: Moved to... * go-backend.cc: ...here. * go-lang.c: Moved to... * go-lang.cc: ...here. * gospec.c: Moved to... * gospec.cc: ...here. gcc/jit/ChangeLog: * dummy-frontend.c: Moved to... * dummy-frontend.cc: ...here. * jit-builtins.c: Moved to... * jit-builtins.cc: ...here. * jit-logging.c: Moved to... * jit-logging.cc: ...here. * jit-playback.c: Moved to... * jit-playback.cc: ...here. * jit-recording.c: Moved to... * jit-recording.cc: ...here. * jit-result.c: Moved to... * jit-result.cc: ...here. * jit-spec.c: Moved to... * jit-spec.cc: ...here. * jit-tempdir.c: Moved to... * jit-tempdir.cc: ...here. * jit-w32.c: Moved to... * jit-w32.cc: ...here. * libgccjit.c: Moved to... * libgccjit.cc: ...here. gcc/lto/ChangeLog: * common.c: Moved to... * common.cc: ...here. * lto-common.c: Moved to... * lto-common.cc: ...here. * lto-dump.c: Moved to... * lto-dump.cc: ...here. * lto-lang.c: Moved to... * lto-lang.cc: ...here. * lto-object.c: Moved to... * lto-object.cc: ...here. * lto-partition.c: Moved to... * lto-partition.cc: ...here. * lto-symtab.c: Moved to... * lto-symtab.cc: ...here. * lto.c: Moved to... * lto.cc: ...here. gcc/objc/ChangeLog: * objc-act.c: Moved to... * objc-act.cc: ...here. * objc-encoding.c: Moved to... * objc-encoding.cc: ...here. * objc-gnu-runtime-abi-01.c: Moved to... * objc-gnu-runtime-abi-01.cc: ...here. * objc-lang.c: Moved to... * objc-lang.cc: ...here. * objc-map.c: Moved to... * objc-map.cc: ...here. * objc-next-runtime-abi-01.c: Moved to... * objc-next-runtime-abi-01.cc: ...here. * objc-next-runtime-abi-02.c: Moved to... * objc-next-runtime-abi-02.cc: ...here. * objc-runtime-shared-support.c: Moved to... * objc-runtime-shared-support.cc: ...here. gcc/objcp/ChangeLog: * objcp-decl.c: Moved to... * objcp-decl.cc: ...here. * objcp-lang.c: Moved to... * objcp-lang.cc: ...here. libcpp/ChangeLog: * charset.c: Moved to... * charset.cc: ...here. * directives.c: Moved to... * directives.cc: ...here. * errors.c: Moved to... * errors.cc: ...here. * expr.c: Moved to... * expr.cc: ...here. * files.c: Moved to... * files.cc: ...here. * identifiers.c: Moved to... * identifiers.cc: ...here. * init.c: Moved to... * init.cc: ...here. * lex.c: Moved to... * lex.cc: ...here. * line-map.c: Moved to... * line-map.cc: ...here. * macro.c: Moved to... * macro.cc: ...here. * makeucnid.c: Moved to... * makeucnid.cc: ...here. * mkdeps.c: Moved to... * mkdeps.cc: ...here. * pch.c: Moved to... * pch.cc: ...here. * symtab.c: Moved to... * symtab.cc: ...here. * traditional.c: Moved to... * traditional.cc: ...here.
Diffstat (limited to 'gcc/objc/objc-gnu-runtime-abi-01.c')
-rw-r--r--gcc/objc/objc-gnu-runtime-abi-01.c2262
1 files changed, 0 insertions, 2262 deletions
diff --git a/gcc/objc/objc-gnu-runtime-abi-01.c b/gcc/objc/objc-gnu-runtime-abi-01.c
deleted file mode 100644
index 8aa2044..0000000
--- a/gcc/objc/objc-gnu-runtime-abi-01.c
+++ /dev/null
@@ -1,2262 +0,0 @@
-/* GNU Runtime ABI version 8
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
- Contributed by Iain Sandoe (split from objc-act.c)
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
-
-#include "config.h"
-#include "system.h"
-#include "coretypes.h"
-#include "options.h"
-#include "tree.h"
-#include "stringpool.h"
-#include "attribs.h"
-
-#ifdef OBJCPLUS
-#include "cp/cp-tree.h"
-#else
-#include "c/c-tree.h"
-#include "c/c-lang.h"
-#endif
-
-#include "langhooks.h"
-#include "c-family/c-objc.h"
-#include "objc-act.h"
-
-/* When building Objective-C++, we are not linking against the C front-end
- and so need to replicate the C tree-construction functions in some way. */
-#ifdef OBJCPLUS
-#define OBJCP_REMAP_FUNCTIONS
-#include "objcp-decl.h"
-#endif /* OBJCPLUS */
-
-#include "toplev.h"
-#include "tree-iterator.h"
-
-#include "objc-runtime-hooks.h"
-#include "objc-runtime-shared-support.h"
-#include "objc-encoding.h"
-
-/* GNU runtime private definitions. */
-#define DEF_CONSTANT_STRING_CLASS_NAME "NXConstantString"
-
-#define TAG_GETCLASS "objc_get_class"
-#define TAG_GETMETACLASS "objc_get_meta_class"
-
-#define TAG_MSGSEND "objc_msg_lookup"
-#define TAG_MSGSENDSUPER "objc_msg_lookup_super"
-
-/* GNU-specific tags. */
-
-#define TAG_EXECCLASS "__objc_exec_class"
-#define TAG_GNUINIT "__objc_gnu_init"
-
-/* The version identifies which language generation and runtime
- the module (file) was compiled for, and is recorded in the
- module descriptor. */
-#define OBJC_VERSION 8
-
-#define PROTOCOL_VERSION 2
-
-/* This macro provides a method of removing ambiguity between runtimes
- when LTO is in use on targets supporting multiple runtimes.
-
- For example, at present, any target that includes an implementation of
- the NeXT runtime needs to place Objective-C meta-data into specific
- named sections. This should _not_ be done for the GNU runtime, and the
- following macro is used to attach Objective-C private attributes that may
- be used to identify the runtime for which the meta-data are intended. */
-
-#define OBJCMETA(DECL,VERS,KIND) \
- if (VERS) \
- DECL_ATTRIBUTES (DECL) = build_tree_list ((VERS), (KIND));
-
-static void gnu_runtime_01_initialize (void);
-
-static void build_selector_template (void);
-
-static tree gnu_runtime_abi_01_super_superclassfield_id (void);
-
-static tree gnu_runtime_abi_01_class_decl (tree);
-static tree gnu_runtime_abi_01_metaclass_decl (tree);
-static tree gnu_runtime_abi_01_category_decl (tree);
-static tree gnu_runtime_abi_01_protocol_decl (tree);
-static tree gnu_runtime_abi_01_string_decl (tree, const char *, string_section);
-
-static tree gnu_runtime_abi_01_get_class_reference (tree);
-static tree gnu_runtime_abi_01_build_typed_selector_reference (location_t, tree,
- tree);
-static tree gnu_runtime_abi_01_get_protocol_reference (location_t, tree);
-static tree gnu_runtime_abi_01_build_ivar_ref (location_t, tree, tree);
-static tree gnu_runtime_abi_01_get_class_super_ref (location_t, struct imp_entry *, bool);
-static tree gnu_runtime_abi_01_get_category_super_ref (location_t, struct imp_entry *, bool);
-
-static tree gnu_runtime_abi_01_receiver_is_class_object (tree);
-static void gnu_runtime_abi_01_get_arg_type_list_base (vec<tree, va_gc> **,
- tree, int, int);
-static tree gnu_runtime_abi_01_build_objc_method_call (location_t, tree, tree,
- tree, tree, tree, int);
-
-static bool gnu_runtime_abi_01_setup_const_string_class_decl (void);
-static tree gnu_runtime_abi_01_build_const_string_constructor (location_t, tree,int);
-
-static void objc_generate_v1_gnu_metadata (void);
-
-static tree objc_eh_runtime_type (tree type);
-static tree objc_eh_personality (void);
-static tree objc_build_exc_ptr (struct objc_try_context **);
-static tree build_throw_stmt (location_t, tree, bool);
-static tree begin_catch (struct objc_try_context **, tree, tree, tree, bool);
-static void finish_catch (struct objc_try_context **, tree);
-static tree finish_try_stmt (struct objc_try_context **);
-
-bool
-objc_gnu_runtime_abi_01_init (objc_runtime_hooks *rthooks)
-{
- /* GNU runtime does not need the compiler to change code in order to do GC. */
- if (flag_objc_gc)
- {
- warning_at (UNKNOWN_LOCATION, 0,
- "%<-fobjc-gc%> is ignored for %<-fgnu-runtime%>");
- flag_objc_gc = 0;
- }
-
- /* Although I guess we could, we don't currently support SJLJ exceptions for the
- GNU runtime. */
- if (flag_objc_sjlj_exceptions)
- {
- inform (UNKNOWN_LOCATION, "%<-fobjc-sjlj-exceptions%> is ignored for %<-fgnu-runtime%>");
- flag_objc_sjlj_exceptions = 0;
- }
-
- /* TODO: Complain if -fobjc-abi-version=N was used. */
-
- /* TODO: Complain if -fobj-nilcheck was used. */
-
- rthooks->initialize = gnu_runtime_01_initialize;
- rthooks->default_constant_string_class_name = DEF_CONSTANT_STRING_CLASS_NAME;
- rthooks->tag_getclass = TAG_GETCLASS;
- rthooks->super_superclassfield_ident = gnu_runtime_abi_01_super_superclassfield_id;
-
- rthooks->class_decl = gnu_runtime_abi_01_class_decl;
- rthooks->metaclass_decl = gnu_runtime_abi_01_metaclass_decl;
- rthooks->category_decl = gnu_runtime_abi_01_category_decl;
- rthooks->protocol_decl = gnu_runtime_abi_01_protocol_decl;
- rthooks->string_decl = gnu_runtime_abi_01_string_decl;
-
- rthooks->get_class_reference = gnu_runtime_abi_01_get_class_reference;
- rthooks->build_selector_reference = gnu_runtime_abi_01_build_typed_selector_reference;
- rthooks->get_protocol_reference = gnu_runtime_abi_01_get_protocol_reference;
- rthooks->build_ivar_reference = gnu_runtime_abi_01_build_ivar_ref;
- rthooks->get_class_super_ref = gnu_runtime_abi_01_get_class_super_ref;
- rthooks->get_category_super_ref = gnu_runtime_abi_01_get_category_super_ref;
-
- rthooks->receiver_is_class_object = gnu_runtime_abi_01_receiver_is_class_object;
- rthooks->get_arg_type_list_base = gnu_runtime_abi_01_get_arg_type_list_base;
- rthooks->build_objc_method_call = gnu_runtime_abi_01_build_objc_method_call;
-
- rthooks->setup_const_string_class_decl =
- gnu_runtime_abi_01_setup_const_string_class_decl;
- rthooks->build_const_string_constructor =
- gnu_runtime_abi_01_build_const_string_constructor;
-
- rthooks->build_throw_stmt = build_throw_stmt;
- rthooks->build_exc_ptr = objc_build_exc_ptr;
- rthooks->begin_catch = begin_catch;
- rthooks->finish_catch = finish_catch;
- rthooks->finish_try_stmt = finish_try_stmt;
-
- rthooks->generate_metadata = objc_generate_v1_gnu_metadata;
- return true;
-}
-
-static void build_selector_table_decl (void);
-static void build_class_template (void);
-static void build_category_template (void);
-static void build_protocol_template (void);
-
-static GTY(()) tree objc_meta;
-static GTY(()) tree meta_base;
-
-static void gnu_runtime_01_initialize (void)
-{
- tree type, ftype, IMP_type;
-
- /* We do not need to mark GNU ObjC metadata for different sections,
- however, we do need to make sure that it is not mistaken for NeXT
- metadata. */
- objc_meta = get_identifier ("OBJC1METG");
- meta_base = get_identifier ("NONE");
-
- /* Declare type of selector-objects that represent an operation name. */
- /* `const struct objc_selector *' */
- type = xref_tag (RECORD_TYPE, get_identifier (TAG_SELECTOR));
- type = build_qualified_type (type, TYPE_QUAL_CONST);
- objc_selector_type = build_pointer_type (type);
-
- /* SEL typedef. */
- type = lang_hooks.decls.pushdecl (build_decl (input_location,
- TYPE_DECL,
- objc_selector_name,
- objc_selector_type));
- suppress_warning (type);
-
- /* typedef id (*IMP)(id, SEL, ...); */
- ftype = build_varargs_function_type_list (objc_object_type,
- objc_object_type,
- objc_selector_type,
- NULL_TREE);
-
- IMP_type = build_pointer_type (ftype);
-
- build_class_template ();
- build_super_template ();
- build_protocol_template ();
- build_category_template ();
-
- /* GNU runtime messenger entry points. */
- /* TREE_NOTHROW is cleared for the message-sending functions,
- because the function that gets called can throw in Obj-C++, or
- could itself call something that can throw even in Obj-C. */
-
- /* IMP objc_msg_lookup (id, SEL); */
- type = build_function_type_list (IMP_type,
- objc_object_type,
- objc_selector_type,
- NULL_TREE);
-
- umsg_decl = add_builtin_function (TAG_MSGSEND,
- type, 0, NOT_BUILT_IN,
- NULL, NULL_TREE);
- TREE_NOTHROW (umsg_decl) = 0;
-
- /* IMP objc_msg_lookup_super (struct objc_super *, SEL); */
- type = build_function_type_list (IMP_type,
- objc_super_type,
- objc_selector_type,
- NULL_TREE);
-
- umsg_super_decl = add_builtin_function (TAG_MSGSENDSUPER,
- type, 0, NOT_BUILT_IN,
- NULL, NULL_TREE);
- TREE_NOTHROW (umsg_super_decl) = 0;
-
- /* The following GNU runtime entry point is called to initialize
- each module:
-
- __objc_exec_class (void *); */
- type = build_function_type_list (void_type_node,
- ptr_type_node,
- NULL_TREE);
-
- execclass_decl = add_builtin_function (TAG_EXECCLASS,
- type, 0, NOT_BUILT_IN,
- NULL, NULL_TREE);
-
- type = build_function_type_list (objc_object_type,
- const_string_type_node,
- NULL_TREE);
-
- /* id objc_getClass (const char *); */
- objc_get_class_decl
- = add_builtin_function (TAG_GETCLASS, type, 0, NOT_BUILT_IN,
- NULL, NULL_TREE);
-
- /* id objc_getMetaClass (const char *); */
- objc_get_meta_class_decl = add_builtin_function (TAG_GETMETACLASS, type,
- 0, NOT_BUILT_IN, NULL,
- NULL_TREE);
-
- /* static SEL _OBJC_SELECTOR_TABLE[]; */
- build_selector_table_decl ();
-
- /* Stuff for properties.
- The codegen relies on this being NULL for GNU. */
- objc_copyStruct_decl = NULL_TREE;
-
- /* This is the type of all of the following functions
- bjc_getPropertyStruct() and objc_setPropertyStruct(). */
- type = build_function_type_list (void_type_node,
- ptr_type_node,
- const_ptr_type_node,
- ptrdiff_type_node,
- boolean_type_node,
- boolean_type_node,
- NULL_TREE);
-
- /* Declare the following function:
- void
- objc_getPropertyStruct (void *destination, const void *source,
- ptrdiff_t size, BOOL is_atomic, BOOL has_strong); */
- objc_getPropertyStruct_decl = add_builtin_function ("objc_getPropertyStruct",
- type, 0, NOT_BUILT_IN,
- NULL, NULL_TREE);
- TREE_NOTHROW (objc_getPropertyStruct_decl) = 0;
- /* Declare the following function:
- void
- objc_setPropertyStruct (void *destination, const void *source,
- ptrdiff_t size, BOOL is_atomic, BOOL has_strong); */
- objc_setPropertyStruct_decl = add_builtin_function ("objc_setPropertyStruct",
- type, 0, NOT_BUILT_IN,
- NULL, NULL_TREE);
- TREE_NOTHROW (objc_setPropertyStruct_decl) = 0;
-
- using_eh_for_cleanups ();
- lang_hooks.eh_runtime_type = objc_eh_runtime_type;
- lang_hooks.eh_personality = objc_eh_personality;
-}
-
-/* --- templates --- */
-/* struct _objc_selector {
- SEL sel_id;
- char *sel_type;
- }; */
-
-static void
-build_selector_template (void)
-{
- tree decls, *chain = NULL;
-
- objc_selector_template = objc_start_struct (get_identifier (UTAG_SELECTOR));
-
- /* SEL sel_id; */
- decls = add_field_decl (objc_selector_type, "sel_id", &chain);
-
- /* char *sel_type; */
- add_field_decl (string_type_node, "sel_type", &chain);
-
- objc_finish_struct (objc_selector_template, decls);
-}
-
-/* struct _objc_class {
- struct _objc_class *isa;
- struct _objc_class *super_class;
- char *name;
- long version;
- long info;
- long instance_size;
- struct _objc_ivar_list *ivars;
- struct _objc_method_list *methods;
- struct sarray *dtable;
- struct _objc_class *subclass_list;
- struct _objc_class *sibling_class;
- struct _objc_protocol_list *protocols;
- void *gc_object_type;
- }; */
-
-static void
-build_class_template (void)
-{
- tree ptype, decls, *chain = NULL;
-
- objc_class_template = objc_start_struct (get_identifier (UTAG_CLASS));
-
- /* struct _objc_class *isa; */
- decls = add_field_decl (build_pointer_type (objc_class_template),
- "isa", &chain);
-
- /* struct _objc_class *super_class; */
- add_field_decl (build_pointer_type (objc_class_template),
- "super_class", &chain);
-
- /* char *name; */
- add_field_decl (string_type_node, "name", &chain);
-
- /* long version; */
- add_field_decl (long_integer_type_node, "version", &chain);
-
- /* long info; */
- add_field_decl (long_integer_type_node, "info", &chain);
-
- /* long instance_size; */
- add_field_decl (long_integer_type_node, "instance_size", &chain);
-
- /* struct _objc_ivar_list *ivars; */
- add_field_decl (objc_ivar_list_ptr,"ivars", &chain);
-
- /* struct _objc_method_list *methods; */
- add_field_decl (objc_method_list_ptr, "methods", &chain);
-
- /* struct sarray *dtable; */
- ptype = build_pointer_type(xref_tag (RECORD_TYPE,
- get_identifier ("sarray")));
- add_field_decl (ptype, "dtable", &chain);
-
- /* struct objc_class *subclass_list; */
- ptype = build_pointer_type (objc_class_template);
- add_field_decl (ptype, "subclass_list", &chain);
-
- /* struct objc_class *sibling_class; */
- ptype = build_pointer_type (objc_class_template);
- add_field_decl (ptype, "sibling_class", &chain);
-
- /* struct _objc_protocol **protocol_list; */
- ptype = build_pointer_type (build_pointer_type
- (xref_tag (RECORD_TYPE,
- get_identifier (UTAG_PROTOCOL))));
- add_field_decl (ptype, "protocol_list", &chain);
-
- /* void *gc_object_type; */
- add_field_decl (build_pointer_type (void_type_node),
- "gc_object_type", &chain);
-
- objc_finish_struct (objc_class_template, decls);
-}
-
-/* struct _objc_category {
- char *category_name;
- char *class_name;
- struct _objc_method_list *instance_methods;
- struct _objc_method_list *class_methods;
- struct _objc_protocol_list *protocols;
- }; */
-
-static void
-build_category_template (void)
-{
- tree ptype, decls, *chain = NULL;
-
- objc_category_template = objc_start_struct (get_identifier (UTAG_CATEGORY));
-
- /* char *category_name; */
- decls = add_field_decl (string_type_node, "category_name", &chain);
-
- /* char *class_name; */
- add_field_decl (string_type_node, "class_name", &chain);
-
- /* struct _objc_method_list *instance_methods; */
- add_field_decl (objc_method_list_ptr, "instance_methods", &chain);
-
- /* struct _objc_method_list *class_methods; */
- add_field_decl (objc_method_list_ptr, "class_methods", &chain);
-
- /* struct _objc_protocol **protocol_list; */
- ptype = build_pointer_type (build_pointer_type (objc_protocol_template));
- add_field_decl (ptype, "protocol_list", &chain);
-
- objc_finish_struct (objc_category_template, decls);
-}
-
-/* struct _objc_protocol {
- struct _objc_class *isa;
- char *protocol_name;
- struct _objc_protocol **protocol_list;
- struct _objc__method_prototype_list *instance_methods;
- struct _objc__method_prototype_list *class_methods;
- }; */
-
-static void
-build_protocol_template (void)
-{
- tree ptype, decls, *chain = NULL;
-
- objc_protocol_template = objc_start_struct (get_identifier (UTAG_PROTOCOL));
-
- /* struct _objc_class *isa; */
- ptype = build_pointer_type (xref_tag (RECORD_TYPE,
- get_identifier (UTAG_CLASS)));
- decls = add_field_decl (ptype, "isa", &chain);
-
- /* char *protocol_name; */
- add_field_decl (string_type_node, "protocol_name", &chain);
-
- /* struct _objc_protocol **protocol_list; */
- ptype = build_pointer_type (build_pointer_type (objc_protocol_template));
- add_field_decl (ptype, "protocol_list", &chain);
-
- /* struct _objc__method_prototype_list *instance_methods; */
- add_field_decl (objc_method_proto_list_ptr, "instance_methods", &chain);
-
- /* struct _objc__method_prototype_list *class_methods; */
- add_field_decl (objc_method_proto_list_ptr, "class_methods", &chain);
-
- objc_finish_struct (objc_protocol_template, decls);
-}
-
-/* --- names, decls + identifiers --- */
-
-static void
-build_selector_table_decl (void)
-{
- tree temp;
-
- build_selector_template ();
- temp = build_array_type (objc_selector_template, NULL_TREE);
-
- UOBJC_SELECTOR_TABLE_decl = start_var_decl (temp, "_OBJC_SELECTOR_TABLE");
- /* Squash `defined but not used' warning check_global_declaration. */
- TREE_USED (UOBJC_SELECTOR_TABLE_decl) = 1;
- OBJCMETA (UOBJC_SELECTOR_TABLE_decl, objc_meta, meta_base);
-}
-
-
-static tree
-gnu_runtime_abi_01_super_superclassfield_id (void)
-{
- if (!super_superclassfield_id)
- super_superclassfield_id = get_identifier ("super_class");
- return super_superclassfield_id;
-}
-
-
-static tree
-gnu_runtime_abi_01_class_decl (tree klass)
-{
- tree decl;
- char buf[BUFSIZE];
- snprintf (buf, BUFSIZE, "_OBJC_Class_%s",
- IDENTIFIER_POINTER (CLASS_NAME (klass)));
- decl = start_var_decl (objc_class_template, buf);
- OBJCMETA (decl, objc_meta, meta_base);
- return decl;
-}
-
-static tree
-gnu_runtime_abi_01_metaclass_decl (tree klass)
-{
- tree decl;
- char buf[BUFSIZE];
- snprintf (buf, BUFSIZE, "_OBJC_MetaClass_%s",
- IDENTIFIER_POINTER (CLASS_NAME (klass)));
- decl = start_var_decl (objc_class_template, buf);
- OBJCMETA (decl, objc_meta, meta_base);
- return decl;
-}
-
-static tree
-gnu_runtime_abi_01_category_decl (tree klass)
-{
- tree decl;
- char buf[BUFSIZE];
- snprintf (buf, BUFSIZE, "_OBJC_Category_%s_on_%s",
- IDENTIFIER_POINTER (CLASS_SUPER_NAME (klass)),
- IDENTIFIER_POINTER (CLASS_NAME (klass)));
- decl = start_var_decl (objc_category_template, buf);
- OBJCMETA (decl, objc_meta, meta_base);
- return decl;
-}
-
-static tree
-gnu_runtime_abi_01_protocol_decl (tree p)
-{
- tree decl;
- char buf[BUFSIZE];
-
- /* static struct _objc_protocol _OBJC_Protocol_<mumble>; */
- snprintf (buf, BUFSIZE, "_OBJC_Protocol_%s",
- IDENTIFIER_POINTER (PROTOCOL_NAME (p)));
- decl = start_var_decl (objc_protocol_template, buf);
- OBJCMETA (decl, objc_meta, meta_base);
- return decl;
-}
-
-static tree
-gnu_runtime_abi_01_string_decl (tree type, const char *name,
- string_section where ATTRIBUTE_UNUSED)
-{
- tree decl = start_var_decl (type, name);
- OBJCMETA (decl, objc_meta, meta_base);
- return decl;
-}
-
-/* --- entry --- */
-
-static tree
-gnu_runtime_abi_01_get_class_reference (tree ident)
-{
- tree params;
-
- add_class_reference (ident);
-
- params = build_tree_list (NULL_TREE, my_build_string_pointer
- (IDENTIFIER_LENGTH (ident) + 1,
- IDENTIFIER_POINTER (ident)));
-
- return build_function_call (input_location, objc_get_class_decl, params);
-}
-
-/* Used by build_function_type_for_method. Append the types for
- receiver & _cmd at the start of a method argument list to ARGTYPES.
- CONTEXT is either METHOD_DEF or METHOD_REF, saying whether we are
- trying to define a method or call one. SUPERFLAG says this is for a
- send to super. METH may be NULL, in the case that there is no
- prototype. */
-
-static void
-gnu_runtime_abi_01_get_arg_type_list_base (vec<tree, va_gc> **argtypes,
- tree meth, int context,
- int superflag ATTRIBUTE_UNUSED)
-{
- tree receiver_type;
-
- if (context == METHOD_DEF && TREE_CODE (meth) == INSTANCE_METHOD_DECL)
- receiver_type = objc_instance_type;
- else
- receiver_type = objc_object_type;
-
- vec_safe_push (*argtypes, receiver_type);
- /* Selector type - will eventually change to `int'. */
- vec_safe_push (*argtypes, objc_selector_type);
-}
-
-/* Unused for GNU runtime. */
-static tree
-gnu_runtime_abi_01_receiver_is_class_object (tree a ATTRIBUTE_UNUSED)
-{
- return NULL_TREE;
-}
-
-/* sel_ref_chain is a list whose "value" fields will be instances of
- identifier_node that represent the selector. LOC is the location of
- the @selector. */
-
-static tree
-gnu_runtime_abi_01_build_typed_selector_reference (location_t loc, tree ident,
- tree prototype)
-{
- tree *chain = &sel_ref_chain;
- tree expr;
- int index = 0;
-
- while (*chain)
- {
- /* When we do a lookup for @selector () we have no idea of the
- prototype - so match the first we find. */
- if (TREE_VALUE (*chain) == ident
- && (!prototype || TREE_PURPOSE (*chain) == prototype))
- goto return_at_index;
-
- index++;
- chain = &TREE_CHAIN (*chain);
- }
-
- *chain = tree_cons (prototype, ident, NULL_TREE);
-
- /* TODO: Use a vec and keep this in it to (a) avoid re-creating and
- (b) provide better diagnostics for the first time an undefined
- selector is used. */
- return_at_index:
- expr = build_unary_op (loc, ADDR_EXPR,
- build_array_ref (loc, UOBJC_SELECTOR_TABLE_decl,
- build_int_cst (NULL_TREE, index)),
- 1);
- return convert (objc_selector_type, expr);
-}
-
-/* Build a tree expression to send OBJECT the operation SELECTOR,
- looking up the method on object LOOKUP_OBJECT (often same as OBJECT),
- assuming the method has prototype METHOD_PROTOTYPE.
- (That is an INSTANCE_METHOD_DECL or CLASS_METHOD_DECL.)
- LOC is the location of the expression to build.
- Use METHOD_PARAMS as list of args to pass to the method.
- If SUPER_FLAG is nonzero, we look up the superclass's method. */
-
-static tree
-build_objc_method_call (location_t loc, int super_flag, tree method_prototype,
- tree lookup_object, tree selector,
- tree method_params)
-{
- tree sender = (super_flag ? umsg_super_decl
- : (flag_objc_direct_dispatch ? umsg_fast_decl
- : umsg_decl));
- tree rcv_p = (super_flag ? objc_super_type : objc_object_type);
- vec<tree, va_gc> *parms;
- vec<tree, va_gc> *tv;
- unsigned nparm = (method_params ? list_length (method_params) : 0);
-
- /* If a prototype for the method to be called exists, then cast
- the sender's return type and arguments to match that of the method.
- Otherwise, leave sender as is. */
- tree ret_type
- = (method_prototype
- ? TREE_VALUE (TREE_TYPE (method_prototype))
- : objc_object_type);
- tree ftype
- = build_function_type_for_method (ret_type, method_prototype,
- METHOD_REF, super_flag);
- tree sender_cast;
- tree method, t;
-
- if (method_prototype && METHOD_TYPE_ATTRIBUTES (method_prototype))
- ftype = build_type_attribute_variant (ftype,
- METHOD_TYPE_ATTRIBUTES
- (method_prototype));
-
- sender_cast = build_pointer_type (ftype);
-
- lookup_object = build_c_cast (loc, rcv_p, lookup_object);
-
- /* Use SAVE_EXPR to avoid evaluating the receiver twice. */
- lookup_object = save_expr (lookup_object);
-
- /* Param list + 2 slots for object and selector. */
- vec_alloc (parms, nparm + 2);
- vec_alloc (tv, 2);
-
- /* First, call the lookup function to get a pointer to the method,
- then cast the pointer, then call it with the method arguments. */
- tv->quick_push (lookup_object);
- tv->quick_push (selector);
- method = build_function_call_vec (loc, vNULL, sender, tv, NULL);
- vec_free (tv);
-
- /* Pass the appropriate object to the method. */
- parms->quick_push ((super_flag ? self_decl : lookup_object));
-
- /* Pass the selector to the method. */
- parms->quick_push (selector);
- /* Now append the remainder of the parms. */
- if (nparm)
- for (; method_params; method_params = TREE_CHAIN (method_params))
- parms->quick_push (TREE_VALUE (method_params));
-
- /* Build an obj_type_ref, with the correct cast for the method call. */
- t = build3 (OBJ_TYPE_REF, sender_cast, method, lookup_object,
- build_int_cst (TREE_TYPE (lookup_object), 0));
- t = build_function_call_vec (loc, vNULL, t, parms, NULL);
- vec_free (parms);
- return t;
-}
-
-static tree
-gnu_runtime_abi_01_build_objc_method_call (location_t loc,
- tree method_prototype,
- tree receiver,
- tree rtype ATTRIBUTE_UNUSED,
- tree sel_name,
- tree method_params,
- int super ATTRIBUTE_UNUSED)
-{
- tree selector =
- gnu_runtime_abi_01_build_typed_selector_reference (loc,
- sel_name,
- method_prototype);
-
- return build_objc_method_call (loc, super, method_prototype, receiver,
- selector, method_params);
-}
-
-static tree
-gnu_runtime_abi_01_get_protocol_reference (location_t loc, tree p)
-{
- tree expr, protocol_struct_type, *chain;
- if (!PROTOCOL_FORWARD_DECL (p))
- PROTOCOL_FORWARD_DECL (p) = gnu_runtime_abi_01_protocol_decl (p);
-
- expr = build_unary_op (loc, ADDR_EXPR, PROTOCOL_FORWARD_DECL (p), 0);
-
- /* ??? Ideally we'd build the reference with objc_protocol_type directly,
- if we have it, rather than converting it here. */
- expr = convert (objc_protocol_type, expr);
-
- /* The @protocol() expression is being compiled into a pointer to a
- statically allocated instance of the Protocol class. To become
- usable at runtime, the 'isa' pointer of the instance need to be
- fixed up at runtime by the runtime library, to point to the
- actual 'Protocol' class. */
-
- /* For the GNU runtime, put the static Protocol instance in the list
- of statically allocated instances, so that we make sure that its
- 'isa' pointer is fixed up at runtime by the GNU runtime library
- to point to the Protocol class (at runtime, when loading the
- module, the GNU runtime library loops on the statically allocated
- instances (as found in the defs field in objc_symtab) and fixups
- all the 'isa' pointers of those objects). */
-
- /* This type is a struct containing the fields of a Protocol
- object. (Cfr. objc_protocol_type instead is the type of a pointer
- to such a struct). */
- protocol_struct_type = xref_tag (RECORD_TYPE,
- get_identifier (PROTOCOL_OBJECT_CLASS_NAME));
-
- /* Look for the list of Protocol statically allocated instances
- to fixup at runtime. Create a new list to hold Protocol
- statically allocated instances, if the list is not found. At
- present there is only another list, holding NSConstantString
- static instances to be fixed up at runtime. */
-
- for (chain = &objc_static_instances;
- *chain && TREE_VALUE (*chain) != protocol_struct_type;
- chain = &TREE_CHAIN (*chain));
-
- if (!*chain)
- {
- *chain = tree_cons (NULL_TREE, protocol_struct_type, NULL_TREE);
- add_objc_string (OBJC_TYPE_NAME (protocol_struct_type),
- class_names);
- }
-
- /* Add this statically allocated instance to the Protocol list. */
- TREE_PURPOSE (*chain) = tree_cons (NULL_TREE,
- PROTOCOL_FORWARD_DECL (p),
- TREE_PURPOSE (*chain));
- return expr;
-}
-
-/* For ABI 8 an IVAR is just a fixed offset in the class struct. */
-
-static tree
-gnu_runtime_abi_01_build_ivar_ref (location_t loc ATTRIBUTE_UNUSED,
- tree base, tree id)
-{
- return objc_build_component_ref (base, id);
-}
-
-/* We build super class references as we need them (but keep them once
- built for the sake of efficiency). */
-
-static tree
-gnu_runtime_abi_01_get_class_super_ref (location_t loc ATTRIBUTE_UNUSED,
- struct imp_entry *imp, bool inst_meth)
-{
- if (inst_meth)
- {
- if (!ucls_super_ref)
- ucls_super_ref =
- objc_build_component_ref (imp->class_decl,
- get_identifier ("super_class"));
- return ucls_super_ref;
- }
- else
- {
- if (!uucls_super_ref)
- uucls_super_ref =
- objc_build_component_ref (imp->meta_decl,
- get_identifier ("super_class"));
- return uucls_super_ref;
- }
-}
-
-static tree
-gnu_runtime_abi_01_get_category_super_ref (location_t loc ATTRIBUTE_UNUSED,
- struct imp_entry *imp, bool inst_meth)
-{
- tree super_name = CLASS_SUPER_NAME (imp->imp_template);
- tree super_class;
-
- add_class_reference (super_name);
- super_class = (inst_meth ? objc_get_class_decl : objc_get_meta_class_decl);
- super_name = my_build_string_pointer (IDENTIFIER_LENGTH (super_name) + 1,
- IDENTIFIER_POINTER (super_name));
- /* super_class = get_{meta_}class("CLASS_SUPER_NAME"); */
- return build_function_call (input_location,
- super_class,
- build_tree_list (NULL_TREE, super_name));
-}
-
-static bool
-gnu_runtime_abi_01_setup_const_string_class_decl (void)
-{
- /* Do nothing, and create no error. */
- return true;
-}
-
-/* Declare a static instance of CLASS_DECL initialized by CONSTRUCTOR. */
-
-static GTY(()) int num_static_inst;
-
-static tree
-objc_add_static_instance (tree constructor, tree class_decl)
-{
- tree *chain, decl;
- char buf[BUFSIZE];
-
- /* Find the list of static instances for the CLASS_DECL. Create one if
- not found. */
- for (chain = &objc_static_instances;
- *chain && TREE_VALUE (*chain) != class_decl;
- chain = &TREE_CHAIN (*chain));
- if (!*chain)
- {
- *chain = tree_cons (NULL_TREE, class_decl, NULL_TREE);
- add_objc_string (OBJC_TYPE_NAME (class_decl), class_names);
- }
-
- snprintf (buf, BUFSIZE, "_OBJC_INSTANCE_%d", num_static_inst++);
- decl = build_decl (input_location,
- VAR_DECL, get_identifier (buf), class_decl);
- TREE_STATIC (decl) = 1;
- DECL_ARTIFICIAL (decl) = 1;
- TREE_USED (decl) = 1;
- DECL_INITIAL (decl) = constructor;
- DECL_CONTEXT (decl) = NULL;
- OBJCMETA (decl, objc_meta, meta_base);
-
- /* We may be writing something else just now.
- Postpone till end of input. */
- DECL_DEFER_OUTPUT (decl) = 1;
- lang_hooks.decls.pushdecl (decl);
- rest_of_decl_compilation (decl, 1, 0);
-
- /* Add the DECL to the head of this CLASS' list. */
- TREE_PURPOSE (*chain) = tree_cons (NULL_TREE, decl, TREE_PURPOSE (*chain));
-
- return decl;
-}
-
-static tree
-gnu_runtime_abi_01_build_const_string_constructor (location_t loc, tree string,
- int length)
-{
- tree constructor, fields;
- vec<constructor_elt, va_gc> *v = NULL;
-
- /* GNU: (NXConstantString *) & ((__builtin_ObjCString) { NULL, string, length }) */
- fields = TYPE_FIELDS (internal_const_str_type);
- CONSTRUCTOR_APPEND_ELT (v, fields, build_int_cst (NULL_TREE, 0));
-
- fields = DECL_CHAIN (fields);
- CONSTRUCTOR_APPEND_ELT (v, fields, build_unary_op (loc,
- ADDR_EXPR, string, 1));
-
- fields = DECL_CHAIN (fields);
- CONSTRUCTOR_APPEND_ELT (v, fields, build_int_cst (NULL_TREE, length));
- constructor = objc_build_constructor (internal_const_str_type, v);
-
- constructor = objc_add_static_instance (constructor, constant_string_type);
- return constructor;
-}
-
-/* --- metadata - module initializer --- */
-
-/* The GNU runtime requires us to provide a static initializer function
- for each module:
-
- static void __objc_gnu_init (void) {
- __objc_exec_class (&L_OBJC_MODULES);
- } */
-
-
-static void
-build_module_initializer_routine (void)
-{
- tree body;
-
-#ifdef OBJCPLUS
- push_lang_context (lang_name_c); /* extern "C" */
-#endif
-
- objc_push_parm (build_decl (input_location,
- PARM_DECL, NULL_TREE, void_type_node));
-#ifdef OBJCPLUS
- objc_start_function (get_identifier (TAG_GNUINIT),
- build_function_type_list (void_type_node, NULL_TREE),
- NULL_TREE, NULL_TREE);
-#else
- objc_start_function (get_identifier (TAG_GNUINIT),
- build_function_type_list (void_type_node, NULL_TREE),
- NULL_TREE, objc_get_parm_info (0, NULL_TREE));
-#endif
- body = c_begin_compound_stmt (true);
- add_stmt (build_function_call
- (input_location,
- execclass_decl,
- build_tree_list
- (NULL_TREE,
- build_unary_op (input_location, ADDR_EXPR,
- UOBJC_MODULES_decl, 0))));
- add_stmt (c_end_compound_stmt (input_location, body, true));
-
- TREE_PUBLIC (current_function_decl) = 0;
-
-#ifndef OBJCPLUS
- /* For Objective-C++, we will need to call __objc_gnu_init
- from objc_generate_static_init_call() below. */
- DECL_STATIC_CONSTRUCTOR (current_function_decl) = 1;
-#endif
-
- GNU_INIT_decl = current_function_decl;
- finish_function ();
-
-#ifdef OBJCPLUS
- pop_lang_context ();
-#endif
-}
-
-#ifdef OBJCPLUS
-/* Return 1 if the __objc_gnu_init function has been synthesized and needs
- to be called by the module initializer routine. */
-
-int
-objc_static_init_needed_p (void)
-{
- return (GNU_INIT_decl != NULL_TREE);
-}
-
-/* Generate a call to the __objc_gnu_init initializer function. */
-
-tree
-objc_generate_static_init_call (tree ctors ATTRIBUTE_UNUSED)
-{
- add_stmt (build_stmt (input_location, EXPR_STMT,
- build_function_call (input_location,
- GNU_INIT_decl, NULL_TREE)));
-
- return ctors;
-}
-#endif /* OBJCPLUS */
-
-/* --- Output GNU Meta-data --- */
-
-static void
-generate_classref_translation_entry (tree chain)
-{
- tree expr, decl, type;
-
- decl = TREE_PURPOSE (chain);
- type = TREE_TYPE (decl);
-
- expr = add_objc_string (TREE_VALUE (chain), class_names);
- expr = convert (type, expr); /* cast! */
-
- /* This is a class reference. It is re-written by the runtime,
- but will be optimized away unless we force it. */
- DECL_PRESERVE_P (decl) = 1;
- OBJCMETA (decl, objc_meta, meta_base);
- finish_var_decl (decl, expr);
- return;
-}
-
-
-static void
-handle_impent (struct imp_entry *impent)
-{
- char *string;
-
-/* objc_implementation_context = impent->imp_context;
- implementation_template = impent->imp_template;*/
-
- switch (TREE_CODE (impent->imp_context))
- {
- case CLASS_IMPLEMENTATION_TYPE:
- {
- const char *const class_name =
- IDENTIFIER_POINTER (CLASS_NAME (impent->imp_context));
-
- string = (char *) alloca (strlen (class_name) + 30);
-
- sprintf (string, "__objc_class_name_%s", class_name);
- break;
- }
- case CATEGORY_IMPLEMENTATION_TYPE:
- {
- const char *const class_name =
- IDENTIFIER_POINTER (CLASS_NAME (impent->imp_context));
- const char *const class_super_name =
- IDENTIFIER_POINTER (CLASS_SUPER_NAME (impent->imp_context));
-
- string = (char *) alloca (strlen (class_name)
- + strlen (class_super_name) + 30);
-
- /* Do the same for categories. Even though no references to
- these symbols are generated automatically by the compiler,
- it gives you a handle to pull them into an archive by
- hand. */
- sprintf (string, "*__objc_category_name_%s_%s", class_name, class_super_name);
- break;
- }
- default:
- return;
- }
-
- {
- tree decl, init;
-
- init = integer_zero_node;
- decl = build_decl (input_location,
- VAR_DECL, get_identifier (string), TREE_TYPE (init));
- TREE_PUBLIC (decl) = 1;
- TREE_READONLY (decl) = 1;
- TREE_USED (decl) = 1;
- TREE_CONSTANT (decl) = 1;
- DECL_CONTEXT (decl) = NULL_TREE;
- DECL_ARTIFICIAL (decl) = 1;
- TREE_STATIC (decl) = 1;
- DECL_INITIAL (decl) = error_mark_node; /* A real initializer is coming... */
- /* We must force the reference. */
- DECL_PRESERVE_P (decl) = 1;
-
- finish_var_decl(decl, init) ;
- }
-}
-
-tree
-build_protocol_initializer (tree type, tree protocol_name, tree protocol_list,
- tree inst_methods, tree class_methods)
-{
- tree expr, ttyp;
- location_t loc;
- vec<constructor_elt, va_gc> *inits = NULL;
-
- /* TODO: pass the loc in or find it from args. */
- loc = input_location;
- ttyp = build_pointer_type (xref_tag (RECORD_TYPE,
- get_identifier (UTAG_CLASS)));
- /* Filling the "isa" in with a version allows the runtime system to
- detect this ... */
- expr = build_int_cst (ttyp, PROTOCOL_VERSION);
-
- CONSTRUCTOR_APPEND_ELT (inits, NULL_TREE, expr);
-
- CONSTRUCTOR_APPEND_ELT (inits, NULL_TREE, protocol_name);
- CONSTRUCTOR_APPEND_ELT (inits, NULL_TREE, protocol_list);
-
- ttyp = objc_method_proto_list_ptr;
- if (inst_methods)
- expr = convert (ttyp, build_unary_op (loc, ADDR_EXPR, inst_methods, 0));
- else
- expr = convert (ttyp, null_pointer_node);
- CONSTRUCTOR_APPEND_ELT (inits, NULL_TREE, expr);
-
- if (class_methods)
- expr = convert (ttyp, build_unary_op (loc, ADDR_EXPR, class_methods, 0));
- else
- expr = convert (ttyp, null_pointer_node);
- CONSTRUCTOR_APPEND_ELT (inits, NULL_TREE, expr);
-
- return objc_build_constructor (type, inits);
-}
-
-static tree
-generate_protocol_list (tree i_or_p, tree klass_ctxt)
-{
- tree array_type, ptype, refs_decl, lproto, e, plist;
- vec<constructor_elt, va_gc> *v = NULL;
- char buf[BUFSIZE];
- int size = 0;
-
- switch (TREE_CODE (i_or_p))
- {
- case CLASS_INTERFACE_TYPE:
- case CATEGORY_INTERFACE_TYPE:
- plist = CLASS_PROTOCOL_LIST (i_or_p);
- break;
- case PROTOCOL_INTERFACE_TYPE:
- plist = PROTOCOL_LIST (i_or_p);
- break;
- default:
- gcc_unreachable ();
- }
-
- /* Compute size. */
- for (lproto = plist; lproto; lproto = TREE_CHAIN (lproto))
- if (TREE_CODE (TREE_VALUE (lproto)) == PROTOCOL_INTERFACE_TYPE
- && PROTOCOL_FORWARD_DECL (TREE_VALUE (lproto)))
- size++;
-
- /* Build initializer. */
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, build_int_cst (NULL_TREE, 0));
- e = build_int_cst (build_pointer_type (objc_protocol_template), size);
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, e);
-
- for (lproto = plist; lproto; lproto = TREE_CHAIN (lproto))
- {
- tree pval = TREE_VALUE (lproto);
-
- if (TREE_CODE (pval) == PROTOCOL_INTERFACE_TYPE
- && PROTOCOL_FORWARD_DECL (pval))
- {
- tree fwref = PROTOCOL_FORWARD_DECL (pval);
- location_t loc = DECL_SOURCE_LOCATION (fwref) ;
- e = build_unary_op (loc, ADDR_EXPR, fwref, 0);
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, e);
- }
- }
-
- /* static struct objc_protocol *refs[n]; */
-
- switch (TREE_CODE (i_or_p))
- {
- case PROTOCOL_INTERFACE_TYPE:
- snprintf (buf, BUFSIZE, "_OBJC_ProtocolRefs_%s",
- IDENTIFIER_POINTER (PROTOCOL_NAME (i_or_p)));
- break;
- case CLASS_INTERFACE_TYPE:
- snprintf (buf, BUFSIZE, "_OBJC_ClassProtocols_%s",
- IDENTIFIER_POINTER (CLASS_NAME (i_or_p)));
- break;
- case CATEGORY_INTERFACE_TYPE:
- snprintf (buf, BUFSIZE, "_OBJC_CategoryProtocols_%s_%s",
- IDENTIFIER_POINTER (CLASS_NAME (klass_ctxt)),
- IDENTIFIER_POINTER (CLASS_SUPER_NAME (klass_ctxt)));
- break;
- default:
- gcc_unreachable ();
- }
-
- ptype = build_pointer_type (objc_protocol_template);
- array_type = build_sized_array_type (ptype, size + 3);
- refs_decl = start_var_decl (array_type, buf);
- OBJCMETA (refs_decl, objc_meta, meta_base);
- finish_var_decl (refs_decl,
- objc_build_constructor (TREE_TYPE (refs_decl), v));
-
- return refs_decl;
-}
-
-static tree
-generate_v1_meth_descriptor_table (tree chain, tree protocol, const char *prefix)
-{
- tree method_list_template, initlist, decl;
- int size;
- vec<constructor_elt, va_gc> *v = NULL;
- char buf[BUFSIZE];
-
- if (!chain || !prefix)
- return NULL_TREE;
-
- if (!objc_method_prototype_template)
- objc_method_prototype_template = build_method_prototype_template ();
-
- size = list_length (chain);
- method_list_template =
- build_method_prototype_list_template (objc_method_prototype_template,
- size);
- snprintf (buf, BUFSIZE, "%s_%s", prefix,
- IDENTIFIER_POINTER (PROTOCOL_NAME (protocol)));
-
- decl = start_var_decl (method_list_template, buf);
-
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, build_int_cst (NULL_TREE, size));
- initlist =
- build_descriptor_table_initializer (objc_method_prototype_template,
- chain);
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, initlist);
- OBJCMETA (decl, objc_meta, meta_base);
- finish_var_decl (decl, objc_build_constructor (method_list_template, v));
- return decl;
-}
-
-/* For each protocol which was referenced either from a @protocol()
- expression, or because a class/category implements it (then a
- pointer to the protocol is stored in the struct describing the
- class/category), we create a statically allocated instance of the
- Protocol class. The code is written in such a way as to generate
- as few Protocol objects as possible; we generate a unique Protocol
- instance for each protocol, and we don't generate a Protocol
- instance if the protocol is never referenced (either from a
- @protocol() or from a class/category implementation). These
- statically allocated objects can be referred to via the static
- (that is, private to this module) symbols _OBJC_PROTOCOL_n.
-
- The statically allocated Protocol objects that we generate here
- need to be fixed up at runtime in order to be used: the 'isa'
- pointer of the objects need to be set up to point to the 'Protocol'
- class, as known at runtime.
-
- The GNU runtime fixes up all protocols before user code from the module
- is executed; it requires pointers to those symbols
- to be put in the objc_symtab (which is then passed as argument to
- the function __objc_exec_class() which the compiler sets up to be
- executed automatically when the module is loaded); setup of those
- Protocol objects happen in two ways in the GNU runtime: all
- Protocol objects referred to by a class or category implementation
- are fixed up when the class/category is loaded; all Protocol
- objects referred to by a @protocol() expression are added by the
- compiler to the list of statically allocated instances to fixup
- (the same list holding the statically allocated constant string
- objects). Because, as explained above, the compiler generates as
- few Protocol objects as possible, some Protocol object might end up
- being referenced multiple times when compiled with the GNU runtime,
- and end up being fixed up multiple times at runtime initialization.
- But that doesn't hurt, it's just a little inefficient. */
-
-static void
-generate_protocols (void)
-{
- tree p, encoding;
- tree decl;
- tree initlist, protocol_name_expr, refs_decl, refs_expr;
-
- /* If a protocol was directly referenced, pull in indirect references. */
- for (p = protocol_chain; p; p = TREE_CHAIN (p))
- if (PROTOCOL_FORWARD_DECL (p) && PROTOCOL_LIST (p))
- generate_protocol_references (PROTOCOL_LIST (p));
-
- for (p = protocol_chain; p; p = TREE_CHAIN (p))
- {
- tree nst_methods = PROTOCOL_NST_METHODS (p);
- tree cls_methods = PROTOCOL_CLS_METHODS (p);
-
- /* If protocol wasn't referenced, don't generate any code. */
- decl = PROTOCOL_FORWARD_DECL (p);
-
- if (!decl)
- continue;
-
- /* Make sure we link in the Protocol class. */
- add_class_reference (get_identifier (PROTOCOL_OBJECT_CLASS_NAME));
-
- while (nst_methods)
- {
- if (! METHOD_ENCODING (nst_methods))
- {
- encoding = encode_method_prototype (nst_methods);
- METHOD_ENCODING (nst_methods) = encoding;
- }
- nst_methods = DECL_CHAIN (nst_methods);
- }
-
- UOBJC_INSTANCE_METHODS_decl =
- generate_v1_meth_descriptor_table (PROTOCOL_NST_METHODS (p), p,
- "_OBJC_PROTOCOL_INSTANCE_METHODS");
-
- while (cls_methods)
- {
- if (! METHOD_ENCODING (cls_methods))
- {
- encoding = encode_method_prototype (cls_methods);
- METHOD_ENCODING (cls_methods) = encoding;
- }
-
- cls_methods = DECL_CHAIN (cls_methods);
- }
-
- UOBJC_CLASS_METHODS_decl =
- generate_v1_meth_descriptor_table (PROTOCOL_CLS_METHODS (p), p,
- "_OBJC_PROTOCOL_CLASS_METHODS");
-/* generate_method_descriptors (p);*/
-
- if (PROTOCOL_LIST (p))
- refs_decl = generate_protocol_list (p, NULL_TREE);
- else
- refs_decl = 0;
-
- /* static struct objc_protocol _OBJC_PROTOCOL_<mumble>; */
- protocol_name_expr = add_objc_string (PROTOCOL_NAME (p), class_names);
-
- if (refs_decl)
- refs_expr = convert (build_pointer_type (build_pointer_type
- (objc_protocol_template)),
- build_unary_op (input_location,
- ADDR_EXPR, refs_decl, 0));
- else
- refs_expr = build_int_cst (NULL_TREE, 0);
-
- /* UOBJC_INSTANCE_METHODS_decl/UOBJC_CLASS_METHODS_decl are set
- by generate_method_descriptors, which is called above. */
- initlist = build_protocol_initializer (TREE_TYPE (decl),
- protocol_name_expr, refs_expr,
- UOBJC_INSTANCE_METHODS_decl,
- UOBJC_CLASS_METHODS_decl);
- finish_var_decl (decl, initlist);
- }
-}
-
-static tree
-generate_dispatch_table (tree chain, const char *name)
-{
- tree decl, method_list_template, initlist;
- vec<constructor_elt, va_gc> *v = NULL;
- int size = list_length (chain);
-
- if (!objc_method_template)
- objc_method_template = build_method_template ();
-
- method_list_template = build_method_list_template (objc_method_template,
- size);
- initlist = build_dispatch_table_initializer (objc_method_template, chain);
-
- decl = start_var_decl (method_list_template, name);
-
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, integer_zero_node);
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE,
- build_int_cst (integer_type_node, size));
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, initlist);
-
- OBJCMETA (decl, objc_meta, meta_base);
- finish_var_decl (decl,
- objc_build_constructor (TREE_TYPE (decl), v));
-
- return decl;
-}
-
-/* Init a category. */
-static tree
-build_category_initializer (tree type, tree cat_name, tree class_name,
- tree inst_methods, tree class_methods,
- tree protocol_list)
-{
- tree expr, ltyp;
- location_t loc;
- vec<constructor_elt, va_gc> *v = NULL;
-
- /* TODO: pass the loc in or find it from args. */
- /* TODO: pass the loc in or find it from args. */
- loc = UNKNOWN_LOCATION;
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, cat_name);
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, class_name);
-
- ltyp = objc_method_list_ptr;
- if (inst_methods)
- expr = convert (ltyp, build_unary_op (loc, ADDR_EXPR, inst_methods, 0));
- else
- expr = convert (ltyp, null_pointer_node);
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, expr);
-
- if (class_methods)
- expr = convert (ltyp, build_unary_op (loc, ADDR_EXPR, class_methods, 0));
- else
- expr = convert (ltyp, null_pointer_node);
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, expr);
-
- /* protocol_list = */
- ltyp = build_pointer_type (build_pointer_type (objc_protocol_template));
- if (protocol_list)
- expr = convert (ltyp, build_unary_op (loc, ADDR_EXPR, protocol_list, 0));
- else
- expr = convert (ltyp, null_pointer_node);
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, expr);
-
- return objc_build_constructor (type, v);
-}
-
-/* static struct objc_category _OBJC_CATEGORY_<name> = { ... }; */
-
-static void
-generate_category (struct imp_entry *impent)
-{
- tree initlist, cat_name_expr, class_name_expr;
- tree protocol_decl, category, cat_decl;
- tree inst_methods = NULL_TREE, class_methods = NULL_TREE;
- tree cat = impent->imp_context;
- char buf[BUFSIZE];
-
- cat_decl = impent->class_decl;
-
- add_class_reference (CLASS_NAME (cat));
- cat_name_expr = add_objc_string (CLASS_SUPER_NAME (cat), class_names);
-
- class_name_expr = add_objc_string (CLASS_NAME (cat), class_names);
-
- category = lookup_category (impent->imp_template, CLASS_SUPER_NAME (cat));
-
- if (category && CLASS_PROTOCOL_LIST (category))
- {
- generate_protocol_references (CLASS_PROTOCOL_LIST (category));
- protocol_decl = generate_protocol_list (category, cat);
- }
- else
- protocol_decl = 0;
-
- if (CLASS_NST_METHODS (cat))
- {
- snprintf (buf, BUFSIZE, "_OBJC_CategoryInstanceMethods_%s_%s",
- IDENTIFIER_POINTER (CLASS_NAME (cat)),
- IDENTIFIER_POINTER (CLASS_SUPER_NAME (cat)));
- inst_methods = generate_dispatch_table (CLASS_NST_METHODS (cat), buf);
- }
-
- if (CLASS_CLS_METHODS (cat))
- {
- snprintf (buf, BUFSIZE, "_OBJC_CategoryClassMethods_%s_%s",
- IDENTIFIER_POINTER (CLASS_NAME (cat)),
- IDENTIFIER_POINTER (CLASS_SUPER_NAME (cat)));
- class_methods = generate_dispatch_table (CLASS_CLS_METHODS (cat), buf);
- }
-
- initlist = build_category_initializer (TREE_TYPE (cat_decl),
- cat_name_expr, class_name_expr,
- inst_methods, class_methods,
- protocol_decl);
- /* Finish and initialize the forward decl. */
- finish_var_decl (cat_decl, initlist);
- impent->class_decl = cat_decl;
-}
-
-/* struct _objc_class {
- struct objc_class *isa;
- struct objc_class *super_class;
- char *name;
- long version;
- long info;
- long instance_size;
- struct objc_ivar_list *ivars;
- struct objc_method_list *methods;
- struct sarray *dtable;
- struct objc_class *subclass_list;
- struct objc_class *sibling_class;
- struct objc_protocol_list *protocols;
- void *gc_object_type;
- }; */
-
-static tree
-build_shared_structure_initializer (tree type, tree isa, tree super,
- tree name, tree size, int status,
- tree dispatch_table, tree ivar_list,
- tree protocol_list)
-{
- tree expr, ltyp;
- vec<constructor_elt, va_gc> *v = NULL;
-
- /* isa = */
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, isa);
-
- /* super_class = */
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, super);
-
- /* name = */
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, default_conversion (name));
-
- /* version = */
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE,
- build_int_cst (long_integer_type_node, 0));
-
- /* info = */
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE,
- build_int_cst (long_integer_type_node, status));
-
- /* instance_size = */
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE,
- convert (long_integer_type_node, size));
-
- /* objc_ivar_list = */
- if (!ivar_list)
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE,
- build_int_cst (objc_ivar_list_ptr, 0));
- else
- {
- expr = convert (objc_ivar_list_ptr,
- build_unary_op (input_location, ADDR_EXPR,
- ivar_list, 0));
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, expr);
- }
-
- /* objc_method_list = */
- if (!dispatch_table)
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE,
- convert (objc_method_list_ptr, null_pointer_node));
- else
- {
- expr = convert (objc_method_list_ptr,
- build_unary_op (input_location, ADDR_EXPR,
- dispatch_table, 0));
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, expr);
- }
-
- /* dtable = */
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, build_int_cst (NULL_TREE, 0));
-
- /* subclass_list = */
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, build_int_cst (NULL_TREE, 0));
-
- /* sibling_class = */
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, build_int_cst (NULL_TREE, 0));
-
- /* protocol_list = */
- ltyp = build_pointer_type (build_pointer_type (objc_protocol_template));
- if (! protocol_list)
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, build_int_cst (ltyp, 0));
- else
- {
- expr = convert (ltyp,
- build_unary_op (input_location, ADDR_EXPR,
- protocol_list, 0));
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, expr);
- }
-
- /* gc_object_type = NULL */
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, build_int_cst (NULL_TREE, 0));
-
- return objc_build_constructor (type, v);
-}
-
-
-static tree
-generate_ivars_list (tree chain, const char *name)
-{
- tree initlist, ivar_list_template, decl;
- int size;
- vec<constructor_elt, va_gc> *inits = NULL;
-
- if (!chain)
- return NULL_TREE;
-
- if (!objc_ivar_template)
- objc_ivar_template = build_ivar_template ();
-
- size = ivar_list_length (chain);
-
- generating_instance_variables = 1;
- ivar_list_template = build_ivar_list_template (objc_ivar_template, size);
- initlist = build_ivar_list_initializer (objc_ivar_template, chain);
- generating_instance_variables = 0;
-
- decl = start_var_decl (ivar_list_template, name);
-
- CONSTRUCTOR_APPEND_ELT (inits, NULL_TREE, build_int_cst (NULL_TREE, size));
- CONSTRUCTOR_APPEND_ELT (inits, NULL_TREE, initlist);
-
- OBJCMETA (decl, objc_meta, meta_base);
- finish_var_decl (decl,
- objc_build_constructor (TREE_TYPE (decl), inits));
-
- return decl;
-}
-
-/* static struct objc_class _OBJC_METACLASS_Foo={ ... };
- static struct objc_class _OBJC_CLASS_Foo={ ... }; */
-
-static void
-generate_class_structures (struct imp_entry *impent)
-{
- tree name_expr, super_expr, root_expr, class_decl, meta_decl;
- tree my_root_id, my_super_id;
- tree cast_type, initlist, protocol_decl;
- tree inst_methods = NULL_TREE, class_methods = NULL_TREE;
- tree chain, inst_ivars = NULL_TREE, class_ivars = NULL_TREE;
- location_t loc;
- char buf[BUFSIZE];
- int cls_flags = 0 ;
-
-/* objc_implementation_context = impent->imp_context;
- implementation_template = impent->imp_template;*/
- class_decl = impent->class_decl;
- meta_decl = impent->meta_decl;
-/* UOBJC_CLASS_decl = impent->class_decl;
- UOBJC_METACLASS_decl = impent->meta_decl;*/
-
- loc = DECL_SOURCE_LOCATION (impent->class_decl);
-
- my_super_id = CLASS_SUPER_NAME (impent->imp_template);
- if (my_super_id)
- {
- add_class_reference (my_super_id);
-
- /* Compute "my_root_id" - this is required for code generation.
- the "isa" for all meta class structures points to the root of
- the inheritance hierarchy (e.g. "__Object")... */
- my_root_id = my_super_id;
- do
- {
- tree my_root_int = lookup_interface (my_root_id);
-
- if (my_root_int && CLASS_SUPER_NAME (my_root_int))
- my_root_id = CLASS_SUPER_NAME (my_root_int);
- else
- break;
- }
- while (1);
- }
- else
- /* No super class. */
- my_root_id = CLASS_NAME (impent->imp_template);
-
- cast_type = build_pointer_type (objc_class_template);
- name_expr = add_objc_string (CLASS_NAME (impent->imp_template),
- class_names);
-
- /* Install class `isa' and `super' pointers at runtime. */
- if (my_super_id)
- super_expr = add_objc_string (my_super_id, class_names);
- else
- super_expr = null_pointer_node;
-
- super_expr = build_c_cast (loc, cast_type, super_expr);
-
- root_expr = add_objc_string (my_root_id, class_names);
- root_expr = build_c_cast (loc, cast_type, root_expr);
-
- if (CLASS_PROTOCOL_LIST (impent->imp_template))
- {
- generate_protocol_references (CLASS_PROTOCOL_LIST (impent->imp_template));
- protocol_decl = generate_protocol_list (impent->imp_template,
- impent->imp_context);
- }
- else
- protocol_decl = NULL_TREE;
-
- if (CLASS_CLS_METHODS (impent->imp_context))
- {
- snprintf (buf, BUFSIZE, "_OBJC_ClassMethods_%s",
- IDENTIFIER_POINTER (CLASS_NAME (impent->imp_context)));
- class_methods = generate_dispatch_table (CLASS_CLS_METHODS (impent->imp_context),
- buf);
- }
-
- if (CLASS_SUPER_NAME (impent->imp_template) == NULL_TREE
- && (chain = TYPE_FIELDS (objc_class_template)))
- {
- snprintf (buf, BUFSIZE, "_OBJC_ClassIvars_%s",
- IDENTIFIER_POINTER (CLASS_NAME (impent->imp_context)));
- class_ivars = generate_ivars_list (chain, buf);
- }
-
- /* static struct objc_class _OBJC_METACLASS_Foo = { ... }; */
-
- initlist =
- build_shared_structure_initializer
- (TREE_TYPE (meta_decl),
- root_expr, super_expr, name_expr,
- convert (integer_type_node,
- TYPE_SIZE_UNIT (objc_class_template)),
- CLS_META, class_methods, class_ivars,
- protocol_decl);
-
- finish_var_decl (meta_decl, initlist);
- impent->meta_decl = meta_decl;
-
- /* static struct objc_class _OBJC_CLASS_Foo={ ... }; */
- if (CLASS_NST_METHODS (impent->imp_context))
- {
- snprintf (buf, BUFSIZE, "_OBJC_InstanceMethods_%s",
- IDENTIFIER_POINTER (CLASS_NAME (impent->imp_context)));
- inst_methods = generate_dispatch_table (CLASS_NST_METHODS (impent->imp_context),
- buf);
- }
-
- if ((chain = CLASS_IVARS (impent->imp_template)))
- {
- snprintf (buf, BUFSIZE, "_OBJC_InstanceIvars_%s",
- IDENTIFIER_POINTER (CLASS_NAME (impent->imp_context)));
- inst_ivars = generate_ivars_list (chain, buf);
- }
-
- initlist =
- build_shared_structure_initializer
- (TREE_TYPE (class_decl),
- build_unary_op (loc, ADDR_EXPR, meta_decl, 0),
- super_expr, name_expr,
- convert (integer_type_node,
- TYPE_SIZE_UNIT (CLASS_STATIC_TEMPLATE
- (impent->imp_template))),
- CLS_FACTORY | cls_flags, inst_methods, inst_ivars,
- protocol_decl);
-
- finish_var_decl (class_decl, initlist);
- impent->class_decl = class_decl;
-}
-
-/* --- Output GNU Metadata --- */
-
-/* TODO: Make this into an array of refs. */
-static void
-handle_class_ref (tree chain)
-{
- const char *name = IDENTIFIER_POINTER (TREE_VALUE (chain));
- char *string = (char *) alloca (strlen (name) + 30);
- tree decl;
- tree exp;
-
- sprintf (string, "__objc_class_name_%s", name);
-
- /* Make a decl for this name, so we can use its address in a tree. */
- decl = build_decl (input_location,
- VAR_DECL, get_identifier (string), TREE_TYPE (integer_zero_node));
- DECL_EXTERNAL (decl) = 1;
- TREE_PUBLIC (decl) = 1;
- DECL_CONTEXT (decl) = NULL_TREE;
- finish_var_decl (decl, 0);
-
- /* Make a decl for the address. */
- sprintf (string, "__objc_class_ref_%s", name);
- exp = build1 (ADDR_EXPR, string_type_node, decl);
- decl = build_decl (input_location,
- VAR_DECL, get_identifier (string), string_type_node);
- TREE_STATIC (decl) = 1;
- TREE_USED (decl) = 1;
- DECL_READ_P (decl) = 1;
- DECL_ARTIFICIAL (decl) = 1;
- DECL_INITIAL (decl) = error_mark_node;
-
- /* We must force the reference. */
- DECL_PRESERVE_P (decl) = 1;
-
- DECL_CONTEXT (decl) = NULL_TREE;
- finish_var_decl (decl, exp);
-}
-
-static tree
-get_proto_encoding (tree proto)
-{
- tree encoding;
- if (proto)
- {
- if (! METHOD_ENCODING (proto))
- {
- encoding = encode_method_prototype (proto);
- METHOD_ENCODING (proto) = encoding;
- }
- else
- encoding = METHOD_ENCODING (proto);
-
- return add_objc_string (encoding, meth_var_types);
- }
- else
- return build_int_cst (NULL_TREE, 0);
-}
-
-static void
-build_gnu_selector_translation_table (void)
-{
- tree chain, expr;
- vec<constructor_elt, va_gc> *inits = NULL;
- vec<constructor_elt, va_gc> *v ;
-
- /* Cause the selector table (previously forward-declared)
- to be actually output. */
-
- for (chain = sel_ref_chain; chain; chain = TREE_CHAIN (chain))
- {
- tree encoding;
- if (warn_selector)
- {
- /* TODO: improve on the location for the diagnostic. */
- location_t loc = input_location;
- diagnose_missing_method (TREE_VALUE (chain), loc);
- }
-
- v = NULL;
- expr = build_selector (TREE_VALUE (chain));
- encoding = get_proto_encoding (TREE_PURPOSE (chain));
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, expr);
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, encoding);
- expr = objc_build_constructor (objc_selector_template, v);
-
- CONSTRUCTOR_APPEND_ELT (inits, NULL_TREE, expr);
- } /* each element in the chain */
-
- /* List terminator. */
- v = NULL;
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, integer_zero_node);
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, integer_zero_node);
- expr = objc_build_constructor (objc_selector_template, v);
-
- CONSTRUCTOR_APPEND_ELT (inits, NULL_TREE, expr);
- expr = objc_build_constructor (TREE_TYPE (UOBJC_SELECTOR_TABLE_decl),
- inits);
- finish_var_decl (UOBJC_SELECTOR_TABLE_decl, expr);
-}
-
-/* Output references to all statically allocated objects. Return the DECL
- for the array built. */
-
-static void
-generate_static_references (void)
-{
- tree expr = NULL_TREE;
- tree class_name, klass, decl;
- tree cl_chain, in_chain, type
- = build_array_type (build_pointer_type (void_type_node), NULL_TREE);
- int num_inst, num_class;
- char buf[BUFSIZE];
- vec<constructor_elt, va_gc> *decls = NULL;
-
- for (cl_chain = objc_static_instances, num_class = 0;
- cl_chain; cl_chain = TREE_CHAIN (cl_chain), num_class++)
- {
- vec<constructor_elt, va_gc> *v = NULL;
-
- for (num_inst = 0, in_chain = TREE_PURPOSE (cl_chain);
- in_chain; num_inst++, in_chain = TREE_CHAIN (in_chain));
-
- snprintf (buf, BUFSIZE, "_OBJC_STATIC_INSTANCES_%d", num_class);
- decl = start_var_decl (type, buf);
-
- /* Output {class_name, ...}. */
- klass = TREE_VALUE (cl_chain);
- class_name = get_objc_string_decl (OBJC_TYPE_NAME (klass), class_names);
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE,
- build_unary_op (input_location,
- ADDR_EXPR, class_name, 1));
-
- /* Output {..., instance, ...}. */
- for (in_chain = TREE_PURPOSE (cl_chain);
- in_chain; in_chain = TREE_CHAIN (in_chain))
- {
- expr = build_unary_op (input_location,
- ADDR_EXPR, TREE_VALUE (in_chain), 1);
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, expr);
- }
-
- /* Output {..., NULL}. */
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, build_int_cst (NULL_TREE, 0));
-
- expr = objc_build_constructor (TREE_TYPE (decl), v);
- OBJCMETA (decl, objc_meta, meta_base);
- finish_var_decl (decl, expr);
- CONSTRUCTOR_APPEND_ELT (decls, NULL_TREE,
- build_unary_op (input_location,
- ADDR_EXPR, decl, 1));
- }
-
- CONSTRUCTOR_APPEND_ELT (decls, NULL_TREE, build_int_cst (NULL_TREE, 0));
- expr = objc_build_constructor (type, decls);
- static_instances_decl = start_var_decl (type, "_OBJC_STATIC_INSTANCES");
- OBJCMETA (static_instances_decl, objc_meta, meta_base);
- finish_var_decl (static_instances_decl, expr);
-}
-
-/* Create the initial value for the `defs' field of _objc_symtab.
- This is a CONSTRUCTOR. */
-
-static tree
-init_def_list (tree type)
-{
- tree expr;
- struct imp_entry *impent;
- location_t loc;
- vec<constructor_elt, va_gc> *v = NULL;
-
- if (imp_count)
- for (impent = imp_list; impent; impent = impent->next)
- {
- if (TREE_CODE (impent->imp_context) == CLASS_IMPLEMENTATION_TYPE)
- {
- loc = DECL_SOURCE_LOCATION (impent->class_decl);
- expr = build_unary_op (loc,
- ADDR_EXPR, impent->class_decl, 0);
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, expr);
- }
- }
-
- if (cat_count)
- for (impent = imp_list; impent; impent = impent->next)
- {
- if (TREE_CODE (impent->imp_context) == CATEGORY_IMPLEMENTATION_TYPE)
- {
- loc = DECL_SOURCE_LOCATION (impent->class_decl);
- expr = build_unary_op (loc,
- ADDR_EXPR, impent->class_decl, 0);
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, expr);
- }
- }
-
- loc = UNKNOWN_LOCATION;
- /* statics = { ..., _OBJC_STATIC_INSTANCES, ... } */
- if (static_instances_decl)
- expr = build_unary_op (loc, ADDR_EXPR, static_instances_decl, 0);
- else
- expr = integer_zero_node;
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, expr);
-
- return objc_build_constructor (type, v);
-}
-
-/* Take care of defining and initializing _OBJC_SYMBOLS. */
-
-/* Predefine the following data type:
-
- struct _objc_symtab
- {
- long sel_ref_cnt;
- SEL *refs;
- short cls_def_cnt;
- short cat_def_cnt;
- void *defs[cls_def_cnt + cat_def_cnt];
- }; */
-
-static void
-build_objc_symtab_template (void)
-{
- tree fields, array_type, *chain = NULL;
- int index;
-
- objc_symtab_template = objc_start_struct (get_identifier (UTAG_SYMTAB));
-
- /* long sel_ref_cnt; */
- fields = add_field_decl (long_integer_type_node, "sel_ref_cnt", &chain);
-
- /* SEL *refs; */
- add_field_decl (build_pointer_type (objc_selector_type), "refs", &chain);
-
- /* short cls_def_cnt; */
- add_field_decl (short_integer_type_node, "cls_def_cnt", &chain);
-
- /* short cat_def_cnt; */
- add_field_decl (short_integer_type_node, "cat_def_cnt", &chain);
-
- /* Note that padding will be added here on LP64. */
-
- /* void *defs[imp_count + cat_count (+ 1)]; */
- /* NB: The index is one less than the size of the array. */
- index = imp_count + cat_count;
- array_type = build_sized_array_type (ptr_type_node, index + 1);
- add_field_decl (array_type, "defs", &chain);
-
- objc_finish_struct (objc_symtab_template, fields);
-}
-/* Construct the initial value for all of _objc_symtab. */
-
-static tree
-init_objc_symtab (tree type)
-{
- tree field, expr, ltyp;
- location_t loc;
- vec<constructor_elt, va_gc> *v = NULL;
-
- loc = UNKNOWN_LOCATION;
-
- /* sel_ref_cnt = { ..., 5, ... } */
-
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE,
- build_int_cst (long_integer_type_node, 0));
-
- /* refs = { ..., _OBJC_SELECTOR_TABLE, ... } */
-
- ltyp = build_pointer_type (objc_selector_type);
- if (sel_ref_chain)
- expr = convert (ltyp, build_unary_op (loc, ADDR_EXPR,
- UOBJC_SELECTOR_TABLE_decl, 1));
- else
- expr = convert (ltyp, null_pointer_node);
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, expr);
-
- /* cls_def_cnt = { ..., 5, ... } */
-
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE,
- build_int_cst (short_integer_type_node, imp_count));
-
- /* cat_def_cnt = { ..., 5, ... } */
-
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE,
- build_int_cst (short_integer_type_node, cat_count));
-
- /* cls_def = { ..., { &Foo, &Bar, ...}, ... } */
-
- field = TYPE_FIELDS (type);
- field = DECL_CHAIN (DECL_CHAIN (DECL_CHAIN (DECL_CHAIN (field))));
-
- CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, init_def_list (TREE_TYPE (field)));
-
- return objc_build_constructor (type, v);
-}
-
-/* Create the declaration of _OBJC_SYMBOLS, with type `struct _objc_symtab'
- and initialized appropriately. */
-
-static void
-generate_objc_symtab_decl (void)
-{
- build_objc_symtab_template ();
- UOBJC_SYMBOLS_decl = start_var_decl (objc_symtab_template, "_OBJC_SYMBOLS");
- OBJCMETA (UOBJC_SYMBOLS_decl, objc_meta, meta_base);
- finish_var_decl (UOBJC_SYMBOLS_decl,
- init_objc_symtab (TREE_TYPE (UOBJC_SYMBOLS_decl)));
-}
-
-static void
-objc_generate_v1_gnu_metadata (void)
-{
- struct imp_entry *impent;
- tree chain;
-
- /* Process the static instances here because initialization of objc_symtab
- depends on them. */
- if (objc_static_instances)
- generate_static_references ();
-
- objc_implementation_context =
- implementation_template =
- UOBJC_CLASS_decl =
- UOBJC_METACLASS_decl = NULL_TREE;
-
- for (impent = imp_list; impent; impent = impent->next)
- {
- /* If -gen-decls is present, Dump the @interface of each class.
- TODO: Dump the classes in the order they were found, rather than in
- reverse order as we are doing now. */
- if (flag_gen_declaration)
- dump_interface (gen_declaration_file, impent->imp_context);
-
- /* all of the following reference the string pool... */
- if (TREE_CODE (impent->imp_context) == CLASS_IMPLEMENTATION_TYPE)
- generate_class_structures (impent);
- else
- generate_category (impent);
- }
-
- /* If we are using an array of selectors, we must always
- finish up the array decl even if no selectors were used. */
- build_gnu_selector_translation_table ();
-
- if (protocol_chain)
- generate_protocols ();
-
- /* Arrange for ObjC data structures to be initialized at run time. */
- /* FIXME: Have some more elegant way to determine if we need to
- generate objc_symtab_decl or not, instead of checking these
- global symbols. */
- if (imp_list || class_names_chain
- || meth_var_names_chain || meth_var_types_chain || sel_ref_chain
- || prop_names_attr_chain)
- generate_objc_symtab_decl ();
-
- if (imp_list || class_names_chain || objc_static_instances
- || meth_var_names_chain || meth_var_types_chain || sel_ref_chain)
- {
- /* Make sure that the meta-data are identified as being
- GNU-runtime. */
- build_module_descriptor (OBJC_VERSION,
- build_tree_list (objc_meta, meta_base));
- build_module_initializer_routine ();
- }
-
- /* Dump the class references. This forces the appropriate classes
- to be linked into the executable image, preserving unix archive
- semantics. This can be removed when we move to a more dynamically
- linked environment. */
-
- for (chain = cls_ref_chain; chain; chain = TREE_CHAIN (chain))
- {
- handle_class_ref (chain);
- if (TREE_PURPOSE (chain))
- generate_classref_translation_entry (chain);
- }
-
- for (impent = imp_list; impent; impent = impent->next)
- handle_impent (impent);
-
- generate_strings ();
-}
-
-/* --- exceptions --- */
-
-static GTY(()) tree objc_eh_personality_decl;
-
-static tree
-objc_eh_runtime_type (tree type)
-{
- tree ident, eh_id, decl, str;
-
- if (type == error_mark_node
- || errorcount || sorrycount)
- {
- /* Use 'ErrorMarkNode' as class name when error_mark_node is found
- to prevent an ICE. Note that we know that the compiler will
- terminate with an error and this 'ErrorMarkNode' class name will
- never be actually used. */
- ident = get_identifier ("ErrorMarkNode");
- goto make_err_class;
- }
-
- if (POINTER_TYPE_P (type) && objc_is_object_id (TREE_TYPE (type)))
- /* We don't want to identify 'id' for GNU. Instead, build a 0
- entry in the exceptions table. */
- return null_pointer_node;
-
- if (!POINTER_TYPE_P (type) || !TYPED_OBJECT (TREE_TYPE (type)))
- {
-#ifdef OBJCPLUS
- /* This routine is also called for c++ catch clauses; in which case,
- we use the c++ typeinfo decl. */
- return build_eh_type_type (type);
-#else
- error ("non-objective-c type %qT cannot be caught", type);
- ident = get_identifier ("ErrorMarkNode");
- goto make_err_class;
-#endif
- }
- else
- ident = OBJC_TYPE_NAME (TREE_TYPE (type));
-
-make_err_class:
- /* If this class was already referenced, then it will be output during
- meta-data emission, so we don't need to do it here. */
- decl = get_objc_string_decl (ident, class_names);
- eh_id = add_objc_string (ident, class_names);
- if (!decl)
- {
- /* Not found ... so we need to build it - from the freshly-entered id. */
- decl = get_objc_string_decl (ident, class_names);
- str = my_build_string (IDENTIFIER_LENGTH (ident) + 1,
- IDENTIFIER_POINTER (ident));
- /* We have to finalize this var here, because this might be called after
- all the other metadata strings have been emitted. */
- finish_var_decl (decl, str);
- }
- return eh_id;
-}
-
-static tree
-objc_eh_personality (void)
-{
- if (!objc_eh_personality_decl)
-#ifndef OBJCPLUS
- objc_eh_personality_decl = build_personality_function ("gnu_objc");
-#else
- objc_eh_personality_decl = build_personality_function ("gxx");
-#endif
- return objc_eh_personality_decl;
-}
-
-/* -- interfaces --- */
-
-static tree
-build_throw_stmt (location_t loc, tree throw_expr, bool rethrown ATTRIBUTE_UNUSED)
-{
- tree t;
- vec<tree, va_gc> *parms;
- vec_alloc (parms, 1);
- /* A throw is just a call to the runtime throw function with the
- object as a parameter. */
- parms->quick_push (throw_expr);
- t = build_function_call_vec (loc, vNULL, objc_exception_throw_decl, parms,
- NULL);
- vec_free (parms);
- return add_stmt (t);
-}
-
-/* Build __builtin_eh_pointer. */
-
-static tree
-objc_build_exc_ptr (struct objc_try_context **x ATTRIBUTE_UNUSED)
-{
- tree t;
- t = builtin_decl_explicit (BUILT_IN_EH_POINTER);
- t = build_call_expr (t, 1, integer_zero_node);
- return fold_convert (objc_object_type, t);
-}
-
-static tree
-begin_catch (struct objc_try_context **cur_try_context, tree type,
- tree decl, tree compound, bool ellipsis ATTRIBUTE_UNUSED)
-{
- tree t;
- /* Record the data for the catch in the try context so that we can
- finalize it later. */
- if (ellipsis)
- t = build_stmt (input_location, CATCH_EXPR, NULL, compound);
- else
- t = build_stmt (input_location, CATCH_EXPR, type, compound);
- (*cur_try_context)->current_catch = t;
-
- /* Initialize the decl from the EXC_PTR_EXPR we get from the runtime. */
- t = objc_build_exc_ptr (cur_try_context);
- t = convert (TREE_TYPE (decl), t);
- return build2 (MODIFY_EXPR, void_type_node, decl, t);
-}
-
-static void
-finish_catch (struct objc_try_context **cur_try_context, tree current_catch)
-{
- append_to_statement_list (current_catch, &((*cur_try_context)->catch_list));
-}
-
-static tree
-finish_try_stmt (struct objc_try_context **cur_try_context)
-{
- struct objc_try_context *c = *cur_try_context;
- tree stmt = c->try_body;
- if (c->catch_list)
- stmt = build_stmt (c->try_locus, TRY_CATCH_EXPR, stmt, c->catch_list);
- if (c->finally_body)
- stmt = build_stmt (c->try_locus, TRY_FINALLY_EXPR, stmt, c->finally_body);
- return stmt;
-}
-
-#include "gt-objc-objc-gnu-runtime-abi-01.h"