Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 1 | // RUN: %clang_cc1 -std=c++11 -triple i686-pc-win32 %s -fms-extensions -fno-rtti -emit-llvm -o - | FileCheck %s |
| 2 | |
| 3 | // Similar to predefined-expr.cpp, but not as exhaustive, since it's basically |
| 4 | // equivalent to __PRETTY_FUNCTION__. |
| 5 | |
| 6 | extern "C" int printf(const char *, ...); |
| 7 | |
| 8 | void freeFunc(int *, char) { |
| 9 | printf("__FUNCSIG__ %s\n\n", __FUNCSIG__); |
| 10 | } |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 11 | // CHECK: @"\01??_C@_0CD@KLGMNNL@void?5__cdecl?5freeFunc?$CIint?5?$CK?0?5cha@" = linkonce_odr unnamed_addr constant [{{.*}} x i8] c"void __cdecl freeFunc(int *, char)\00" |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 12 | |
| 13 | struct TopLevelClass { |
| 14 | void topLevelMethod(int *, char); |
| 15 | }; |
| 16 | void TopLevelClass::topLevelMethod(int *, char) { |
| 17 | printf("__FUNCSIG__ %s\n\n", __FUNCSIG__); |
| 18 | } |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 19 | // CHECK: @"\01??_C@_0DL@OBHNMDP@void?5__thiscall?5TopLevelClass?3?3t@" = linkonce_odr unnamed_addr constant [{{.*}} x i8] c"void __thiscall TopLevelClass::topLevelMethod(int *, char)\00" |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 20 | |
| 21 | namespace NS { |
| 22 | struct NamespacedClass { |
| 23 | void namespacedMethod(int *, char); |
| 24 | }; |
| 25 | void NamespacedClass::namespacedMethod(int *, char) { |
| 26 | printf("__FUNCSIG__ %s\n\n", __FUNCSIG__); |
| 27 | } |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 28 | // CHECK: @"\01??_C@_0ED@PFDKIEBA@void?5__thiscall?5NS?3?3NamespacedCl@" = linkonce_odr unnamed_addr constant [{{.*}} x i8] c"void __thiscall NS::NamespacedClass::namespacedMethod(int *, char)\00" |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 29 | } |