John McCall
68ff03728a
Implement ARM static local initialization guards, which are more compact than
...
Itanium guards and use a slightly different compiled-in API.
llvm-svn: 113330
2010-09-08 01:44:27 +00:00
Anders Carlsson
709ef8e46c
Add function for mangling reference temporaries.
...
llvm-svn: 106948
2010-06-26 16:09:40 +00:00
Fariborz Jahanian
9b5528d278
Patch to correctly mangle block helper functions
...
when block literal is declared inside a ctor/dtor.
Fixes radr 8096995.
llvm-svn: 106700
2010-06-24 00:08:06 +00:00
Charles Davis
b6a5a0d9e1
When mangling for the Microsoft C++ ABI, mangle variables in the global
...
namespace, too.
llvm-svn: 105809
2010-06-11 04:25:47 +00:00
Charles Davis
74ce85980b
Add a stub Microsoft Visual C++ ABI class (with stub mangler).
...
llvm-svn: 105767
2010-06-09 23:25:41 +00:00
Charles Davis
7de6638173
Make methods non-virtual again for now. I accidentally committed this in
...
preparation for an alternate mangler.
llvm-svn: 105224
2010-05-31 17:07:59 +00:00
Chandler Carruth
9e814c0d80
Silence GCC warning about an accessible non-virtual destructor in a class with
...
virtual methods.
Please review cdavis, should these methods even be virtual?
llvm-svn: 105218
2010-05-31 08:27:42 +00:00
Charles Davis
c9e78145b0
Extract the ObjC and blocks manglers into their own class. No functionality
...
change.
llvm-svn: 104715
2010-05-26 18:25:27 +00:00
Douglas Gregor
7e10f3699a
Improve name mangling for blocks and support mangling of static local
...
variables within blocks. We loosely follow GCC's mangling, but since
these are always internal symbols the names don't really matter. I
intend to revisit block mangling later, because GCC's mangling is
rather verbose. <rdar://problem/8015719>.
llvm-svn: 104610
2010-05-25 17:04:15 +00:00
Anders Carlsson
11e5140db9
Vtable -> VTable renames across the board.
...
llvm-svn: 101666
2010-04-17 20:15:18 +00:00
John McCall
6936c863b0
Provide an extremely unsatisfactory diagnostic (instead of crashing) when
...
mangling an unknown expression kind. Also conveniently tells the user what
kind of expression they should add to the mangler!
llvm-svn: 100907
2010-04-09 22:26:14 +00:00
Anders Carlsson
f141dd1b95
Remove the old vtable layout code.
...
llvm-svn: 99869
2010-03-30 03:43:47 +00:00
Douglas Gregor
2538674a98
Change two class forward declarations to struct forward declarations, silencing a Clang warning
...
llvm-svn: 99405
2010-03-24 16:59:08 +00:00
Anders Carlsson
cd836f0b5f
More thunks scaffolding.
...
llvm-svn: 99294
2010-03-23 17:17:29 +00:00
John McCall
7ec5043c2c
Change CodeGenModule to rely on the Module's symbol table instead of
...
shadowing it in the GlobalDeclMap. Eliminates the string-uniquing
requirement for mangled names, which should help C++ codegen times a little.
Forces us to do string lookups instead of pointer lookups, which might hurt
codegen times a little across the board. We'll see how it plays out.
Removing the string-uniquing requirement implicitly fixes any bugs like
PR6635 which arose from the fact that we had multiple uniquing tables for
different kinds of identifiers.
llvm-svn: 99012
2010-03-19 23:29:14 +00:00
Fariborz Jahanian
9eba9dfb0c
Refactor local class name mangling and make it
...
ABI conforming.
llvm-svn: 97702
2010-03-04 01:02:03 +00:00
Eli Friedman
37e4c41283
Work-in-progress: teach mangler how to mangle thunks for destructors.
...
llvm-svn: 90360
2009-12-03 00:03:05 +00:00
Mike Stump
c01c2b87e8
Change rtti/Rtti to RTTI, as it is an acronym.
...
llvm-svn: 90334
2009-12-02 18:57:08 +00:00
Anders Carlsson
2f87c4f1a5
Add a CovariantThunkAdjustment struct that represents the adjustments needed for a covariant thunk.
...
llvm-svn: 89933
2009-11-26 03:09:37 +00:00
Anders Carlsson
abe274a8b0
Move the mangler into the CodeGen namespace. Change mangleThunk to take a ThunkAdjustment.
...
llvm-svn: 89930
2009-11-26 02:49:32 +00:00
Anders Carlsson
c778540f9a
Add a ThunkAdjustment struct which holds a non-virtual and a virtual adjustment offset. Start using it. General cleanup in Mangle.cpp.
...
llvm-svn: 89925
2009-11-26 02:32:05 +00:00
Daniel Dunbar
e949e6cced
Mangler: Lift shouldMangleDeclName predicate out of CXXNameMangler::mangle.
...
- Sometimes we have to mangle things we wouldn't normally (e.g., because they appear in a template expression).
- This also tidies up the predicate to be more obvious what is getting mangled.
llvm-svn: 89555
2009-11-21 09:14:52 +00:00
Daniel Dunbar
e128dd18ab
IRgen: Switch the C++ mangler interfaces to take the SmallVector to write into,
...
instead of requiring clients to make a raw_svector_ostream, which is just an
implementation detail.
llvm-svn: 89548
2009-11-21 09:06:22 +00:00
Daniel Dunbar
ef5d75afeb
Sink free mangle* methods into MangleContext.
...
llvm-svn: 89547
2009-11-21 09:06:10 +00:00
Mike Stump
2ec5dd7160
Mangling support for typeinfo names.
...
llvm-svn: 88726
2009-11-14 00:14:13 +00:00
Mike Stump
ef15744092
Add mangling for the construction vtable.
...
llvm-svn: 86643
2009-11-10 01:41:59 +00:00
Anders Carlsson
958c9f8524
Fix thinko, mangleCXXRtti should obviously take a QualType!
...
llvm-svn: 85565
2009-10-30 01:52:02 +00:00
Anders Carlsson
430046321b
mangleCXXRtti obviously needs to take a type, what was I thinking...
...
llvm-svn: 85555
2009-10-30 01:26:12 +00:00
Mike Stump
82d25e4e5e
Add mangling for VTTs.
...
llvm-svn: 85363
2009-10-28 01:51:46 +00:00
Anders Carlsson
2295f31810
Change mangleCXXVtable and mangleCXXRtti to take CXXRecordDecls instead of QualTypes.
...
llvm-svn: 83793
2009-10-11 21:24:51 +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
ff971e8bf4
Add a MangleContext and pass it to all mangle functions. It will be used for keeping state, such as identifiers assigned to anonymous structs as well as scope encoding.
...
llvm-svn: 83442
2009-10-07 01:06:45 +00:00
Mike Stump
80f6ac5a4f
Add basic covariant thunk generation support. WIP.
...
llvm-svn: 81585
2009-09-11 23:25:56 +00:00
Mike Stump
11289f4280
Remove tabs, and whitespace cleanups.
...
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Mike Stump
e73d5ca9a8
Refine vcall offsets. Cleanups. WIP.
...
llvm-svn: 81143
2009-09-07 04:27:52 +00:00
Mike Stump
453fe4285d
Install thunks later to fixup overrides. Track space taken by vbase
...
offsets better for thunk refinements. Cleanups. WIP.
llvm-svn: 81067
2009-09-05 07:20:32 +00:00
Mike Stump
3f707e9f14
Add mangling for covariant thunks.
...
llvm-svn: 80747
2009-09-02 00:56:18 +00:00
Mike Stump
a119813218
Shorten name.
...
llvm-svn: 80744
2009-09-02 00:28:47 +00:00
Mike Stump
9cc7d30435
Add mangling for thunks.
...
llvm-svn: 80743
2009-09-02 00:25:38 +00:00
Mike Stump
183c3d2f59
Add beginnigs of rtti generation, wire up more of -fno-exceptions.
...
llvm-svn: 77751
2009-07-31 23:15:31 +00:00
Mike Stump
bc78a728ee
Add code to setup the vtable pointer in the constructor. Work in progress.
...
llvm-svn: 77699
2009-07-31 18:25:34 +00:00
Anders Carlsson
eaa28f7e18
Add support for generating (very basic) C++ destructors. These aren't called by anything yet.
...
llvm-svn: 69343
2009-04-17 01:58:57 +00:00
Anders Carlsson
e4c40c8baf
Add support for mangling C++ constructors. Review appreciated (I'm looking at you, Doug)
...
llvm-svn: 69150
2009-04-15 05:36:58 +00:00
Anders Carlsson
0c08f6fdde
Add support for mangling guard variables.
...
llvm-svn: 68969
2009-04-13 18:02:10 +00:00
Chris Lattner
6574906818
fix several problems with asm renaming, by pulling it into the mangling code:
...
1. it wasn't applying to definitions, only declarations, e.g. int x __asm("foo")
2. multiple definitions were conflicting, they weren't getting merged.
3. the code was duplicated in several places.
llvm-svn: 67442
2009-03-21 08:24:40 +00:00
Douglas Gregor
5f361c9f1e
Address Chris's comments regarding C++ name mangling.
...
llvm-svn: 64984
2009-02-18 23:53:56 +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