Skip to content

Commit

Permalink
[LLDB] Add PDB/calling-conventions.test for Arm/Windows
Browse files Browse the repository at this point in the history
This patch renames PDB/calling-conventions.test to calling-conventions-x86.test.
Also restrict it to run only for target-x86*.
This patch also adds a arm specific test PDB/calling-conventions-arm.test which
tests that x86 specifc calling convention decorators are ignored by Arm compiler.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D128678
  • Loading branch information
omjavaid committed Jun 29, 2022
1 parent a18baf1 commit 01bc838
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
11 changes: 11 additions & 0 deletions lldb/test/Shell/SymbolFile/PDB/calling-conventions-arm.test
@@ -0,0 +1,11 @@
REQUIRES: system-windows, lld, (target-arm || target-aarch64)
RUN: %build --compiler=clang-cl --arch=32 --nodefaultlib --output=%t.exe %S/Inputs/CallingConventionsTest.cpp
RUN: %build --compiler=clang-cl --arch=64 --nodefaultlib --output=%t.exe %S/Inputs/CallingConventionsTest.cpp
RUN: lldb-test symbols -dump-ast %t.exe | FileCheck %s

CHECK: Module: {{.*}}
CHECK-DAG: int (*FuncCCallPtr)();
CHECK-DAG: int (*FuncStdCallPtr)();
CHECK-DAG: int (*FuncFastCallPtr)();
CHECK-DAG: int (*FuncVectorCallPtr)();
CHECK-DAG: int (S::*FuncThisCallPtr)();
19 changes: 19 additions & 0 deletions lldb/test/Shell/SymbolFile/PDB/calling-conventions-x86.test
@@ -0,0 +1,19 @@
REQUIRES: system-windows, lld, (target-x86 || target-x86_64)
RUN: %build --compiler=clang-cl --arch=32 --nodefaultlib --output=%t.exe %S/Inputs/CallingConventionsTest.cpp \
RUN: && lldb-test symbols -dump-ast %t.exe | FileCheck --check-prefix 32BIT-CHECK %s
RUN: %build --compiler=clang-cl --arch=64 --nodefaultlib --output=%t.exe %S/Inputs/CallingConventionsTest.cpp \
RUN: && lldb-test symbols -dump-ast %t.exe | FileCheck --check-prefix 64BIT-CHECK %s

64BIT-CHECK: Module: {{.*}}
64BIT-CHECK-DAG: int (*FuncCCallPtr)();
64BIT-CHECK-DAG: int (*FuncStdCallPtr)();
64BIT-CHECK-DAG: int (*FuncFastCallPtr)();
64BIT-CHECK-DAG: int (*FuncVectorCallPtr)() __attribute__((vectorcall));
64BIT-CHECK-DAG: int (S::*FuncThisCallPtr)();

32BIT-CHECK: Module: {{.*}}
32BIT-CHECK-DAG: int (*FuncCCallPtr)();
32BIT-CHECK-DAG: int (*FuncStdCallPtr)() __attribute__((stdcall));
32BIT-CHECK-DAG: int (*FuncFastCallPtr)() __attribute__((fastcall));
32BIT-CHECK-DAG: int (*FuncVectorCallPtr)() __attribute__((vectorcall));
32BIT-CHECK-DAG: int (S::*FuncThisCallPtr)() __attribute__((thiscall));
10 changes: 0 additions & 10 deletions lldb/test/Shell/SymbolFile/PDB/calling-conventions.test

This file was deleted.

0 comments on commit 01bc838

Please sign in to comment.