[Flang] remove whole-archive option for AIX linker (#76039)
[llvm-project.git] / clang / test / CodeGen / annotations-decl-use-define.c
blob1ca12cddd3658db7e3988d60c5160cf469c5976d
1 // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
3 // Test annotation attributes are still emitted when the function is used before
4 // it is defined with annotations.
6 void foo(void);
7 void *xxx = (void*)foo;
8 void __attribute__((annotate("bar"))) foo() {}
10 // CHECK: target triple
11 // CHECK-DAG: private unnamed_addr constant [4 x i8] c"bar\00", section "llvm.metadata"
13 // CHECK: @llvm.global.annotations = appending global [1 x { ptr, ptr, ptr, i32, ptr }] [{
14 // CHECK-SAME: { ptr @foo,
15 // CHECK-SAME: }], section "llvm.metadata"