diff options
author | Erich Keane <erich.keane@intel.com> | 2017-09-27 03:23:02 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2017-09-27 03:23:02 +0000 |
commit | 015ccd08227972145381447b349c8bd07fcb6f01 (patch) | |
tree | 612cedb81b32221c8b5ffdb2efd7e2700966f9cc /clang/test/CodeGenCXX/extern-section-attribute.cpp | |
parent | b11ebc5e3d83a0b198e642b8ba0558e8670ddbb1 (diff) | |
download | bcm5719-llvm-015ccd08227972145381447b349c8bd07fcb6f01.tar.gz bcm5719-llvm-015ccd08227972145381447b349c8bd07fcb6f01.zip |
Add test forgotten in r314262.
llvm-svn: 314268
Diffstat (limited to 'clang/test/CodeGenCXX/extern-section-attribute.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/extern-section-attribute.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/extern-section-attribute.cpp b/clang/test/CodeGenCXX/extern-section-attribute.cpp new file mode 100644 index 00000000000..fa0227e6fe1 --- /dev/null +++ b/clang/test/CodeGenCXX/extern-section-attribute.cpp @@ -0,0 +1,11 @@ +// 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; +} |