John McCall
bd8d9bd39c
Split out types that are non-canonical unless dependent as their own
...
category. Use this in a few places to eliminate unnecessary TST cases and
do some future-proofing. Provide terrible manglings for typeof. Mangle
decltype with some hope of accuracy.
Our manglings for some of the cases covered in the testcase are different
from gcc's, which I've raised as an issue with the ABI list.
llvm-svn: 97523
2010-03-01 23:49:17 +00:00
John McCall
de9607bc6f
The latest draft uses 'dt' to mangle member expressions, and now so do we.
...
llvm-svn: 97479
2010-03-01 19:12:25 +00:00
John McCall
334ce7c1c4
Revert the ctor/dtor alias optimization for now; the buildbots can detect
...
some failure here that I can't.
llvm-svn: 96612
2010-02-18 21:31:48 +00:00
John McCall
67cea74745
Emit complete constructors and destructors as aliases to base constructors
...
and destructors when the two entities are semantically identical, i.e. when
the class has no virtual base classes. We only do this for linkage types
for which aliases are supported, i.e. internal and external, i.e. not linkonce.
llvm-svn: 96451
2010-02-17 03:52:49 +00:00
Anders Carlsson
2c4de4c31e
Only append 'L' for internal variable declarations, not all declarations. (Found by the mangle checker, yay)
...
llvm-svn: 95485
2010-02-06 04:52:27 +00:00
Douglas Gregor
a16b0cae9a
Implement name mangling for template template parameters
...
llvm-svn: 95427
2010-02-05 20:45:00 +00:00
John McCall
d061b4429e
Mangle member expressions. Also invented.
...
llvm-svn: 95284
2010-02-04 02:56:29 +00:00
John McCall
09de8ecd88
Add mangling support for calls, sizeof/alignof, constructor calls,
...
float literals, and unresolved lookups (which required hand-wavey extensions).
llvm-svn: 95273
2010-02-04 01:42:13 +00:00
Alexis Hunt
aecc45cb3c
Mangle static variables with an extra name to distinguish them from non-static variables in the same TU.
...
Fixes PR5966 for real this time; also reverts r92911, which had a incorrect fix.
llvm-svn: 94352
2010-01-24 03:04:27 +00:00
Nuno Lopes
950d5b2cd3
fix PR5869: mangle static symbols like gcc does to make it easier to diff symbol tables
...
llvm-svn: 92911
2010-01-07 09:36:51 +00:00
Anders Carlsson
a88d197284
Mangle block pointer types. Fixes PR5858.
...
llvm-svn: 92069
2009-12-23 22:31:44 +00:00
Anders Carlsson
910847c149
Mangle template template parameters. Fixes PR5861.
...
llvm-svn: 92030
2009-12-23 19:30:55 +00:00
Anders Carlsson
8a35c7982c
Make sure that we mangle overloaded operators that are member functions correctly, giving them the correct arity.
...
With this seemingly insignificant fix, we are now able to build and link clang using clang itself! (LLVM still has to be built with gcc for the time being).
llvm-svn: 91893
2009-12-22 06:36:32 +00:00
Anders Carlsson
b7e93e268f
Mangle CXXOperatorCallExprs, fixes PR5796.
...
llvm-svn: 91507
2009-12-16 05:48:46 +00:00
Daniel Dunbar
8fbe78f6fc
Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
...
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).
llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Anders Carlsson
e66e2942fc
Mangle unary, binary and ternary expressions correctly.
...
llvm-svn: 91257
2009-12-14 01:45:37 +00:00
Eli Friedman
75c9b97123
Make sure mangling doesn't crash in another case. Add some more tests.
...
llvm-svn: 91149
2009-12-11 20:21:38 +00:00
Eli Friedman
30e94d047e
Fix for PR5706: let mangleName deal with mangling names without identifiers
...
correctly.
llvm-svn: 91136
2009-12-11 18:00:57 +00:00
Anders Carlsson
1f78b2bf62
Diagnose declarations of implicit member functions.
...
llvm-svn: 90605
2009-12-04 22:33:25 +00:00
Anders Carlsson
9e4e0237e4
Handle ParenExprs in mangleExpression.
...
llvm-svn: 86218
2009-11-06 02:50:19 +00:00
Anders Carlsson
1e39bd944b
Mangle anonymous structs/unions correctly. Fixes PR5139.
...
llvm-svn: 83448
2009-10-07 01:45:02 +00:00
Anders Carlsson
11d00cf972
When mangling names, always use the canonical decl. Fixes PR5144.
...
llvm-svn: 83420
2009-10-06 21:58:01 +00:00
Anders Carlsson
02bca738b4
Mangle dependent name expressions. Fixes PR5063.
...
llvm-svn: 82915
2009-09-27 20:11:34 +00:00
Anders Carlsson
e00745b285
Better template parameter type mangling.
...
llvm-svn: 82883
2009-09-27 00:38:53 +00:00
Anders Carlsson
3e83c30c4c
Handle substitutions in mangleTemplatePrefix.
...
llvm-svn: 82879
2009-09-26 22:18:22 +00:00
Anders Carlsson
49232b9f42
Don't crash when trying to mangle function templates.
...
llvm-svn: 82872
2009-09-26 20:13:56 +00:00
Anders Carlsson
bdaaab4671
Improve mangling of typename types.
...
llvm-svn: 82833
2009-09-26 02:26:02 +00:00
Anders Carlsson
1d3b6f62df
CXXMethodDecls should always be mangled, even if they are inside an extern "C" block. Fixes PR5017.
...
llvm-svn: 82567
2009-09-22 20:33:31 +00:00
Anders Carlsson
fc51cc968b
Don't assert that linkage decls are always C++, it's not true. Fixes PR5019.
...
llvm-svn: 82557
2009-09-22 17:23:30 +00:00
Anders Carlsson
a18322cea5
Start mangling expressions.
...
llvm-svn: 82423
2009-09-21 01:21:10 +00:00
Anders Carlsson
2b5e1dda69
More mangling goodness.
...
llvm-svn: 82193
2009-09-18 04:29:09 +00:00
Anders Carlsson
adb08de4d9
Fix error in test.
...
llvm-svn: 82190
2009-09-18 02:51:58 +00:00
Anders Carlsson
7a8a74f704
Handle mangling of TemplateSpecializationType.
...
llvm-svn: 82189
2009-09-18 02:42:01 +00:00
Anders Carlsson
ca51ef156b
Ignore extern "C++" { } when mangling.
...
llvm-svn: 82146
2009-09-17 16:12:20 +00:00
Anders Carlsson
a2fb9bcd19
Substitute unscoped template names.
...
llvm-svn: 82119
2009-09-17 04:02:31 +00:00
Anders Carlsson
df644fb773
When mangling function template specialization, mangle the type encoding of the original function template. Also, port mangle.cpp and function-template-specialization.cpp over to using FileCheck.
...
llvm-svn: 82114
2009-09-17 03:46:43 +00:00
Anders Carlsson
b3e533d9d0
Add a simple const mangling test.
...
llvm-svn: 82096
2009-09-16 23:53:19 +00:00
Anders Carlsson
23ca0b4869
Add support for converting member pointer types to LLVM types. Also mangle pointer to member functions correctly and add tests.
...
llvm-svn: 71981
2009-05-17 17:41:20 +00:00
Anders Carlsson
d3a69ceaaf
extern "C" should preserve the 'extern' qualifier for VarDecls. Fixes 6853728.
...
llvm-svn: 71957
2009-05-16 21:02:39 +00:00
Anders Carlsson
f6e9ece507
Name mangling for class template specializations and template arguments.
...
llvm-svn: 71861
2009-05-15 16:09:15 +00:00
Chris Lattner
7d4f5c47ce
only support int128_t on 64-bit and larger targets. 32-bit targets don't
...
have support for __divti3 and friends.
llvm-svn: 70480
2009-04-30 06:18:40 +00:00
Chris Lattner
f122cef4df
initial support for __[u]int128_t, which should be basically
...
compatible with VC++ and GCC. The codegen/mangling angle hasn't
been fully ironed out yet. Note that we accept int128_t even in
32-bit mode, unlike gcc.
llvm-svn: 70464
2009-04-30 02:43:43 +00:00
Anders Carlsson
1235bbce7e
Use the new guard variable mangling function and get rid of the old code.
...
llvm-svn: 68971
2009-04-13 18:03:33 +00:00
Anders Carlsson
4eca109941
Implement mangling of declarations inside functions.
...
llvm-svn: 68321
2009-04-02 16:24:45 +00:00
Anders Carlsson
f2125a02db
Mangle VarDecls correctly.
...
llvm-svn: 68320
2009-04-02 16:05:20 +00:00
Anders Carlsson
cbaeb9e633
Emit code for linkage specifications.
...
llvm-svn: 68300
2009-04-02 05:55:18 +00:00
Anders Carlsson
237f349073
Implement code generation of namespaces and add mangling tests.
...
llvm-svn: 68170
2009-04-01 00:58:25 +00:00
Anders Carlsson
7a6f8b9281
Fix a mangling bug where functions with no arguments weren't getting the 'v' parameter specifier.
...
llvm-svn: 68162
2009-04-01 00:15:23 +00:00
Daniel Dunbar
a45cf5b6b0
Rename clang to clang-cc.
...
Tests and drivers updated, still need to shuffle dirs.
llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Anders Carlsson
0275115f66
Address Doug's comments wrt the mangler and fix Eli's test case
...
llvm-svn: 66549
2009-03-10 17:07:44 +00:00