1*5fa4cf82SAlexandre Ganea // REQUIRES: aarch64-registered-target
2*5fa4cf82SAlexandre Ganea ///
3*5fa4cf82SAlexandre Ganea /// Check that using /hotpatch doesn't generate an error.
4*5fa4cf82SAlexandre Ganea /// Binaries are always hotpatchable on ARM/ARM64.
5*5fa4cf82SAlexandre Ganea ///
6*5fa4cf82SAlexandre Ganea // RUN: %clang_cl --target=aarch64-pc-windows-msvc /c /hotpatch /Z7 -- %s 2>&1
7*5fa4cf82SAlexandre Ganea ///
8*5fa4cf82SAlexandre Ganea /// Ensure that we set the hotpatchable flag in the debug information.
9*5fa4cf82SAlexandre Ganea ///
10*5fa4cf82SAlexandre Ganea // RUN: %clang_cl --target=aarch64-pc-windows-msvc /c /Z7 -o %t.obj -- %s
11*5fa4cf82SAlexandre Ganea // RUN: llvm-pdbutil dump -symbols %t.obj | FileCheck %s --check-prefix=HOTPATCH
12*5fa4cf82SAlexandre Ganea // HOTPATCH: S_COMPILE3 [size = [[#]]]
13*5fa4cf82SAlexandre Ganea // HOTPATCH: flags = hot patchable
14*5fa4cf82SAlexandre Ganea ///
15*5fa4cf82SAlexandre Ganea /// Unfortunately we need /Z7, Clang does not systematically generate S_COMPILE3.
16*5fa4cf82SAlexandre Ganea ///
17*5fa4cf82SAlexandre Ganea // RUN: %clang_cl --target=aarch64-pc-windows-msvc /c -o %t.obj -- %s
18*5fa4cf82SAlexandre Ganea // RUN: llvm-pdbutil dump -symbols %t.obj | FileCheck %s --check-prefix=NO-HOTPATCH
19*5fa4cf82SAlexandre Ganea // NO-HOTPATCH-NOT: flags = hot patchable
20*5fa4cf82SAlexandre Ganea
main()21*5fa4cf82SAlexandre Ganea int main() {
22*5fa4cf82SAlexandre Ganea return 0;
23*5fa4cf82SAlexandre Ganea }
24