From 31fc8b7c0a6c1d844c87b706dccb5c83bd3c3b2c Mon Sep 17 00:00:00 2001 From: eastb233 Date: Fri, 5 Sep 2025 16:21:22 +0800 Subject: [PATCH] [NFC] Fix no-plt test cases --- llvm/test/CodeGen/AArch64/fno-plt.c | 6 ++--- llvm/test/CodeGen/AArch64/fno-plt.cpp | 35 --------------------------- 2 files changed, 3 insertions(+), 38 deletions(-) delete mode 100644 llvm/test/CodeGen/AArch64/fno-plt.cpp diff --git a/llvm/test/CodeGen/AArch64/fno-plt.c b/llvm/test/CodeGen/AArch64/fno-plt.c index 81ed912ce927..6cc59b683da2 100644 --- a/llvm/test/CodeGen/AArch64/fno-plt.c +++ b/llvm/test/CodeGen/AArch64/fno-plt.c @@ -1,8 +1,8 @@ -// RUN: clang %s -shared -fno-plt -O2 -fno-inline -fPIC -o noplt.so +// RUN: clang %s -shared -fno-plt -O2 -fno-inline -fPIC --target=aarch64-linux-gnu -fuse-ld=lld -nostdlib -o noplt.so // RUN: llvm-objdump -d noplt.so | FileCheck %s --check-prefix=CHECK-NO-PLT -// RUN: clang %s -shared -O2 -fno-inline -fPIC -o plt.so -// RUN: llvm-objdump -d plt.so | FileCheck %s --check-prefix=CHECK-PLT +// RUN: clang %s -shared -O2 -fno-inline -fPIC --target=aarch64-linux-gnu -fuse-ld=lld -nostdlib -o plt.so +// RUN: llvm-objdump -d plt.so | FileCheck %s --check-prefix=CHECK-PLT // CHECK-PLT: bar@plt // CHECK-PLT: bar1@plt diff --git a/llvm/test/CodeGen/AArch64/fno-plt.cpp b/llvm/test/CodeGen/AArch64/fno-plt.cpp deleted file mode 100644 index c5a1f2f24b37..000000000000 --- a/llvm/test/CodeGen/AArch64/fno-plt.cpp +++ /dev/null @@ -1,35 +0,0 @@ -// RUN: clang -x c++ %s -shared -fno-plt -O2 -fno-inline -fPIC -o noplt.so -// RUN: llvm-objdump -d noplt.so | FileCheck %s --check-prefix=CHECK-NO-PLT - -// RUN: clang -x c++ %s -shared -O0 -fPIC -o plt.so -// RUN: llvm-objdump -d plt.so | FileCheck %s --check-prefix=CHECK-PLT - -// RUN: clang -x c++ %s -shared -O2 -fno-inline -fPIC -o plt.so -// RUN: llvm-objdump -d plt.so | FileCheck %s --check-prefix=CHECK-PLT - -// CHECK-PLT: bar@plt -// CHECK-PLT: bar1@plt -// CHECK-NO-PLT-NOT: bar@plt -// CHECK-NO-PLT-NOT: bar1@plt -// CHECK-NO-PLT-NOT: bar2@plt - -__attribute__((optnone)) -void bar(int a) { - return; -} - -__attribute__((optnone)) -extern void bar1(int); - -__attribute__((optnone)) -static void bar2(int a) { - return; -} - -void foo(int a) { - bar(a); - bar1(a); - bar2(a); - return; -} - -- Gitee