llvm-project/clang/test/CodeGenCXX/macro-prefix-map-lambda.cpp
Kai Nacke 6e04287183 [SystemZ] Fix regression in test macro-prefix-map-lambda.cpp
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
2023-06-21 12:53:15 +00:00

15 lines
525 B
C++

// RUN: %clang_cc1 -triple %itanium_abi_triple -fmacro-prefix-map=%p=./UNLIKELY_PATH/empty %s -emit-llvm -o - | FileCheck %s
template<typename f>
auto lambdatest(f&& cb) {
const char *s = __PRETTY_FUNCTION__;
return s;
}
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 {{[0-9]+}}
return 0;
}