Douglas Gregor
8ea1f53420
Add a new expression class, ObjCSuperExpr, to handle the Objective-C 'super'. Remove ObjCThis from PredefinedExpr
...
llvm-svn: 58698
2008-11-04 14:56:14 +00:00
Anders Carlsson
13abd7e98b
Implement lowering of va_arg in clang directly. (This is 32-bit X86 only for now).
...
llvm-svn: 58681
2008-11-04 05:30:00 +00:00
Anders Carlsson
4961890c07
Fix bug in va_copy
...
llvm-svn: 58680
2008-11-04 05:29:05 +00:00
Chris Lattner
7d7fff2303
privatize some methods.
...
llvm-svn: 58602
2008-11-03 09:11:11 +00:00
Daniel Dunbar
cb4638599c
Move IRBuilder type definition to common file.
...
- No functionality change.
llvm-svn: 58546
2008-11-01 01:53:16 +00:00
Sanjiv Gupta
d79592448b
Made the mechanism of defining preprocessor defs for maxint, ptrdiff_t, wchar
...
etc more generic. For some targets, long may not be equal to pointer size. For
example: PIC16 has int as i16, ptr as i16 but long as i32.
Also fixed a few build warnings in assert() functions in CFRefCount.cpp,
CGDecl.cpp, SemaDeclCXX.cpp and ParseDeclCXX.cpp.
llvm-svn: 58501
2008-10-31 09:52:39 +00:00
Daniel Dunbar
0c248e7ed8
Debug info: Bug fix, function types should always include the return
...
type.
llvm-svn: 58497
2008-10-31 08:12:03 +00:00
Daniel Dunbar
d678ae2da3
Quick fix for PR2950, infinite loop generating debug info for
...
recursive types.
- Style will be clean up in further patches.
llvm-svn: 58490
2008-10-31 04:04:54 +00:00
Daniel Dunbar
a290ded36a
Formatting tweaks.
...
- No functionality change.
llvm-svn: 58488
2008-10-31 03:54:29 +00:00
Daniel Dunbar
c475d4224b
NeXT: Emit protocol objects lazily.
...
- That is, the metadata for a protocol is only emitted if that
protocol is actually used in the translation unit. This is
important because Objective-C headers frequently contain a large
number of protocol definitions, only a few of which will be used in
any given file.
llvm-svn: 58400
2008-10-29 22:36:39 +00:00
Eli Friedman
5adca5f02c
Fix for PR2966: va_start/va_end use the *address* of the
...
va_list, not the value. Patch fixes an assert on
x86-64 and a wrong-code bug on x86. I'm not completely sure,
but I think it's a regression from r58306.
Does anyone run regression tests regularly on x86-64? The crash should
have been picked up there.
llvm-svn: 58366
2008-10-29 04:39:20 +00:00
Daniel Dunbar
5b06d9f202
Don't run the verifier as part of IRgen, this is now down (per module)
...
in the driver (this means we no longer run the verifier per function, however).
llvm-svn: 58307
2008-10-28 00:36:04 +00:00
Daniel Dunbar
03a3844c66
Add attribute always_inline support.
...
llvm-svn: 58304
2008-10-28 00:17:57 +00:00
Chris Lattner
084bc32e0d
make codegen reject initializes with designators, like this:
...
t.c:1:13: error: cannot codegen this designators yet
int a[10] = {2, 4, [8]=9, 10};
^~~~~~~~~~~~~~~~~
llvm-svn: 58220
2008-10-26 23:53:12 +00:00
Oscar Fuentes
07d9f9a6ec
CMake: Builds and installs clang binary and libs (no docs yet). It
...
must be under the `tools' subdirectory of the LLVM *source* tree.
llvm-svn: 58180
2008-10-26 00:56:18 +00:00
Daniel Dunbar
dec8a89d37
Don't crash on invalid source locations in
...
CGDebugInfo::getOrCreateCompileUnit.
llvm-svn: 58081
2008-10-24 08:38:36 +00:00
Daniel Dunbar
607f67b16c
Map compilation units using FileEntry pointers instead of
...
FileIDs. This seems better conceptually and lets the SourceManager
handle details of mapping the location to a file ID.
- In practice, fixes an assert because this code wasn't using
getPhysicalLoc.
llvm-svn: 58055
2008-10-24 00:46:51 +00:00
Daniel Dunbar
30c514e763
Add GetModule accessor to ModuleBuilder
...
llvm-svn: 57924
2008-10-21 19:55:09 +00:00
Douglas Gregor
5251f1b283
Preliminary support for function overloading
...
llvm-svn: 57909
2008-10-21 16:13:35 +00:00
Daniel Dunbar
354d278518
Debug info bug fix, function start wasn't getting generated correctly
...
for Obj-C methods.
llvm-svn: 57769
2008-10-18 18:22:23 +00:00
Daniel Dunbar
1ea1aa2cc1
Emit more descriptive unsupported error message on dot-syntax use of super.
...
llvm-svn: 57745
2008-10-17 23:05:02 +00:00
Daniel Dunbar
cf56c2b7bd
Add FIXME about potential problem in how property ref lvalues are handled.
...
llvm-svn: 57743
2008-10-17 23:02:24 +00:00
Daniel Dunbar
b35174727f
Lift CodeGenFunction::EmitPredefinedFunctioName out of EmitPredefinedLValue.
...
- Shouldn't assume predefined expr is a function printing one.
- Uses CGM functionality to cache function names per module.
llvm-svn: 57737
2008-10-17 21:58:32 +00:00
Daniel Dunbar
dfcf599dfa
Add option argument to GetAddrOfConstantString to use for name of
...
(first) global holding the string.
- No functionality change.
llvm-svn: 57736
2008-10-17 21:56:50 +00:00
Daniel Dunbar
1e75408d89
Emit error unsupported when asm string conversion fails instead of
...
assert.
llvm-svn: 57721
2008-10-17 20:58:01 +00:00
Daniel Dunbar
fc1066db81
Remove unneeded EncodingRecordTypes argument to getObjCEncodingForType.
...
llvm-svn: 57716
2008-10-17 20:21:44 +00:00
Daniel Dunbar
ff3c6747ef
More Obj-C type encoding improvements.
...
- Encode unions and bit-fields correctly.
- Accept option to name record fields (used for NeXT runtime).
llvm-svn: 57685
2008-10-17 16:17:37 +00:00
Daniel Dunbar
b9fd902fdc
Change CGDebugInfo::setLocation to just ignore invalid locations. This
...
simplifies clients.
Also, add assert that RegionStack is empty when the CGDebugInfo is
destroyed.
llvm-svn: 57684
2008-10-17 16:15:48 +00:00
Daniel Dunbar
3c683f5bf2
NeXT: Use objc_msgSend_fpret for calling functions which return
...
floating point. This is only correct for x86-32 at the moment.
llvm-svn: 57667
2008-10-17 03:24:53 +00:00
Daniel Dunbar
380827cfa1
Quick patch for PR2784, assert genereting debug info for opaque
...
structure.
- I'm not sure yet about the behavior, but this at least prevents the
crash.
Add some asserts on RegionStack usage.
llvm-svn: 57661
2008-10-17 01:07:56 +00:00
Mon P Wang
d05269d13c
Added pinsrd, pinsrq, and some other vector intrinsics
...
llvm-svn: 57563
2008-10-15 06:18:34 +00:00
Argyrios Kyrtzidis
88e1b97f16
Simplify handling of struct/union/class tags.
...
Instead of using two sets of Decl kinds (Struct/Union/Class and CXXStruct/CXXUnion/CXXClass), use one 'Record' and one 'CXXRecord' Decl kind and make tag kind a property of TagDecl.
Cleans up the code a bit and better reflects that Decl class structure.
llvm-svn: 57541
2008-10-15 00:42:39 +00:00
Daniel Dunbar
d9eff3d4e4
Lift out ABIInfo abstract base class.
...
- Currently still lives in CGCall.cpp but is intended to be the
target specific place for hooking ABI information.
- Select ABIInfo to use based on Target's prefix and pointer width.
llvm-svn: 57445
2008-10-13 17:02:26 +00:00
Chris Lattner
5d3e26a4f6
silence release-assert warnings.
...
llvm-svn: 57392
2008-10-12 00:31:50 +00:00
Daniel Dunbar
eca513d945
Lift EmitTargetBuiltinExpr out of EmitBuiltinExpr.
...
llvm-svn: 57335
2008-10-10 00:24:54 +00:00
Dale Johannesen
c48814bc98
Adjust calls to APFloat conversion for new interface.
...
llvm-svn: 57332
2008-10-09 23:02:32 +00:00
Ted Kremenek
3fef35736e
Use DeclStmt::getSolitaryDecl() instead of DeclStmt::getDecl() when processing the Decl of an Objective-C foreach statement.
...
llvm-svn: 57209
2008-10-06 20:59:48 +00:00
Ted Kremenek
a7297be859
Use DeclStmt::getSolitaryDecl() instead of DeclStmt::getDecl() when processing the Decl of a @catch statement.
...
llvm-svn: 57208
2008-10-06 20:58:56 +00:00
Ted Kremenek
704a2505db
In EmitDeclStmt: use DeclStmt::const_decl_iterator instead of walking the scoped decl chain.
...
llvm-svn: 57192
2008-10-06 18:42:27 +00:00
Chris Lattner
a97132a9c4
Make sema and codegen allow __builtin___CFStringMakeConstantString as a valid
...
constant lvalue. Implement this in codegen by moving the code out of CGBuiltin
into EmitConstantExpr.
llvm-svn: 57163
2008-10-06 07:26:43 +00:00
Chris Lattner
24355b5240
always try to fold a builtin before emitting it. In the future
...
it is possible that a builtin could sometimes be folded (e.g. __builtin_clz)
if it's operand is a constant.
llvm-svn: 57161
2008-10-06 06:56:41 +00:00
Chris Lattner
0b7282eafc
Move handling of __builtin_nan("") out of CGBuiltin.cpp into ExprConstant.cpp
...
llvm-svn: 57157
2008-10-06 06:31:58 +00:00
Chris Lattner
a1518b1dfe
remove some code where CGBuiltin folds constants, and use tryEvaluate to
...
do it instead. We should still handle __builtin_nan etc, but don't yet.
This fixes incorrect evaluation of __builtin_constant_p, a FIXME.
llvm-svn: 57156
2008-10-06 06:09:18 +00:00
Chris Lattner
e50e90142e
instead of making codegen try to know about all of the builtins to generate
...
constants for them, just use the constant evaluator to do the job. This
also fixes crashes on 'unknown constant builtins'.
llvm-svn: 57155
2008-10-06 05:59:01 +00:00
Anders Carlsson
b83162840f
Implement support for the const and pure attributes.
...
llvm-svn: 57142
2008-10-05 23:32:53 +00:00
Daniel Dunbar
e23f28f8a5
Emit error unsupported for break/continue/goto inside Obj-C exception
...
handling blocks.
- This has false positives, but at least prevents miscompiles.
llvm-svn: 56958
2008-10-02 18:02:06 +00:00
Daniel Dunbar
c3d16493ae
(LLVM up) Rename IRBuilder::IsNonNull -> IsNotNull.
...
llvm-svn: 56954
2008-10-02 17:05:36 +00:00
Daniel Dunbar
fbe68a84f8
NeXT: Update to use CreateRuntimeFunction for the routines it imports.
...
llvm-svn: 56902
2008-10-01 01:06:06 +00:00
Daniel Dunbar
23fd462f48
Add simple interface for protecting runtime functions from name
...
collisions.
- Provide CodeGenModule::CreateRuntimeFunction which guarantees that
the function it creates will have the provided name in the final
module. This allows the runtime to have its functions protected
from declarations of the same name in the source code.
- One could argue that this is a reason to abuse the llvm::Module
namespace for dealing with function redeclarations. However, that
approach seems conceptually flawed to me. This one also happens to
be somewhat more efficient.
No functionality change.
llvm-svn: 56899
2008-10-01 00:49:24 +00:00
Mon P Wang
553b4b912b
Added support for sse intrinsics loadlpd, loadhpd, muldq128, and mulld128
...
llvm-svn: 56830
2008-09-30 05:31:27 +00:00