llvm-6502/test/Verifier/global-ctors.ll
Reid Kleckner 1ce3088669 Add comdat key field to llvm.global_ctors and llvm.global_dtors
This allows us to put dynamic initializers for weak data into the same
comdat group as the data being initialized.  This is necessary for MSVC
ABI compatibility.  Once we have comdats for guard variables, we can use
the combination to help GlobalOpt fire more often for weak data with
guarded initialization on other platforms.

Reviewers: nlewycky

Differential Revision: http://reviews.llvm.org/D3499

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209015 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-16 20:39:27 +00:00

12 lines
432 B
LLVM

; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
@llvm.global_ctors = appending global [1 x { i32, void()*, i8 } ] [
{ i32, void()*, i8 } { i32 65535, void ()* null, i8 0 }
]
; CHECK: wrong type for intrinsic global variable
@llvm.global_dtors = appending global [1 x { i32, void()*, i8*, i8 } ] [
{ i32, void()*, i8*, i8 } { i32 65535, void ()* null, i8* null, i8 0}
]
; CHECK: wrong type for intrinsic global variable