1*5fa4cf82SAlexandre Ganea // REQUIRES: arm-registered-target
25af2433eSAlexandre Ganea ///
35af2433eSAlexandre Ganea /// Check that using /hotpatch doesn't generate an error.
45af2433eSAlexandre Ganea /// Binaries are always hotpatchable on ARM/ARM64.
55af2433eSAlexandre Ganea ///
65af2433eSAlexandre Ganea // RUN: %clang_cl --target=arm-pc-windows-msvc /c /hotpatch /Z7 -- %s 2>&1
75af2433eSAlexandre Ganea ///
85af2433eSAlexandre Ganea /// Ensure that we set the hotpatchable flag in the debug information.
95af2433eSAlexandre Ganea ///
105af2433eSAlexandre Ganea // RUN: %clang_cl --target=arm-pc-windows-msvc /c /Z7 -o %t.obj -- %s
115af2433eSAlexandre Ganea // RUN: llvm-pdbutil dump -symbols %t.obj | FileCheck %s --check-prefix=HOTPATCH
125af2433eSAlexandre Ganea // HOTPATCH: S_COMPILE3 [size = [[#]]]
135af2433eSAlexandre Ganea // HOTPATCH: flags = hot patchable
145af2433eSAlexandre Ganea ///
155af2433eSAlexandre Ganea /// Unfortunately we need /Z7, Clang does not systematically generate S_COMPILE3.
165af2433eSAlexandre Ganea ///
17*5fa4cf82SAlexandre Ganea // RUN: %clang_cl --target=arm-pc-windows-msvc /c -o %t.obj -- %s
185af2433eSAlexandre Ganea // RUN: llvm-pdbutil dump -symbols %t.obj | FileCheck %s --check-prefix=NO-HOTPATCH
195af2433eSAlexandre Ganea // NO-HOTPATCH-NOT: flags = hot patchable
205af2433eSAlexandre Ganea 
main()215af2433eSAlexandre Ganea int main() {
225af2433eSAlexandre Ganea   return 0;
235af2433eSAlexandre Ganea }
24