diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-06-02 22:26:15 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-06-02 22:26:15 +0000 |
commit | 02da72f60ecbc0e2c4150784ebbe57007bf31280 (patch) | |
tree | 410ff96c43f4c9ac3c2f7a7d5f9894cf0e380d8e /llvm/test/FrontendC | |
parent | 79884f38960ff9094cf2efe0b4fc2ef1b0d5be50 (diff) | |
download | bcm5719-llvm-02da72f60ecbc0e2c4150784ebbe57007bf31280.tar.gz bcm5719-llvm-02da72f60ecbc0e2c4150784ebbe57007bf31280.zip |
This should have been a C++ testcase.
llvm-svn: 132504
Diffstat (limited to 'llvm/test/FrontendC')
-rw-r--r-- | llvm/test/FrontendC/unnamed-addr.c | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/llvm/test/FrontendC/unnamed-addr.c b/llvm/test/FrontendC/unnamed-addr.c deleted file mode 100644 index 01a45d2fcb8..00000000000 --- a/llvm/test/FrontendC/unnamed-addr.c +++ /dev/null @@ -1,91 +0,0 @@ -// RUN: %llvmgcc -S %s -o - | FileCheck %s -// <rdar://problem/9402870> -typedef struct __TestResult TestResult; -typedef struct __TestResult* TestResultRef; - -typedef struct __TestImplement TestImplement; -typedef struct __TestImplement* TestImplementRef; - -typedef char*(*TestNameFunction)(void*); -typedef void(*TestRunFunction)(void*,TestResult*); -typedef int(*TestCountTestCasesFunction)(void*); - -struct __TestImplement { - TestNameFunction name; - TestRunFunction run; - TestCountTestCasesFunction countTestCases; -}; - -typedef struct __Test Test; -typedef struct __Test* TestRef; - -struct __Test { - TestImplement* isa; -}; - -typedef struct __TestCase TestCase; -typedef struct __TestCase* TestCaseRef; - -struct __TestCase { - TestImplement* isa; - const char *name; - void(*setUp)(void); - void(*tearDown)(void); - void(*runTest)(void); -}; - -extern const TestImplement TestCaseImplement; - -typedef struct __TestFixture TestFixture; -typedef struct __TestFixture* TestFixtureRef; - -struct __TestFixture { - const char *name; - void(*test)(void); -}; - -typedef struct __TestCaller TestCaller; -typedef struct __TestCaller* TestCallerRef; - -struct __TestCaller { - TestImplement* isa; - const char *name; - void(*setUp)(void); - void(*tearDown)(void); - int numberOfFixtuers; - TestFixture *fixtuers; -}; - -extern const TestImplement TestCallerImplement; - -void PassToFunction(const TestImplement*); - -const char* TestCaller_name(TestCaller* self) { - return self->name; -} - -void TestCaller_run(TestCaller* self,TestResult* result) { - TestCase cs = { (TestImplement*)&TestCaseImplement, 0, 0, 0, 0, }; - int i; - cs.setUp = self->setUp; - cs.tearDown = self->tearDown; - for (i=0; i<self->numberOfFixtuers; i++) { - cs.name = self->fixtuers[i].name; - cs.runTest = self->fixtuers[i].test; - ((Test*)(void *)&cs)->isa->run((void *)&cs,result); - } -} - -int TestCaller_countTestCases(TestCaller* self) { - PassToFunction(&TestCallerImplement); - return self->numberOfFixtuers; -} - -// CHECK: @C.0.1526 = internal unnamed_addr constant -// CHECK-NOT: @TestCaseImplement = external unnamed_addr constant %struct.TestImplement -// CHECK: @TestCaseImplement = external constant %struct.TestImplement -const TestImplement TestCallerImplement = { - (TestNameFunction)TestCaller_name, - (TestRunFunction)TestCaller_run, - (TestCountTestCasesFunction)TestCaller_countTestCases, -}; |