Chris Lattner
22326a10a7
dissolve some more complexity: make the x86-64 abi lowering code
...
compute its own preferred types instead of having CGT compute
them then pass them (circuituously) down into ABIInfo.
llvm-svn: 109726
2010-07-29 02:31:05 +00:00
Chris Lattner
c11301c76e
simplify Get8ByteTypeAtOffset by making it a member of X86_64ABIInfo
...
llvm-svn: 109724
2010-07-29 02:20:19 +00:00
Chris Lattner
458b2aaee0
now that ABIInfo depends on CGT, it has trivial access to such
...
things as TargetData, ASTContext, LLVMContext etc. Stop passing
them through so many APIs.
llvm-svn: 109723
2010-07-29 02:16:43 +00:00
Chris Lattner
2b03797222
cave in to reality and make ABIInfo depend on CodeGenTypes.
...
This will simplify a bunch of code, coming up next.
llvm-svn: 109722
2010-07-29 02:01:43 +00:00
Chris Lattner
f4ba08aeaf
pass argument vectors in a type that corresponds to the user type if
...
possible. This improves the example to pass <4 x float> instead of
<2 x double> but we still get awful code, and still don't get the
return value right.
llvm-svn: 109700
2010-07-28 23:47:21 +00:00
Chris Lattner
4b8585ef6a
tidy up
...
llvm-svn: 109699
2010-07-28 23:46:15 +00:00
Devang Patel
c7f16ab3e3
Override selected builtin names (e.g. "long int" instead of "long") to match names used by gcc in debug info. This makes gdb testsuite happy.
...
llvm-svn: 109694
2010-07-28 23:23:29 +00:00
Chris Lattner
fa560fedb7
fix some break statements to be formatted more consistently,
...
remove some now-dead code.
llvm-svn: 109690
2010-07-28 23:12:33 +00:00
Chris Lattner
31faff5d58
use Get8ByteTypeAtOffset for the return value path as well so we
...
don't get errors similar to PR7714 on the return path.
llvm-svn: 109689
2010-07-28 23:06:14 +00:00
Chris Lattner
b22f1c8bf7
refactor the autosizing code, eliminating duplication
...
and making Get8ByteTypeAtOffset always succeed and documented.
llvm-svn: 109685
2010-07-28 22:44:07 +00:00
Chris Lattner
4c1e484f39
fix PR7714 by not referencing off the end of a struct when passed by value in
...
x86-64 abi. This also improves codegen as well. Some refactoring is needed of
this code.
llvm-svn: 109681
2010-07-28 22:15:08 +00:00
Fariborz Jahanian
d5010898ab
Fix flags in global block descriptor when
...
block returns structs. Fies radar 8241648.
Executable test added to llvm test suite.
llvm-svn: 109620
2010-07-28 19:07:18 +00:00
Chris Lattner
ff941a666a
some cleanups and get alignments correct for various coerce cases.
...
llvm-svn: 109607
2010-07-28 18:24:28 +00:00
Gabor Greif
79ac9ed7ac
we are not supposed to create an improper callsite using a CallInstr; leave a fixme mentioning the simplification when CallSite can clone itself
...
llvm-svn: 109575
2010-07-28 09:19:33 +00:00
Devang Patel
a652fab052
construct debug info for "id" by hand.
...
Tested by mi1-var-obj.exp in gdb testsuite.
llvm-svn: 109571
2010-07-28 01:33:15 +00:00
John McCall
ba80390307
When creating a jump destination, its scope should be the scope of the
...
enclosing normal cleanup, not the top of the EH stack. I'm *really*
surprised this hasn't been causing more problems.
Fixes rdar://problem/8231514.
llvm-svn: 109569
2010-07-28 01:07:35 +00:00
Argyrios Kyrtzidis
c0279a9826
Revert r109546, it broke linux build.
...
llvm-svn: 109550
2010-07-27 22:37:14 +00:00
Argyrios Kyrtzidis
4fac280618
Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function,
...
DeclIsRequiredFunctionOrFileScopedVar.
This function is part of the public CodeGen interface since it's essentially a CodeGen predicate that is also
needed by the PCH mechanism to determine whether a decl needs to be deserialized during PCH loading for codegen purposes.
This fixes current (and avoids future) codegen-from-PCH bugs.
llvm-svn: 109546
2010-07-27 22:01:17 +00:00
Devang Patel
4f6e73b168
Always use current working directory for DW_AT_comp_dir.
...
llvm-svn: 109535
2010-07-27 20:49:59 +00:00
Devang Patel
6014edd117
Reapply 109303.
...
llvm-svn: 109507
2010-07-27 15:17:16 +00:00
Fariborz Jahanian
0ebca28f1d
2nd argument of __builtin_expect must be evaluated
...
if it hs side-effect to matchgcc's behaviour.
Addresses radar 8172109.
llvm-svn: 109467
2010-07-26 23:11:03 +00:00
John McCall
5cbe152ffc
Test for the presence of EH branch-throughs instead of normal branch-throughs.
...
I knew this code duplication would bite me.
llvm-svn: 109463
2010-07-26 22:44:58 +00:00
Devang Patel
6005082354
Revert 109303.
...
llvm-svn: 109426
2010-07-26 18:49:27 +00:00
Douglas Gregor
b412e174db
Remove the vast majority of the Destroy methods from the AST library,
...
since we aren't going to be calling them ever.
llvm-svn: 109377
2010-07-25 18:17:45 +00:00
John McCall
268b576b72
Mangle enum constant expressions. Fixes rdar://problem/8204122
...
llvm-svn: 109315
2010-07-24 01:17:35 +00:00
Devang Patel
268ad093a7
Untangle filename/dirname confusion. Store constructed strings on the side. Avoid use of Path.makeAbsolute().
...
DW_TAG_compile_unit uses two attributes DW_AT_name and DW_AT_comp_dir. Their expected values are:
$ clang foo.c -g
DW_AT_name - foo.c
DW_AT_comp_dir - `pwd`
$ clang one/two/foo.c -g
DW_AT_name - one/two/foo.c
DW_AT_comp_dir - `pwd`
$ clang /tmp/one/foo.c -g
DW_AT_name - /tmp/one/foo.c
DW_AT_comp_dir - empty
llvm-svn: 109303
2010-07-24 00:59:16 +00:00
John McCall
2ca705eb13
Support catching Objective C pointers in C++ under the non-fragile NeXT runtime.
...
Diagnose attempts to do this under the GNU or fragile NeXT runtimes.
llvm-svn: 109298
2010-07-24 00:37:23 +00:00
Fariborz Jahanian
72cdffa401
Return type of a setter call caused by
...
use of property-dot syntax using 'super' as receiver
is 'void'. This fixes a bug in generating correct
API for setter call. Fixes radar 8203426.
llvm-svn: 109297
2010-07-24 00:34:08 +00:00
Devang Patel
cb9fe9ec16
Revert r109263.
...
llvm-svn: 109284
2010-07-23 23:04:28 +00:00
John McCall
ad5d61e227
Revise cleanup IR generation to fix a major bug with cleanups (PR7686)
...
as well as some significant asymptotic inefficiencies with threading
multiple jumps through deep cleanups.
llvm-svn: 109274
2010-07-23 21:56:41 +00:00
Devang Patel
28f167699a
There is no need to use separate dir name for AT_comp_dir attribute. Using absolute path for filename allows clients to query complete file location info from gdb breakpoints. Save constructed full file name.
...
llvm-svn: 109263
2010-07-23 20:38:37 +00:00
Douglas Gregor
5cc2c8b9c3
Vectors are not integer types, so the type system should not classify
...
them as such. Type::is(Signed|Unsigned|)IntegerType() now return false
for vector types, and new functions
has(Signed|Unsigned|)IntegerRepresentation() cover integer types and
vector-of-integer types. This fixes a bunch of latent bugs.
Patch from Anton Yartsev!
llvm-svn: 109229
2010-07-23 15:58:24 +00:00
Devang Patel
0884a60eb5
Keep track of artificial scopes introduced by line directives. For example,
...
#line 41 "bar.c"
dummy (1, i);
#line 24 "bar.h"
i = f2 (i);
#line 44 "bar.c"
This is tested by step-line.exp in gdb testsuite.
llvm-svn: 109189
2010-07-22 22:29:16 +00:00
John McCall
775f9f9919
Turn off EH cleanups for __block variables; they caused some internal buildbot
...
failures. There's a radar tracking this.
llvm-svn: 109170
2010-07-22 21:25:44 +00:00
Fariborz Jahanian
6e7e8cc19d
atch for implementation of objective-c's -Wselector
...
warning flag in clang. Little more to do
for a PCH issue. Radar 6507158.
llvm-svn: 109129
2010-07-22 18:24:20 +00:00
Devang Patel
222f4be834
ObjCId is special "struct objc_object". Make this explicit in debug info.
...
This is tested by objc-rbreak.exp in gdb testsuite.
llvm-svn: 109050
2010-07-21 22:41:25 +00:00
Devang Patel
65497583b5
Fix regression caused by r108911.
...
Do not override known debug loc with unknown debug loc.
This is tested by sections.exp in gdb testsuite.
llvm-svn: 109022
2010-07-21 18:08:50 +00:00
David Chisnall
4715d161c0
Don't crash when sending a message inside a block with the non-fragile ABI (GNU runtime).
...
llvm-svn: 109012
2010-07-21 15:28:28 +00:00
David Chisnall
7fa204edc7
Mark the load after calling objc_msg_lookup_sender() so that it doesn't get optimised away (GNU runtime).
...
llvm-svn: 109010
2010-07-21 12:55:25 +00:00
John McCall
cda666ccd8
Rename LazyCleanup -> Cleanup. No functionality change for these last three
...
commits.
llvm-svn: 109000
2010-07-21 07:22:38 +00:00
John McCall
20141f2d8c
Rip out EHCleanupScope.
...
llvm-svn: 108999
2010-07-21 07:11:21 +00:00
John McCall
7535ee0352
Kill the CleanupBlock API.
...
llvm-svn: 108998
2010-07-21 07:04:01 +00:00
John McCall
65bea08879
Switch the fragile-ABI @finally/@synchronized cleanup over to using a lazy
...
cleanup.
llvm-svn: 108997
2010-07-21 06:59:36 +00:00
John McCall
0d42a41a63
Code simplification.
...
llvm-svn: 108996
2010-07-21 06:45:54 +00:00
John McCall
fb442ae7b9
Switch the main possibly-conditional temporary cleanup over to being lazy.
...
llvm-svn: 108995
2010-07-21 06:44:28 +00:00
John McCall
8680f87d99
Switch the destructor for a temporary arising from a reference binding over to
...
using a lazy cleanup.
llvm-svn: 108994
2010-07-21 06:29:51 +00:00
John McCall
da650e091f
Switch the __cxa_guard_abort cleanup to being a lazy cleanup.
...
llvm-svn: 108993
2010-07-21 06:20:50 +00:00
John McCall
a464ff9d15
Switch some random local-decl cleanups over to using lazy cleanups. Turn on
...
the block-release unwind cleanup: we're never going to test it if we don't turn
it on.
llvm-svn: 108992
2010-07-21 06:13:08 +00:00
John McCall
906da4bb52
Switch finally cleanups over to being lazy cleanups. We get basically nothing
...
from the laziness features here except better block ordering, but it removes yet
another CleanupBlock use.
llvm-svn: 108990
2010-07-21 05:47:49 +00:00
John McCall
f99a631e4e
Implement proper base/member destructor EH chaining.
...
llvm-svn: 108989
2010-07-21 05:30:47 +00:00