John McCall
9dd450bb78
Change all the Type::getAsFoo() methods to specializations of Type::getAs().
...
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely. Several more 'leaf'
optimizations were introduced.
The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.
llvm-svn: 82501
2009-09-21 23:43:11 +00:00
Fariborz Jahanian
71848a3ff1
Removed -fobjc-newgc-api option. clang now conforms to
...
gcc-style write-barrier api only.
llvm-svn: 82493
2009-09-21 23:03:37 +00:00
Fariborz Jahanian
38c3ae9bc4
Miscellanous fixes in generatation of objc gc's write-barriers.
...
llvm-svn: 82472
2009-09-21 18:54:29 +00:00
Chris Lattner
bf20638966
Implement __builtin_unreachable(), a GCC 4.5 extension.
...
llvm-svn: 82433
2009-09-21 03:09:59 +00:00
Anders Carlsson
a18322cea5
Start mangling expressions.
...
llvm-svn: 82423
2009-09-21 01:21:10 +00:00
Daniel Dunbar
9996138a80
Ok, an AssertingVH definitely doesn't work for now because we free our cache after the optimizer may have hacked on the module. Use a WeakVH instead.
...
llvm-svn: 82324
2009-09-19 20:17:48 +00:00
Nick Lewycky
41eaf0ac57
Make clang stop relying on ConstantStruct::get's default value for isPacked
...
which will be going away (ie. it's becoming a required parameter) later today.
llvm-svn: 82323
2009-09-19 20:00:52 +00:00
Daniel Dunbar
1cbaae56cf
Switch CGDebugInfo type cache to using an AssertingVH.
...
llvm-svn: 82321
2009-09-19 19:27:24 +00:00
Daniel Dunbar
de870bdcf2
Factor out CGDebugInfo::CreateTypeNode method.
...
- No functionality change.
llvm-svn: 82320
2009-09-19 19:27:14 +00:00
Anders Carlsson
82b688e423
More mangling work.
...
llvm-svn: 82265
2009-09-18 20:11:09 +00:00
Anders Carlsson
c3773bd669
Make the mangler conform even better to the grammar.
...
llvm-svn: 82262
2009-09-18 19:44:50 +00:00
Mike Stump
f9c95be2f6
Generate more of the vbase virtual offset for covariant thunks. WIP.
...
llvm-svn: 82253
2009-09-18 19:06:35 +00:00
Anders Carlsson
559d9741a8
More mangler mangling.
...
llvm-svn: 82250
2009-09-18 19:00:18 +00:00
Anders Carlsson
caf4a646f8
Call mangleTemplatePrefix.
...
llvm-svn: 82247
2009-09-18 18:47:07 +00:00
Anders Carlsson
c1370cb49b
Change manglePrefix to return early if the DC is the translation unit.
...
llvm-svn: 82246
2009-09-18 18:39:58 +00:00
Anders Carlsson
2b5e1dda69
More mangling goodness.
...
llvm-svn: 82193
2009-09-18 04:29:09 +00:00
Anders Carlsson
7a8a74f704
Handle mangling of TemplateSpecializationType.
...
llvm-svn: 82189
2009-09-18 02:42:01 +00:00
Fariborz Jahanian
2e32ddc7ba
Fixed a bug in generation of the new write-barriers when
...
array syntax is used to derefernce and assign to ivar pointee.
llvm-svn: 82183
2009-09-18 00:04:00 +00:00
Anders Carlsson
ca51ef156b
Ignore extern "C++" { } when mangling.
...
llvm-svn: 82146
2009-09-17 16:12:20 +00:00
Anders Carlsson
f96da57adb
Revert r82123 for now.
...
llvm-svn: 82125
2009-09-17 05:31:47 +00:00
Anders Carlsson
49fe8b4f97
Treat an unqualified RecordType as a RecordDecl when substituting.
...
llvm-svn: 82123
2009-09-17 04:38:23 +00:00
Anders Carlsson
4245bf9e13
Substitution for prefixes.
...
llvm-svn: 82122
2009-09-17 04:16:28 +00:00
Anders Carlsson
a2fb9bcd19
Substitute unscoped template names.
...
llvm-svn: 82119
2009-09-17 04:02:31 +00:00
Daniel Dunbar
df0e62d0a1
IRgen/ObjC: Correctly construct the function info for variadic message sends.
...
This fixes some bad -O0 codegen and the unnecessary clearing of al on entry to objc_msgSend for most message sends.
<rdar://problem/7102824> [irgen] unnecessary xorb on calls to objc_msgSend on x86_64
llvm-svn: 82118
2009-09-17 04:01:40 +00:00
Daniel Dunbar
aff9fcaa02
IRgen/ObjC: Make the target method decl available to GenerateMessageSendSuper.
...
llvm-svn: 82117
2009-09-17 04:01:22 +00:00
Anders Carlsson
a96f56fba8
Add mangleSubstitution/addSubstitution variants that take a NamedDecl.
...
llvm-svn: 82116
2009-09-17 03:53:28 +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
98e00bb162
Add new functions to the mangler for the <unscoped-name> and <unscoped-template-name> productions.
...
llvm-svn: 82113
2009-09-17 03:17:01 +00:00
Anders Carlsson
feb60501a8
Add basic substitution to the C++ mangler. It currently only looks at types.
...
llvm-svn: 82102
2009-09-17 00:43:46 +00:00
Fariborz Jahanian
de1d324dce
patch for generating objc'2 objc_assign_ivar. WIP.
...
llvm-svn: 82090
2009-09-16 23:11:23 +00:00
Fariborz Jahanian
a7fa6beb2e
Starting patch to generate more specific API for objc's
...
GC. Currently, new API will be generated under
clang-cc's -fobjc-newgc-api flag which will eventually
become the default. WIP.
llvm-svn: 82082
2009-09-16 21:37:16 +00:00
Fariborz Jahanian
4141deb68e
Removed a superfluous check before setting
...
a flag (objc GC).
llvm-svn: 82052
2009-09-16 16:49:08 +00:00
Anders Carlsson
20759ad54c
x86-64 ABI: If a type is a C++ record with either a non-trivial destructor or a non-trivial copy constructor, it should be passed in a pointer. Daniel, plz review.
...
llvm-svn: 82050
2009-09-16 15:53:40 +00:00
Mike Stump
c3844bea75
Be sure to use the correct version instead of inventing the wrong one.
...
llvm-svn: 81924
2009-09-15 21:48:34 +00:00
Anders Carlsson
1450adbbf9
Code generation of Conditional operators that are lvalues (but that aren't bitfields).
...
llvm-svn: 81867
2009-09-15 16:35:24 +00:00
Anders Carlsson
7cd39e0721
Handle reinterpret_cast between integral types and pointer types.
...
llvm-svn: 81837
2009-09-15 04:48:33 +00:00
Anders Carlsson
04c3bf4fab
Codegen support for nullptr from C++0x.
...
llvm-svn: 81835
2009-09-15 04:39:46 +00:00
Daniel Dunbar
09d3362bf5
ARM/[A]APCS: Ignore empty records passed as arguments.
...
llvm-svn: 81798
2009-09-14 21:54:03 +00:00
David Chisnall
2997982ab4
Small fix to stop CGObjCGNU emitting symbols that break some versions of gas.
...
llvm-svn: 81778
2009-09-14 19:04:10 +00:00
Anders Carlsson
ddf57d3df9
Remove an unnecessary FunctionDecl parameter to the synthesizing functions.
...
llvm-svn: 81759
2009-09-14 05:32:02 +00:00
Daniel Dunbar
ff0553ec61
Fix subtle bug in generating LLVM function declarations for builtin functions.
...
The decl wasn't being passed down, which meant that function attributes were not
being set correctly. This is particularly important for ARM, since it wants to
override the calling convention. Instead we would emit the builtin with the
wrong calling convention, and instcombine would come along and merrily shred all
the calls to it. :)
llvm-svn: 81756
2009-09-14 04:33:21 +00:00
Daniel Dunbar
d53bac7fa4
ARM/APCS: Don't treat structs w/ floating point types as "integer like".
...
llvm-svn: 81748
2009-09-14 02:20:34 +00:00
Anders Carlsson
aedb46fe21
If a function call returns a reference, don't bind it to a temporary.
...
llvm-svn: 81743
2009-09-14 01:30:44 +00:00
Anders Carlsson
96bad9a5cd
Implement CodeGenFunction::EmitCXXExprWithTemporariesLValue.
...
llvm-svn: 81738
2009-09-14 01:10:45 +00:00
Daniel Dunbar
1ce7251a0a
Some minor clang/ARM/AAPCS tweaks.
...
llvm-svn: 81737
2009-09-14 00:56:55 +00:00
Daniel Dunbar
b4091a9c6a
Add TargetInfo::getABI(), and base ARM APCS vs AAPCS choice on that.
...
llvm-svn: 81735
2009-09-14 00:35:03 +00:00
Anders Carlsson
8783737029
Handle delete where the class has a virtual destructor.
...
llvm-svn: 81733
2009-09-14 00:16:25 +00:00
Anders Carlsson
ccbabc9645
Fix another byref bug. This should hopefully get QuickLookPlugins building successfully.
...
llvm-svn: 81681
2009-09-13 17:55:13 +00:00
Daniel Dunbar
626f1d8c3a
ARM/APCS: Only "integer like" aggregates should be returned in r0 (following
...
gcc's interpretation of APCS' somewhat loose specification).
llvm-svn: 81671
2009-09-13 08:03:58 +00:00
Douglas Gregor
299d76e901
Rework the way we determine whether an externally visible symbol is
...
generated for an inline function definition, taking into account C99
and GNU inline/extern inline semantics. This solution is simpler,
cleaner, and fixes PR4536.
llvm-svn: 81670
2009-09-13 07:46:26 +00:00