Files
clang-p2996/clang/test/CodeGenCXX/extern-section-attribute.cpp
Fangrui Song dbc96b518b Revert "[CodeGenModule] Assume dso_local for -fpic -fno-semantic-interposition"
This reverts commit 789a46f2d7.

Accidentally committed.
2020-02-03 10:09:39 -08:00

12 lines
347 B
C++

// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-linux-gnu | FileCheck %s
extern int aa __attribute__((section(".sdata")));
// CHECK-DAG: @aa = external global i32, section ".sdata", align 4
extern int bb __attribute__((section(".sdata"))) = 1;
// CHECK-DAG: @bb = global i32 1, section ".sdata", align 4
int foo() {
return aa + bb;
}