Anders Carlsson
60d0c2c1c2
Support for complex types.
...
llvm-svn: 72675
2009-05-31 21:07:58 +00:00
Anders Carlsson
ec71f61608
Better support for scalar POD types in 'new' expressions.
...
llvm-svn: 72674
2009-05-31 20:56:36 +00:00
Anders Carlsson
6f9dabff6d
Make sure to copy back arguments that can be changed by FindAllocationOverload. This fixes placement new. (Sebastian, please review).
...
llvm-svn: 72673
2009-05-31 20:26:12 +00:00
Anders Carlsson
1832f52b10
Very basic irgen support for new expressions.
...
llvm-svn: 72672
2009-05-31 20:21:44 +00:00
Anders Carlsson
0955f20473
Don't try to call getFileCharacteristic if the function declaration has an invalid source location (as is the case for the global allocation functions.
...
llvm-svn: 72671
2009-05-31 20:19:23 +00:00
Anders Carlsson
2418712039
Fix an off by one error when trying to perform copy initialization of operator new and operator delete arguments. Sebastian, please review.
...
llvm-svn: 72670
2009-05-31 19:49:47 +00:00
Chris Lattner
6e127a6d86
Downgrade an error about "return in a no-return function" from being
...
an error to being a warning that defaults to error. If you want this to
be a warning, you have to explicitly pass -Winvalid-noreturn to clang to
map it back to a warning.
llvm-svn: 72669
2009-05-31 19:32:13 +00:00
Dan Gohman
c1c2c68945
Fix a grammaro and clarify a comment.
...
llvm-svn: 72668
2009-05-31 17:52:18 +00:00
Dan Gohman
2299d2ba2f
Delete an obsolete sentance from a comment.
...
llvm-svn: 72667
2009-05-31 16:18:57 +00:00
Dan Gohman
3d507b4b13
Fix the name of the function in this comment.
...
llvm-svn: 72666
2009-05-31 16:18:03 +00:00
Sebastian Redl
fb3f1794e1
Disallow exception specs on typedefs.
...
llvm-svn: 72664
2009-05-31 11:47:27 +00:00
Eli Friedman
42a8465518
Fix for PR4285: allow intializing a const wchar_t array with a wide
...
string.
llvm-svn: 72663
2009-05-31 10:54:53 +00:00
Douglas Gregor
2373c599b5
Initial infrastructure for class template partial specialization. Here
...
we have the basics of declaring and storing class template partial
specializations, matching class template partial specializations at
instantiation time via (limited) template argument deduction, and
using the class template partial specialization's pattern for
instantiation.
This patch is enough to make a simple is_pointer type trait work, but
not much else.
llvm-svn: 72662
2009-05-31 09:31:02 +00:00
Owen Anderson
cc0c75c74d
Be more aggressive in doing LoadPRE by tracing backwards when a block only has
...
a single predecessor.
Patch by Jakub Staszak.
llvm-svn: 72661
2009-05-31 09:03:40 +00:00
Douglas Gregor
7a1a7cb09d
Add a little FIXME for C++ class printing
...
llvm-svn: 72660
2009-05-31 07:13:39 +00:00
Nick Lewycky
0a8fe66a6c
Fix typo in error message.
...
llvm-svn: 72659
2009-05-31 06:07:28 +00:00
Duncan Sands
96e5698741
Rename CustomLowerResults to CustomLowerNode, since
...
it is used both when a result is illegal and when an
operand is illegal.
llvm-svn: 72658
2009-05-31 04:15:38 +00:00
Duncan Sands
6674a492c4
Unbreak the clang build by applying the same temporary
...
workaround for machine code emitter changes as was used
in llvm-gcc.
llvm-svn: 72657
2009-05-31 04:09:57 +00:00
Anders Carlsson
4a7b49b56a
Add a new function for emitting new functions.
...
llvm-svn: 72656
2009-05-31 01:40:14 +00:00
Anders Carlsson
8eb93e72f7
Emit destructors correctly for temporaries.
...
llvm-svn: 72655
2009-05-31 00:34:10 +00:00
Anders Carlsson
f3f91cee43
When possible, don't emit the cleanup block. Instead, just move the instructions to the current block.
...
llvm-svn: 72654
2009-05-31 00:33:20 +00:00
Anders Carlsson
c0092ad333
Implement VisitCXXExprWithTemporaries for complex expressions.
...
llvm-svn: 72653
2009-05-31 00:12:05 +00:00
Anders Carlsson
2262b307aa
Call EmitCXXExprWithTemporaries.
...
llvm-svn: 72652
2009-05-31 00:09:15 +00:00
Anders Carlsson
89391a9272
Add more getters to the new AST nodes.
...
llvm-svn: 72651
2009-05-31 00:08:52 +00:00
Bruno Cardoso Lopes
b922abb47a
Use uint8_t and int32_t in {JIT,Machine}CodeEmiters
...
llvm-svn: 72650
2009-05-30 23:50:33 +00:00
Anders Carlsson
fd2af0cf86
Add lvalue irgen support for CXXBindTemporaryExpr.
...
llvm-svn: 72649
2009-05-30 23:30:54 +00:00
Anders Carlsson
3be22e27b6
More temporary support.
...
llvm-svn: 72648
2009-05-30 23:23:33 +00:00
Anders Carlsson
feefce601f
Forgot the implementation. Thanks Eli.
...
llvm-svn: 72647
2009-05-30 22:51:20 +00:00
Anders Carlsson
777711ba0b
Add RemoveOutermostTemporaryBinding. Not used yet.
...
llvm-svn: 72644
2009-05-30 22:47:03 +00:00
Anders Carlsson
73b836bf3d
Clean up the newly added C++ AST nodes.
...
llvm-svn: 72643
2009-05-30 22:38:53 +00:00
Anders Carlsson
a524f6fce6
It's OK for a full expr to be null. This fixes the failing test cases.
...
llvm-svn: 72642
2009-05-30 22:24:16 +00:00
Anders Carlsson
5de832ecfa
ActOnReturnStmt should also take a FullExprArg.
...
llvm-svn: 72641
2009-05-30 21:42:34 +00:00
Anders Carlsson
5e9444f541
AddInitializerToDecl needs to take a full expression.
...
llvm-svn: 72640
2009-05-30 21:37:25 +00:00
Anders Carlsson
f8e916de85
Update Xcode project
...
llvm-svn: 72639
2009-05-30 21:32:24 +00:00
Anders Carlsson
c78576e250
Add the newly created temporary to the ExprTemporaries stack.
...
llvm-svn: 72638
2009-05-30 21:21:49 +00:00
Anders Carlsson
4f44fd5c6f
Get rid of CXXTempVarDecl.
...
llvm-svn: 72637
2009-05-30 21:10:34 +00:00
Eli Friedman
f7f9f68722
Some small fixes for fields of reference type.
...
llvm-svn: 72636
2009-05-30 21:09:44 +00:00
Bruno Cardoso Lopes
9499ab3287
Add AMD64 elf machine type
...
llvm-svn: 72635
2009-05-30 21:05:47 +00:00
Anders Carlsson
a29ded9ba8
Stop using CXXTempVarDecl and use CXXTemporary instead.
...
llvm-svn: 72634
2009-05-30 21:05:25 +00:00
Anders Carlsson
4b2434da54
Remove VarDecl from CXXConstructExpr.
...
llvm-svn: 72633
2009-05-30 20:56:46 +00:00
Anders Carlsson
b228818554
Bind temporaries correctly when instantiating expressions.
...
llvm-svn: 72632
2009-05-30 20:52:37 +00:00
Bruno Cardoso Lopes
a194c3a69e
First patch in the direction of splitting MachineCodeEmitter in two subclasses:
...
JITCodeEmitter and ObjectCodeEmitter. No functional changes yet. Patch by Aaron Gray
llvm-svn: 72631
2009-05-30 20:51:52 +00:00
Anders Carlsson
28486d420b
Remove VarDecl from CheckInitializerTypes now that CXXConstructExpr doesn't need to take a VarDecl anymore. (It still does, but it won't for long)
...
llvm-svn: 72630
2009-05-30 20:41:30 +00:00
Anders Carlsson
2d4cada7f7
Add Sema::MaybeBindToTemporary which takes an expression and (if needed) wraps it in a CXXBindTemporaryExpr. Use this when creating CXXTemporaryObjectExprs.
...
llvm-svn: 72629
2009-05-30 20:36:53 +00:00
Anders Carlsson
ffda606612
Small fixes to CXXTemporary and CXXBindTemporaryExpr.
...
llvm-svn: 72628
2009-05-30 20:34:37 +00:00
Anders Carlsson
993a4b3080
Add a CXXBindTemporaryExpr.
...
llvm-svn: 72627
2009-05-30 20:03:25 +00:00
Anders Carlsson
f337d8c515
Add a CXXTemporary class. Not used yet.
...
llvm-svn: 72626
2009-05-30 19:54:15 +00:00
Chris Lattner
221895303c
fix PR4284, a bug in simplifylibcalls handling memcmp. Patch by
...
Benjamin Kramer!
llvm-svn: 72625
2009-05-30 18:43:04 +00:00
Anders Carlsson
36b75a4619
Replace a cast with a dyn_cast as suggested by Doug.
...
llvm-svn: 72624
2009-05-30 17:26:39 +00:00
Nick Lewycky
8e2c4f4716
Metadata uses metadata type not empty struct.
...
llvm-svn: 72623
2009-05-30 16:08:30 +00:00