aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/annotations-loc.c
diff options
context:
space:
mode:
authorJulien Lerouge <jlerouge@apple.com>2011-09-09 22:41:49 +0000
committerJulien Lerouge <jlerouge@apple.com>2011-09-09 22:41:49 +0000
commit77f68bb90af93b95045fb994e7cd68137adcc132 (patch)
tree16930a6023a153032d79ad743e75cf1f5d54646f /test/CodeGen/annotations-loc.c
parent712f2fcb70ae2eb0cb684d565e7d2cb76881006b (diff)
Bring llvm.annotation* intrinsics support back to where it was in llvm-gcc: can
annotate global, local variables, struct fields, or arbitrary statements (using the __builtin_annotation), rdar://8037476. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139423 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/annotations-loc.c')
-rw-r--r--test/CodeGen/annotations-loc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/annotations-loc.c b/test/CodeGen/annotations-loc.c
new file mode 100644
index 0000000000..4644f0e1d2
--- /dev/null
+++ b/test/CodeGen/annotations-loc.c
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// END.
+# 1 "t.c"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "t.c"
+int __attribute((annotate("foo"))) foo(void) { return 0; }
+
+// CHECK: private unnamed_addr constant [4 x i8] c"t.c\00"
+// CHECK: @llvm.global.annotations = {{.*}}, i32 1 }