blob: 2a6e641aec9c5c99ee0de9709fb77314764f6c53 [file] [log] [blame]
Stephen Hines6bcf27b2014-05-29 04:14:42 -07001// 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
6extern "C" int printf(const char *, ...);
7
8void freeFunc(int *, char) {
9 printf("__FUNCSIG__ %s\n\n", __FUNCSIG__);
10}
Stephen Hines176edba2014-12-01 14:53:08 -080011// 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 Hines6bcf27b2014-05-29 04:14:42 -070012
13struct TopLevelClass {
14 void topLevelMethod(int *, char);
15};
16void TopLevelClass::topLevelMethod(int *, char) {
17 printf("__FUNCSIG__ %s\n\n", __FUNCSIG__);
18}
Stephen Hines176edba2014-12-01 14:53:08 -080019// 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 Hines6bcf27b2014-05-29 04:14:42 -070020
21namespace NS {
22struct NamespacedClass {
23 void namespacedMethod(int *, char);
24};
25void NamespacedClass::namespacedMethod(int *, char) {
26 printf("__FUNCSIG__ %s\n\n", __FUNCSIG__);
27}
Stephen Hines176edba2014-12-01 14:53:08 -080028// 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 Hines6bcf27b2014-05-29 04:14:42 -070029}