mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 03:29:57 +00:00
Add a test case, to make sure there is no crash on IRGen when using PCH
Related to rdar://13114142 llvm-svn: 176227
This commit is contained in:
parent
eed2dc5769
commit
397ef40f6b
39
clang/test/PCH/irgen-rdar13114142.mm
Normal file
39
clang/test/PCH/irgen-rdar13114142.mm
Normal file
@ -0,0 +1,39 @@
|
||||
// RUN: %clang_cc1 %s -emit-pch -o %t.pch
|
||||
// RUN: %clang_cc1 %s -emit-llvm %s -include-pch %t.pch -o - | FileCheck %s
|
||||
|
||||
#ifndef HEADER
|
||||
#define HEADER
|
||||
|
||||
class OOArray{
|
||||
public:
|
||||
~OOArray();
|
||||
};
|
||||
|
||||
class OOString {
|
||||
public:
|
||||
OOString();
|
||||
OOString(char *);
|
||||
};
|
||||
|
||||
class OOPattern {
|
||||
public:
|
||||
OOArray matchAll(const OOString &)const {
|
||||
__attribute__((__blocks__(byref))) OOArray out;
|
||||
}
|
||||
};
|
||||
|
||||
OOArray operator & (const OOPattern & pattern) {
|
||||
pattern.matchAll(0);
|
||||
}
|
||||
OOArray operator & (OOString, OOString);
|
||||
|
||||
#else
|
||||
|
||||
// We just make sure there is no crash on IRGen (rdar://13114142)
|
||||
// CHECK: _Z3foov()
|
||||
void foo() {
|
||||
OOString str;
|
||||
str & "o";
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user