Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / attr-used.c
blob2d71f0b68fd0a1421ffb8220535d9d0df307867f
1 // RUN: %clang_cc1 -emit-llvm -triple x86_64 %s -o - | FileCheck %s --check-prefixes=CHECK,CUSED
2 // RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin %s -o - | FileCheck %s --check-prefixes=CHECK,USED
4 // USED: @llvm.used =
5 // CUSED: @llvm.compiler.used =
6 // CHECK-SAME: @f0
7 // CHECK-SAME: @f1.l0
8 // CHECK-SAME: @g0
9 // CHECK-SAME: @a0
11 int g0 __attribute__((used));
13 static void __attribute__((used)) f0(void) {
16 void f1(void) {
17 static int l0 __attribute__((used)) = 5225;
20 __attribute__((used)) int a0;
21 void pr27535(void) { (void)a0; }