Fariborz Jahanian | 876681e | 2010-04-20 22:02:31 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s |
| 2 | // pr6644 |
| 3 | |
| 4 | extern "C" { |
| 5 | namespace N { |
| 6 | struct X { |
| 7 | virtual void f(); |
| 8 | }; |
| 9 | void X::f() { } |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | // CHECK: define void @_ZN1N1X1fEv |
Rafael Espindola | 950fee2 | 2013-02-14 01:18:37 +0000 | [diff] [blame] | 14 | |
| 15 | extern "C" { |
| 16 | static void test2_f() { |
| 17 | } |
Rafael Espindola | 02fb50d | 2013-02-23 00:26:28 +0000 | [diff] [blame] | 18 | // CHECK: define internal void @_Z7test2_fv |
| 19 | static void test2_f(int x) { |
| 20 | } |
| 21 | // CHECK: define internal void @_Z7test2_fi |
Rafael Espindola | 950fee2 | 2013-02-14 01:18:37 +0000 | [diff] [blame] | 22 | void test2_use() { |
| 23 | test2_f(); |
Rafael Espindola | 02fb50d | 2013-02-23 00:26:28 +0000 | [diff] [blame] | 24 | test2_f(42); |
Rafael Espindola | 950fee2 | 2013-02-14 01:18:37 +0000 | [diff] [blame] | 25 | } |
| 26 | } |
Rafael Espindola | 83dece5 | 2013-02-14 15:38:59 +0000 | [diff] [blame] | 27 | |
| 28 | extern "C" { |
| 29 | struct test3_s { |
| 30 | }; |
| 31 | bool operator==(const int& a, const test3_s& b) { |
| 32 | } |
| 33 | } |