brintos

brintos / llvm-project-archived public Read only

0
0
Text · 897 B · be4453a Raw
19 lines · cpp
1// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s2// RUN: %clang_cc1 -triple x86_64-apple-macosx -emit-llvm -o - %s | FileCheck %s3// RUN: %clang_cc1 -triple arm64-apple-macosx -emit-llvm -o - %s | FileCheck %s4 5extern "C" {6__attribute__((used)) static void *resolve_foo() { return 0; }7__attribute__((ifunc("resolve_foo"))) char *foo();8__attribute__((ifunc("resolve_foo"))) void foo2(int);9__attribute__((ifunc("resolve_foo"))) char foo3(float);10__attribute__((ifunc("resolve_foo"))) char foo4(float);11}12 13// CHECK: @resolve_foo = internal alias ptr (), ptr @_ZL11resolve_foov14// CHECK: @foo = ifunc ptr (), ptr @_ZL11resolve_foov15// CHECK: @foo2 = ifunc void (i32), ptr @_ZL11resolve_foov16// CHECK: @foo3 = ifunc i8 (float), ptr @_ZL11resolve_foov17// CHECK: @foo4 = ifunc i8 (float), ptr @_ZL11resolve_foov18// CHECK: define internal noundef ptr @_ZL11resolve_foov()19