brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · fc0e1da Raw
32 lines · cpp
1// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,LINUX2// RUN: %clang_cc1 -triple x86_64-apple-macos -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,LINUX3// RUN: %clang_cc1 -triple x86_64-windows-pc -fms-compatibility -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,WINDOWS4 5struct S {6  __attribute__((cpu_specific(atom)))7  void Func(){}8  __attribute__((cpu_dispatch(ivybridge,atom)))9  void Func(){}10};11 12void foo() {13  S s;14  s.Func();15}16 17// LINUX: @_ZN1S4FuncEv = weak_odr alias void (ptr), ptr @_ZN1S4FuncEv.ifunc18// LINUX: @_ZN1S4FuncEv.ifunc = weak_odr ifunc void (ptr), ptr @_ZN1S4FuncEv.resolver19// LINUX: define weak_odr ptr @_ZN1S4FuncEv.resolver() #[[ATTR_RESOLVER:[0-9]+]] 20// LINUX: ret ptr @_ZN1S4FuncEv.S21// LINUX: ret ptr @_ZN1S4FuncEv.O22// LINUX: declare void @_ZN1S4FuncEv.S23// LINUX: define linkonce_odr void @_ZN1S4FuncEv.O24 25// WINDOWS: define weak_odr dso_local void @"?Func@S@@QEAAXXZ"(ptr %0) #[[ATTR_RESOLVER:[0-9]+]] comdat26// WINDOWS: musttail call void @"?Func@S@@QEAAXXZ.S"(ptr %0)27// WINDOWS: musttail call void @"?Func@S@@QEAAXXZ.O"(ptr %0)28// WINDOWS: declare dso_local void @"?Func@S@@QEAAXXZ.S"29// WINDOWS: define linkonce_odr dso_local void @"?Func@S@@QEAAXXZ.O"30 31// CHECK: attributes #[[ATTR_RESOLVER]] = { disable_sanitizer_instrumentation }32