llvm-project/clang/test/CodeGenCXX/debug-info-hotpatch.cpp
Zahira Ammarguellat 4dfa68e483 [NFC] Fix debug-info-hotpatch.cpp failure due to downstream regex issue.
In our downstream, we discovered that the that the .* wildcard
in debug-info-hotpatch.cpp (added https://reviews.llvm.org/D116511)
ended up matching the entire line on our Windows configurations, causing
the -function-padmin check to already be consumed. After digging into it
we weren't able to find any sort of reason why the platform would matter
here, however we suspect there must be some difference in the regex
matcher between systems.
This NFC patch replaces the regex with a more conservative regex that
prevents this from happening by replacing the . match with an 'everything
but double-quote match, [^"].

https://reviews.llvm.org/D120066
2022-02-17 10:59:54 -08:00

21 lines
738 B
C++

// REQUIRES: x86-registered-target
///
// RUN: %clang_cl --target=x86_64-windows-msvc /c /hotpatch /Z7 -o %t.obj -- %s
// RUN: llvm-pdbutil dump -symbols %t.obj | FileCheck %s --check-prefix=HOTPATCH
// HOTPATCH: S_COMPILE3 [size = [[#]]]
// HOTPATCH: flags = hot patchable
///
// RUN: %clang_cl --target=x86_64-windows-msvc /c /Z7 -o %t.obj -- %s
// RUN: llvm-pdbutil dump -symbols %t.obj | FileCheck %s --check-prefix=NO-HOTPATCH
// NO-HOTPATCH-NOT: flags = hot patchable
///
// RUN: %clang_cl --target=x86_64-windows-msvc /hotpatch -### -- %s 2>&1 \
// RUN: | FileCheck %s --check-prefix=FUNCTIONPADMIN
// FUNCTIONPADMIN: clang{{.*}}
// FUNCTIONPADMIN: {{link[^"]*"}}
// FUNCTIONPADMIN: -functionpadmin
int main() {
return 0;
}