[SystemZ] Fix regression in test macro-prefix-map-lambda.cpp
authorKai Nacke <kai.peter.nacke@ibm.com>
Tue, 20 Jun 2023 14:26:57 +0000 (14:26 +0000)
committerKai Nacke <kai.peter.nacke@ibm.com>
Wed, 21 Jun 2023 12:53:15 +0000 (12:53 +0000)
The failing test comes from https://reviews.llvm.org/D152570.
Root cause of the failure is that a string constant on SystemZ
has an alignment of 2, not 1. The CSKY target has a similar problem.
The solution is to replace the fixed number with a regex.

Reviewed By: uweigand, tuliom, Zibi

Differential Revision: https://reviews.llvm.org/D153352

clang/test/CodeGenCXX/macro-prefix-map-lambda.cpp

index e87f0ab..19b2a47 100644 (file)
@@ -8,7 +8,7 @@ auto lambdatest(f&& cb) {
 
 int main() {
   auto *s = lambdatest([](){});
-// CHECK: @"__PRETTY_FUNCTION__._Z10lambdatestIZ4mainE3$_0EDaOT_" = private unnamed_addr constant [{{[0-9]+}} x i8] c"auto lambdatest(f &&) [f = (lambda at ./UNLIKELY_PATH/empty{{/|\\\\}}{{.*}}.cpp:[[#@LINE-1]]:24)]\00", align 1
+// CHECK: @"__PRETTY_FUNCTION__._Z10lambdatestIZ4mainE3$_0EDaOT_" = private unnamed_addr constant [{{[0-9]+}} x i8] c"auto lambdatest(f &&) [f = (lambda at ./UNLIKELY_PATH/empty{{/|\\\\}}{{.*}}.cpp:[[#@LINE-1]]:24)]\00", align {{[0-9]+}}
 
   return 0;
 }