Erich Keane | 015ccd0 | 2017-09-27 03:23:02 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-linux-gnu | FileCheck %s |
| 2 | |
| 3 | extern int aa __attribute__((section(".sdata"))); |
| 4 | // CHECK-DAG: @aa = external global i32, section ".sdata", align 4 |
| 5 | |
| 6 | extern int bb __attribute__((section(".sdata"))) = 1; |
Fangrui Song | dbc96b5 | 2020-02-03 10:09:39 -0800 | [diff] [blame] | 7 | // CHECK-DAG: @bb = global i32 1, section ".sdata", align 4 |
Erich Keane | 015ccd0 | 2017-09-27 03:23:02 +0000 | [diff] [blame] | 8 | |
| 9 | int foo() { |
| 10 | return aa + bb; |
| 11 | } |