forked from OSchip/llvm-project
Test CXXNoexceptExpr codegen and serialization.
llvm-svn: 113630
This commit is contained in:
parent
b67655fc6d
commit
8c40ba392c
|
@ -0,0 +1,15 @@
|
|||
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -S -emit-llvm -std=c++0x -include %S/ser.h %s -o - | FileCheck %s
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-pch -o %t-ser.pch -std=c++0x -x c++ %S/ser.h
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -S -emit-llvm -std=c++0x -include-pch %t-ser.pch %s -o - | FileCheck %s
|
||||
|
||||
void test() {
|
||||
bool b;
|
||||
// CHECK: store i8 1, i8* %b, align 1
|
||||
b = noexcept(0);
|
||||
// CHECK: store i8 0, i8* %b, align 1
|
||||
b = noexcept(throw 0);
|
||||
// CHECK: ret i1 true
|
||||
b = f1();
|
||||
// CHECK: ret i1 false
|
||||
b = f2();
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
// Serialization testing helper for noexcept, included by cg.cpp.
|
||||
|
||||
inline bool f1() {
|
||||
return noexcept(0);
|
||||
}
|
||||
inline bool f2() {
|
||||
return noexcept(throw 0);
|
||||
}
|
Loading…
Reference in New Issue