Chris Lattner
4c8da96ea9
fix PR4423.
...
llvm-svn: 73938
2009-06-23 01:38:41 +00:00
Douglas Gregor
fec52635f0
Parsing and AST support for using declarations, from John Thompson!
...
llvm-svn: 73812
2009-06-20 00:51:54 +00:00
Douglas Gregor
78bd61f661
Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.
...
llvm-svn: 73702
2009-06-18 16:11:24 +00:00
Argyrios Kyrtzidis
c4b766bc65
Move CXXMethodDecl::OutOfLineDefinition into Decl::OutOfLine.
...
llvm-svn: 73651
2009-06-17 22:49:50 +00:00
Steve Naroff
fb4330f255
First step toward fixing <rdar://problem/6613046> refactor clang objc type representation.
...
Add a type (ObjCObjectPointerType) and remove a type (ObjCQualifiedIdType).
This large/tedious patch is just a first step. Next step is to remove ObjCQualifiedInterfaceType. After that, I will remove the magic TypedefType for 'id' (installed by Sema). This work will enable various simplifications throughout clang (when dealing with ObjC types).
No functionality change.
llvm-svn: 73649
2009-06-17 22:40:22 +00:00
Chris Lattner
94dfae248b
Update clang for the add ->add/fadd split. Likewise for sub and mul.
...
llvm-svn: 73604
2009-06-17 06:36:24 +00:00
Devang Patel
9fc4341eec
It is possible that main input file does not have any symbol with debug info. To handle this edge case, always create main compile unit first.
...
This fixes PR 4228.
llvm-svn: 73520
2009-06-16 18:02:02 +00:00
Anders Carlsson
a42ab8f3d5
Handle temporaries in default arguments.
...
llvm-svn: 73462
2009-06-16 03:37:31 +00:00
Chris Lattner
c7d2bfacef
"GCC emits an __objc_class_name_{classname} symbol for every class, and a corresponding reference to this symbol for every compilation unit that references the class. This causes linker errors when you try linking a program which references some classes but doesn't define them. The attached patch implements this support in clang, so you can compile a class with clang, reference it in a file compiled with GCC, and have it all work correctly."
...
Patch by David Chisnall!
llvm-svn: 73364
2009-06-15 01:09:11 +00:00
Eli Friedman
6282b3cff8
PR4390: Make sure to handle anonymous unions correctly while building
...
static intializers for structs.
llvm-svn: 73349
2009-06-14 21:41:37 +00:00
Chris Lattner
15ba94987a
Sink the BuiltinInfo object from ASTContext into the
...
preprocessor and initialize it early in clang-cc. This
ensures that __has_builtin works in all modes, not just
when ASTContext is around.
llvm-svn: 73319
2009-06-14 01:54:56 +00:00
Chris Lattner
5abdec7978
move the various builtins stuff from libast to libbasic. This
...
fixes a layering violation in lib/Basic/Targets.cpp.
llvm-svn: 73318
2009-06-14 01:05:48 +00:00
Chris Lattner
ecd79c6353
move GetBuiltinType from Builtin::Context to ASTContext.
...
llvm-svn: 73316
2009-06-14 00:45:47 +00:00
Chris Lattner
d50fea52af
Simplify mangleFunctionDecl by unnesting a crazy condition. This fixes
...
the check for extern "c" system headers, which should prevent functiondecls
from being mangled.
llvm-svn: 73311
2009-06-13 23:34:16 +00:00
Eli Friedman
3192cc8526
Fix the calling convention for structs/unions containing SSE vectors on
...
x86-32. This is slightly messy, but I think it's consistent with gcc.
llvm-svn: 73306
2009-06-13 21:37:10 +00:00
Chris Lattner
4ca97c3b9e
Fix PR4372, another case where non-prototyped functions can prevent
...
always_inline from working.
llvm-svn: 73273
2009-06-13 00:26:38 +00:00
Anders Carlsson
8783543a6f
Don't assert when generating code with static_asserts.
...
llvm-svn: 73208
2009-06-11 21:22:55 +00:00
Daniel Dunbar
76d864c7e7
Support complex properties, ivars and message expressions.
...
llvm-svn: 73158
2009-06-10 04:38:50 +00:00
Eli Friedman
e9ff191459
Remove a few more vector builtins.
...
llvm-svn: 73022
2009-06-07 09:32:56 +00:00
Eli Friedman
5a996fc0fc
Now that LLVM CodeGen can handle the generic variations a bit better,
...
get rid of a few more clang vector builtins.
llvm-svn: 73015
2009-06-07 07:12:56 +00:00
Eli Friedman
07bbeca406
PR4339: make sure to properly extend/trunc the index of a vector element
...
insert/extract; the relevant instructions are defined to take only an
i32.
llvm-svn: 73005
2009-06-06 19:09:26 +00:00
Anton Korobeynikov
18adbf5f07
Add new ABIArgInfo kind: Extend. This allows target to implement its own argument
...
zero/sign extension logic (consider, e.g. target has only 64 bit registers and thus
i32's should be extended as well).
llvm-svn: 72998
2009-06-06 09:36:29 +00:00
Eli Friedman
6813eb125f
Get rid of a bunch of dead builtins.
...
llvm-svn: 72996
2009-06-06 08:31:46 +00:00
Mike Stump
cbc2bcaf17
As an optimization, we maintain a cache of generated
...
___Block_byref_id_object_dispose and ___Block_byref_id_object_copy
functions so that we can simply reuse instead of creating a new one.
Additionally, add an assert to ensure no one yet tries to align a
__block variable beyond the alignment of a pointer as the codegen is
incomplete.
llvm-svn: 72974
2009-06-05 23:26:36 +00:00
Daniel Dunbar
feeeda70e2
weak_import should not make definitions have weak linkage.
...
- <rdar://problem/6948703> clang treats weak_import like weak
llvm-svn: 72967
2009-06-05 22:58:34 +00:00
Anton Korobeynikov
5bda50f84e
Update cmake script
...
llvm-svn: 72963
2009-06-05 22:08:54 +00:00
Anton Korobeynikov
244360d62b
Factor out TargetABIInfo stuff into separate file. No functionality change.
...
llvm-svn: 72962
2009-06-05 22:08:42 +00:00
Devang Patel
9e24386c65
Set function Attribute::NoImplicitFloat appropriately.
...
llvm-svn: 72961
2009-06-05 22:05:48 +00:00
Daniel Dunbar
4be99ff767
ABI handling: Fix nasty thinko where IRgen could generate an out-of-bounds read
...
when generating a coercion for ABI handling purposes.
- This may only manifest itself when building at -O0, but the practical effect
is that other arguments may get clobbered.
- <rdar://problem/6930451> [irgen] ABI coercion clobbers other arguments
llvm-svn: 72932
2009-06-05 07:58:54 +00:00
Daniel Dunbar
dd050567c1
Fix -Asserts build warnings.
...
llvm-svn: 72910
2009-06-05 02:03:25 +00:00
Devang Patel
6e467b1a46
Set function attribute llvm::Attribute::NoRedZone appropriately.
...
llvm-svn: 72902
2009-06-04 23:32:02 +00:00
Chris Lattner
0261e5c960
Make ReplaceUsesOfNonProtoTypeWithRealFunction verify that a call is *to* the
...
function of interest, not an operand of it.
llvm-svn: 72869
2009-06-04 16:47:43 +00:00
Anders Carlsson
43c52cdc29
Use PushConditionalTempDestruction/PopConditionalTempDestruction for the ternary operator.
...
llvm-svn: 72842
2009-06-04 03:00:32 +00:00
Anders Carlsson
f47a3de83c
Use conditional temp destruction for || and &&.
...
llvm-svn: 72838
2009-06-04 02:53:13 +00:00
Anders Carlsson
7d313fc09b
Make PushCXXTemporary and PopCXXTemporary handle conditional temporaries.
...
llvm-svn: 72837
2009-06-04 02:47:33 +00:00
Anders Carlsson
44bfcf0f97
Add PushConditionalTempDestruction/PopConditionalTempDestruction.
...
llvm-svn: 72835
2009-06-04 02:22:12 +00:00
Anders Carlsson
ea89e2b813
Make sure to push a cleanup block.
...
llvm-svn: 72831
2009-06-04 02:08:08 +00:00
Fariborz Jahanian
7c80959a97
Cleanup/Refactoring of ivar collection. No change in functionality.
...
llvm-svn: 72827
2009-06-04 01:19:09 +00:00
Mike Stump
fa0c645bae
Fix cmake builds.
...
llvm-svn: 72814
2009-06-03 22:24:28 +00:00
Eli Friedman
dd27484888
PR4316: Fix IRGen for cast-to-union extension.
...
llvm-svn: 72803
2009-06-03 20:45:06 +00:00
Anders Carlsson
4c49bb95f8
More temporary work.
...
llvm-svn: 72796
2009-06-03 19:05:16 +00:00
Anders Carlsson
6d36343ed8
Store more information about live temporaries. No functionality change for now.
...
llvm-svn: 72793
2009-06-03 18:54:26 +00:00
Anders Carlsson
82aea737a7
Move code generation of C++ temporaries into a new file.
...
llvm-svn: 72792
2009-06-03 18:40:21 +00:00
Eli Friedman
cb9d07caeb
Add support for __builtin_unwind_init.
...
Also, committing an #if 0'ed __builtin_setjmp and __builtin_longjmp
implementation I've had sitting in my tree for a while. I haven't
enabled it because the LLVM backend support isn't complete yet.
llvm-svn: 72727
2009-06-02 09:37:50 +00:00
Eli Friedman
f6bd15038c
If we recognize alloca, treat it as a builtin. This fixes uses of
...
alloca without declaring it.
llvm-svn: 72719
2009-06-02 07:10:30 +00:00
Fariborz Jahanian
c6d9800564
A corner case of objc2 gc's write-barrier generation
...
for the Next runtime.
llvm-svn: 72703
2009-06-01 21:29:32 +00:00
Eli Friedman
e32c02114f
PR4289: Make sure "&func" has the right LLVM type when "func" is a
...
K&R-style definition.
llvm-svn: 72690
2009-06-01 10:04:20 +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