blob: 547334c045a3bea6d48b9052fb46b8d369b3b08e [file] [log] [blame]
Anton Korobeynikova22828e2012-02-23 10:36:04 +00001; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s -check-prefix=X86LINUX
2
3; Checking that a comdat group gets generated correctly for a static member
4; of instantiated C++ templates.
5; see http://sourcery.mentor.com/public/cxx-abi/abi.html#vague-itemplate
6; section 5.2.6 Instantiated templates
7; "Any static member data object is emitted in a COMDAT identified by its mangled
8; name, in any object file with a reference to its name symbol."
9
10; Case 1: variable is not explicitly initialized, and ends up in a .bss section
11; X86LINUX: .section .bss._ZN1CIiE1iE,"aGw",@nobits,_ZN1CIiE1iE,comdat
12@_ZN1CIiE1iE = weak_odr global i32 0, align 4
13
14; Case 2: variable is explicitly initialized, and ends up in a .data section
15; X86LINUX: .section .data._ZN1CIiE1jE,"aGw",@progbits,_ZN1CIiE1jE,comdat
16@_ZN1CIiE1jE = weak_odr global i32 12, align 4