llvm-6502/test/CodeGen/Hexagon/ctor.ll
Sid Manning 0fc1662219 Handle ctor/init_array initialization.
Hexagon was not calling InitializeELF and could not select between
ctors and init_array.

Phabricator revision: http://reviews.llvm.org/D6061

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221156 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-03 14:56:05 +00:00

15 lines
493 B
LLVM

; RUN: llc -march=hexagon < %s | FileCheck -check-prefix=INITARRAY %s
; RUN: llc -march=hexagon < %s -use-ctors | FileCheck -check-prefix=CTOR %s
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_P10066.ii, i8* null }]
define internal void @_GLOBAL__sub_I_P10066.ii() {
entry:
ret void
}
;CTOR: .section .ctors
;CTOR-NOT: section .init_array
;INITARRAY: section .init_array
;INITARRAY-NOT: .section .ctors