Mercurial > hg > CbC > CbC_llvm
annotate clang/test/PCH/no-escaping-block-tail-calls.cpp @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children | c4bab56944e8 |
rev | line source |
---|---|
150 | 1 // RUN: %clang_cc1 -x c++-header -triple x86_64-apple-darwin11 -emit-pch -O2 -fblocks -fno-escaping-block-tail-calls -o %t %S/no-escaping-block-tail-calls.h |
2 // RUN: %clang_cc1 -triple x86_64-apple-darwin11 -include-pch %t -emit-llvm -O2 -fblocks -fno-escaping-block-tail-calls -o - %s | FileCheck %s | |
3 | |
4 // Check that -fno-escaping-block-tail-calls doesn't disable tail-call | |
5 // optimization if the block is non-escaping. | |
6 | |
7 // CHECK-LABEL: define internal i32 @___ZN1S1mEv_block_invoke( | |
8 // CHECK: %[[CALL:.*]] = tail call i32 @_ZN1S3fooER2S0( | |
9 // CHECK-NEXT: ret i32 %[[CALL]] | |
10 | |
11 void test() { | |
12 S s; | |
13 s.m(); | |
14 } |