John McCall
491462425a
Don't crash when mangling empty anonymous unions. We never actually *need*
...
these, but it's convenient to mangle them when deferring them (in the 99.99%
case where it's not an anonymous union, of course).
llvm-svn: 110381
2010-08-05 22:02:13 +00:00
John McCall
268b576b72
Mangle enum constant expressions. Fixes rdar://problem/8204122
...
llvm-svn: 109315
2010-07-24 01:17:35 +00:00
Eli Friedman
f8340deacd
Fix mangling for static member variables of classes inside an extern "C"
...
linkage specification. Not sure if this is the ideal fix, but I'm reasonably
sure it's correct vs. gcc.
llvm-svn: 108656
2010-07-18 20:49:59 +00:00
John McCall
4f3b5f302c
Fix the mangling of template template arguments, which do not always
...
follow <name>; instead they follow <type>, which has <name> as a subset.
Fixes PR7446.
llvm-svn: 108326
2010-07-14 06:43:17 +00:00
Anders Carlsson
d951a7ebf8
Correctly mangle unsigned integer literals where the high bit is set.
...
llvm-svn: 105312
2010-06-02 05:07:26 +00:00
Anders Carlsson
728fe444f1
Correctly mangle variadic functions that don't have any other parameters.
...
llvm-svn: 105311
2010-06-02 04:40:13 +00:00
John McCall
09277542f2
Provide manglings for bool and character literal expressions. These are
...
just integer-literal expressions with special case implementations in the AST.
Fixes rdar://problem/7825453.
llvm-svn: 100905
2010-04-09 21:48:08 +00:00
John McCall
3155f573f5
Turn access control on by default in -cc1.
...
Remove -faccess-control from -cc1; add -fno-access-control.
Make the driver pass -fno-access-control by default.
Update a bunch of tests to be correct under access control.
llvm-svn: 100880
2010-04-09 19:03:51 +00:00
Rafael Espindola
cd7eef900f
Correctly mangle dependent TypenameType.
...
Fixes PR6625.
llvm-svn: 98707
2010-03-17 04:28:11 +00:00
Douglas Gregor
b14d123774
Give explicit template instantiations weak ODR linkage. Former
...
iterations of this patch gave explicit template instantiation
link-once ODR linkage, which permitted the back end to eliminate
unused symbols. Weak ODR linkage still requires the symbols to be
generated.
llvm-svn: 98441
2010-03-13 18:23:07 +00:00
Douglas Gregor
17b76185f1
Re-revert the explicit template instantiation linkage patch. I am beginning to look incompetent
...
llvm-svn: 98425
2010-03-13 03:49:57 +00:00
Douglas Gregor
89cae0f224
Reinstate patch to turn explicit template instantiations into weak symbols
...
llvm-svn: 98424
2010-03-13 03:14:19 +00:00
Douglas Gregor
539bc40906
Revert the linkage change for explicit template instantiations; something is amiss
...
llvm-svn: 98332
2010-03-12 05:13:59 +00:00
Douglas Gregor
ee3f72299c
Give explicit template instantiations weak linkage (but don't defer
...
them). Fixes PR6578.
llvm-svn: 98328
2010-03-12 04:49:06 +00:00
Rafael Espindola
4d5c3d99e5
Correctly mangle address of member in template arguments. Fixes PR6460
...
llvm-svn: 98254
2010-03-11 14:07:00 +00:00
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
Anders Carlsson
4ed74dd6b7
Make mangling work with anonymous tag types. Doug, please review
...
llvm-svn: 66353
2009-03-07 23:57:03 +00:00
Douglas Gregor
5fec5b0495
Add basic support for C++ name mangling according to the Itanium C++
...
ABI to the CodeGen library. Since C++ code-generation is so
incomplete, we can't exercise much of this mangling code. However, a
few smoke tests show that it's doing the same thing as GCC. When C++
codegen matures, we'll extend the ABI tester to verify name-mangling
as well, and complete the implementation here.
At this point, the major client of name mangling is in the uses of the
new "overloadable" attribute in C, which allows overloading. Any
"overloadable" function in C (or in an extern "C" block in C++) will
be mangled the same way that the corresponding C++ function would be
mangled.
llvm-svn: 64413
2009-02-13 00:10:09 +00:00