From 8380a9458122c9054012401f95dc498aa2014cdf Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 4 Oct 2021 09:20:07 +0200 Subject: [PATCH] Adjust the testsuite after various changes (rpass, libclang, polly lib, etc) --- debian/changelog | 2 ++ debian/qualify-clang.sh | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 765c994f..7709a6ea 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ llvm-toolchain-13 (1:13.0.0-2) unstable; urgency=medium * Fix the libclang detection in cmake (Closes: #994827) + * Adjust the testsuite after various changes + (rpass, libclang, polly lib, etc) -- Sylvestre Ledru Sun, 03 Oct 2021 22:38:18 +0200 diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index 99b312ae..5db5b871 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -1250,9 +1250,18 @@ fi echo " int foo(int x, int y) __attribute__((always_inline)); int foo(int x, int y) { return x + y; } -int bar(int j) { return foo(j, j - 2); }" > foo.cc +int bar(int j) { return foo(j, j - 2); } +int sum = 0; + +int main(int argc, const char *argv[]) { + for (int i = 0; i < 30; i++) + bar(argc); + return sum; +} + +" > foo.cc clang-$VERSION -O2 -Rpass=inline foo.cc -c &> foo.log -if ! grep -q "cost=always" foo.log; then +if ! grep -q -E "(inlined into main with|cost=always)" foo.log; then echo "-Rpass fails" cat foo.log exit 1