Anders Carlsson
8783543a6f
Don't assert when generating code with static_asserts.
...
llvm-svn: 73208
2009-06-11 21:22:55 +00:00
Anders Carlsson
fa7c608ecc
Fix a thinko.
...
llvm-svn: 72679
2009-06-01 00:26:14 +00:00
Anders Carlsson
ca50119a31
Check for null correctly for new expressions.
...
llvm-svn: 72678
2009-06-01 00:05:16 +00:00
Anders Carlsson
cba81fc4de
Improve irgen of 'new' further.
...
llvm-svn: 72677
2009-05-31 21:53:59 +00:00
Anders Carlsson
96c012ff8b
...and aggregate POD types.
...
llvm-svn: 72676
2009-05-31 21:12:26 +00:00
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
Eli Friedman
f7f9f68722
Some small fixes for fields of reference type.
...
llvm-svn: 72636
2009-05-30 21:09:44 +00:00
Douglas Gregor
14f5c132c1
Add a target triple, because this test depends on details of the x86-64 ABI
...
llvm-svn: 72503
2009-05-27 23:32:34 +00:00
Anders Carlsson
ddcbfe7b53
IRgen support for calls to functions that return references to aggregate exressions.
...
llvm-svn: 72479
2009-05-27 16:45:02 +00:00
Eli Friedman
751aa72b72
Fix up constant expression handling to deal with the address
...
of a reference correctly.
llvm-svn: 72463
2009-05-27 06:04:58 +00:00
Eli Friedman
55422ad068
Add IRGen support for local variables of reference type.
...
llvm-svn: 72462
2009-05-27 05:39:06 +00:00
Eli Friedman
b909bf4937
Add IRGen support for return statements in functions with reference
...
type.
llvm-svn: 72459
2009-05-27 04:56:12 +00:00
Anders Carlsson
4034a95dc8
Handle operator call expressions where the callee is a member function.
...
llvm-svn: 72458
2009-05-27 04:18:27 +00:00
Anders Carlsson
d8b7ae205e
Functions that return references can be rvalues as well.
...
llvm-svn: 72457
2009-05-27 03:37:57 +00:00
Anders Carlsson
ace7215dd4
Add another test.
...
llvm-svn: 72450
2009-05-27 01:46:48 +00:00
Anders Carlsson
4ae70ff9a3
Add support for emitting calls to functions that return references (as lvalues only for now)
...
llvm-svn: 72449
2009-05-27 01:45:47 +00:00
Douglas Gregor
28ad4b5da1
Make sure that CodeGen sees template instantiations.
...
llvm-svn: 72433
2009-05-26 20:50:29 +00:00
Eli Friedman
c21cb44de2
Handle the remaining unhandled cases in EmitReferenceBindingToExpr.
...
It would be nice if someone could write an ObjC++ testcase for the case
of passing a property returning a struct to a function taking a const
reference.
llvm-svn: 72159
2009-05-20 02:31:19 +00:00
Anders Carlsson
02bb7f0ac8
irgen for references to complex rvales (Very important...)
...
llvm-svn: 72157
2009-05-20 01:35:03 +00:00
Anders Carlsson
387f863dde
Bad anders.
...
llvm-svn: 72156
2009-05-20 01:27:39 +00:00
Anders Carlsson
ad007d44b6
Create a temporary if the lvalue is a bitfield. Reported by Eli.
...
llvm-svn: 72155
2009-05-20 01:24:22 +00:00
Anders Carlsson
145eae5224
Add support for binding references to scalar rvalues.
...
llvm-svn: 72153
2009-05-20 01:03:17 +00:00
Anders Carlsson
7d4c083c19
Bind references to lvalues correctly.
...
llvm-svn: 72150
2009-05-20 00:36:58 +00:00
Anders Carlsson
2d228cef50
Improve support for irgen of references.
...
llvm-svn: 72133
2009-05-19 20:40:02 +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
37604a0984
A C++ member function always has either weak linkage (if it's inline or defined inline) or strong linkage (other cases).
...
llvm-svn: 71873
2009-05-15 18:35: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
e0be0dfced
push GlobalDecl through enough of the CodeGenModule interfaces
...
to allow us to support generation of deferred ctors/dtors.
It looks like codegen isn't emitting a call to the dtor in
member-functions.cpp:test2, but when it does, its body should
get emitted.
llvm-svn: 71594
2009-05-12 21:21:08 +00:00
Chris Lattner
d035ebda2f
add an initial stab at emitting deferred c++ inline functions. This handles static
...
functions and methods declared inline, but not ctors/dtors or methods not declared
inline (apparently my previous patch wasn't good enough).
llvm-svn: 71591
2009-05-12 21:02:27 +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
d8e39bbb84
Add support for generating reference initialization code.
...
llvm-svn: 68852
2009-04-11 01:08:03 +00:00
Anders Carlsson
03a409feda
We weren't generating correct code for calls to variadic member functions.
...
llvm-svn: 68635
2009-04-08 20:31:57 +00:00
Anders Carlsson
468fa6366b
Add some basic support for generating C++ member functions.
...
llvm-svn: 68425
2009-04-04 20:47:02 +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
Nuno Lopes
a0abe62904
make ScalarExprEmitter::EmitCompare() emit the expression with the correct type instead of always zext it to an int
...
this fixes codegen of simple exprs in C++ like 'if (x != 0)'
llvm-svn: 62060
2009-01-11 23:22:37 +00:00
Anders Carlsson
39def3adc8
Add codegen support for __null
...
llvm-svn: 61314
2008-12-21 22:39:40 +00:00