Anders Carlsson
b05a3e551b
Improve support for member function pointers.
...
llvm-svn: 83039
2009-09-29 02:09:01 +00:00
Anders Carlsson
1fb7ae9e3c
Use a switch statement in VisitCastExpr.
...
llvm-svn: 83038
2009-09-29 01:23:39 +00:00
Anders Carlsson
d30d820dc4
Make hasAggregateLLVMType use positive checks.
...
llvm-svn: 83037
2009-09-29 01:15:29 +00:00
Mike Stump
e7a2b48572
Fix http://llvm.org/PR5090 .
...
llvm-svn: 83035
2009-09-29 00:50:50 +00:00
Anders Carlsson
02bca738b4
Mangle dependent name expressions. Fixes PR5063.
...
llvm-svn: 82915
2009-09-27 20:11:34 +00:00
Anders Carlsson
d122de5f32
Use mangleTemplatePrefix when we know that we're mangling a nested template name.
...
llvm-svn: 82912
2009-09-27 19:53:49 +00:00
Anders Carlsson
52d78a518a
CodeGen for try statements. (We just emit the body for now).
...
llvm-svn: 82910
2009-09-27 18:58:34 +00:00
Anders Carlsson
9bf787ad1f
Look for substitutions when mangling TypenameTypes.
...
llvm-svn: 82885
2009-09-27 01:06:07 +00:00
Anders Carlsson
e00745b285
Better template parameter type mangling.
...
llvm-svn: 82883
2009-09-27 00:38:53 +00:00
Anders Carlsson
2e5935241a
Mangle std::basic_string<char, std::char_traits<char>, std::allocator<char> > as Ss.
...
llvm-svn: 82882
2009-09-27 00:12:57 +00:00
Anders Carlsson
853bb50382
Mangle ::std::basic_string as Sb.
...
llvm-svn: 82881
2009-09-26 23:14:39 +00:00
Anders Carlsson
872ce0dc31
Mangle ::std::allocator as Sa.
...
llvm-svn: 82880
2009-09-26 23:10:05 +00:00
Anders Carlsson
3e83c30c4c
Handle substitutions in mangleTemplatePrefix.
...
llvm-svn: 82879
2009-09-26 22:18:22 +00:00
Anders Carlsson
aa9e3c8793
Substitute "::std::" as "St".
...
llvm-svn: 82874
2009-09-26 20:53:44 +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
26e67afd1e
mangleTemplatePrefix and mangleUnscopedTemplateName should take a TemplateDecl.
...
llvm-svn: 82871
2009-09-26 19:45:45 +00:00
Anders Carlsson
677475206c
Use the qualified name for tag types.
...
llvm-svn: 82870
2009-09-26 19:03:24 +00:00
Anders Carlsson
e33eed5c1e
Set alignment on static function level decls and VLAs. Fixes PR5060.
...
llvm-svn: 82868
2009-09-26 18:16:06 +00:00
Anders Carlsson
0374742326
Use ABIArgInfo::getDirect() for all types that have a pointer representation.
...
llvm-svn: 82845
2009-09-26 03:56:53 +00:00
Anders Carlsson
296f8dc52f
Mangle record types as decls.
...
llvm-svn: 82843
2009-09-26 03:55:37 +00:00
Anders Carlsson
9f8e3d1929
Change isTemplate to return the actual template declaration.
...
llvm-svn: 82839
2009-09-26 03:24:57 +00:00
Anders Carlsson
bdaaab4671
Improve mangling of typename types.
...
llvm-svn: 82833
2009-09-26 02:26:02 +00:00
Mike Stump
1dbb8f78a3
Fix 80-col violation.
...
llvm-svn: 82782
2009-09-25 18:11:00 +00:00
John McCall
0cf155174e
Fix an infinite loop arising when trying to generate debug information
...
for a ObjC class with an ivar of weak self type.
llvm-svn: 82745
2009-09-25 01:40:47 +00:00
Fariborz Jahanian
1f9ed58277
Fixed another code gen bug in objc's new write-barrier API.
...
llvm-svn: 82735
2009-09-25 00:00:20 +00:00
Mike Stump
d2a3e61798
Fix 80-col violation.
...
llvm-svn: 82725
2009-09-24 22:31:14 +00:00
Fariborz Jahanian
7a95d72b10
Patch fixes a code gen. bug in generation of objc_assign_ivar
...
(objc GC's API).
llvm-svn: 82724
2009-09-24 22:25:38 +00:00
John McCall
8ccfcb51ee
Refactor the representation of qualifiers to bring ExtQualType out of the
...
Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right; many more remain.
llvm-svn: 82705
2009-09-24 19:53:00 +00:00
Daniel Dunbar
b3b1e53d33
Darwin/x86-32: Enumerated types and block pointer types in structures were not
...
handled correctly.
- <rdar://problem/7247671> Function arguments incorrect when function returns a
struct on i386 w/ llvm-g++ and clang
llvm-svn: 82681
2009-09-24 05:12:36 +00:00
Anders Carlsson
649a17e861
Handle namespace aliases.
...
llvm-svn: 82644
2009-09-23 19:19:16 +00:00
Anders Carlsson
f771681e63
Emit new[] cookie when needed.
...
llvm-svn: 82642
2009-09-23 18:59:48 +00:00
Anders Carlsson
b4bd0666d2
Basic support for new[].
...
llvm-svn: 82628
2009-09-23 16:07:23 +00:00
Anders Carlsson
d49844b715
Add a new variant of EmitCXXAggrConstructorCall that takes a Value that holds the number of elements to construct, to be used when implementing new[].
...
llvm-svn: 82602
2009-09-23 02:45:36 +00:00
Anders Carlsson
cc52f65500
Move codegen of new and delete to CGCXXExpr.cpp
...
llvm-svn: 82585
2009-09-22 22:53:17 +00:00
Mike Stump
17abe2a620
Remove now fixed FIXME.
...
llvm-svn: 82584
2009-09-22 22:31:44 +00:00
Anders Carlsson
8c978b4fc2
No need to null check implicit lvalue cast exprs.
...
llvm-svn: 82580
2009-09-22 22:00:46 +00:00
Anders Carlsson
8fef09cd80
When doing a derived-to-base class and the class offset is 0 we can just do a simple bitcast.
...
llvm-svn: 82579
2009-09-22 21:58:22 +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
Daniel Dunbar
b879c3c125
Revert "Switch a few clients over to StringLiteral::getString.", this is breaking some projects, but I don't have a test case yet.
...
llvm-svn: 82539
2009-09-22 10:03:52 +00:00
Daniel Dunbar
5de27daf93
Switch a few clients over to StringLiteral::getString.
...
- Switching all of them out-of-my-current-scope-of-interest, sorry.
llvm-svn: 82515
2009-09-22 03:27:52 +00:00
Mike Stump
207c680ff3
Fix some typos. WIP. Large alignments don't work yet.
...
llvm-svn: 82512
2009-09-22 02:44:17 +00:00
Mike Stump
2114d7c299
Improve debug info generation for __block variables.
...
llvm-svn: 82508
2009-09-22 02:12:52 +00:00
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