Amir Ayupov 79c2fe066d [BOLT][TEST] Update fptr.test
The test exercises an implicit ptr-to-int conversion which is made an error in
D129881. We acknowledge the error but still want to test this case.
Add `-Wno-int-conversion` to silence the error.

Reviewed By: maksfb

Differential Revision: https://reviews.llvm.org/D130546
2022-07-25 22:00:46 -07:00

10 lines
310 B
Plaintext

# Make sure BOLT correctly updates values based on function pointer.
RUN: %clang %cflags -Wno-int-conversion -no-pie %p/Inputs/fptr.c -Wl,-q -o %t.exe
RUN: llvm-bolt %t.exe -o %t --lite=0
RUN: %t | FileCheck %s
CHECK: Global = 0x[[#%x,ADDR:]]
CHECK-NEXT: Local = 0x[[#ADDR]]
CHECK-NEXT: Local2 = 0x[[#ADDR]]