Douglas Gregor
c9199f522f
Clean up CMake dependencies
...
llvm-svn: 113489
2010-09-09 15:44:58 +00:00
Fariborz Jahanian
cfddabf5a3
Block ivar layout must assume that the 'isa'
...
field of the block descriptor is GC'able (scanned)
as this what the runtime expects (one can send it
messages). Radar 8394947.
llvm-svn: 113454
2010-09-09 00:21:45 +00:00
Francois Pichet
5cc0a67f08
Fix warnings caused by new CXXUuidofExprClass enumerator.
...
llvm-svn: 113444
2010-09-08 23:47:05 +00:00
John McCall
68ff03728a
Implement ARM static local initialization guards, which are more compact than
...
Itanium guards and use a slightly different compiled-in API.
llvm-svn: 113330
2010-09-08 01:44:27 +00:00
Fariborz Jahanian
366a94822b
Local static block variable referecned in its
...
block-literal initializer expression causes IRgen to crash.
This patch fixes by saving it in StaticLocalDecl map
already used for such purposes. (radar 8390455).
llvm-svn: 113307
2010-09-07 23:26:17 +00:00
Fariborz Jahanian
535618b927
get rid of a warning.
...
llvm-svn: 113256
2010-09-07 19:57:04 +00:00
Fariborz Jahanian
56603ef7b2
Have Sema check for validity of CGString literal
...
instead of asserting in IRGen. Fixes radar 8390459.
llvm-svn: 113253
2010-09-07 19:38:13 +00:00
Argyrios Kyrtzidis
2fdb5b5955
LastFieldBitfield in CGObjCCommonMac::BuildAggrIvarLayout keeps bitfields or unnamed fields but later the code
...
assumes that it's always a bitfield. This can lead to a crash (reported at rdar://8368320).
llvm-svn: 113154
2010-09-06 12:00:10 +00:00
Chris Lattner
52bcf96384
move the hackaround for PR6537 to catch unions as well,
...
fixing the ICE in PR7151
llvm-svn: 113130
2010-09-06 00:13:11 +00:00
Chris Lattner
f53c096813
clean up some formatting.
...
llvm-svn: 113129
2010-09-06 00:11:41 +00:00
Nick Lewycky
1b36b55f89
No functional change. Replace Out << 'a' << 'b' with Out << "ab" and spell
...
David Vandevoorde's name correctly.
llvm-svn: 113103
2010-09-05 03:40:33 +00:00
Fariborz Jahanian
60babfb8a1
Casting of a property reference to 'void' did not
...
generate the necessary code. This patch fixes it.
// rdar://8389655
llvm-svn: 113079
2010-09-04 19:49:18 +00:00
John McCall
2917bd0fb4
Petty optimization.
...
llvm-svn: 113049
2010-09-04 01:26:37 +00:00
Fariborz Jahanian
087206dbcd
Truncate block variable of bool type to i1 when its
...
value is used. This matches with non-block variable
use of bool type. (Fixes radar 8390062).
llvm-svn: 113027
2010-09-03 23:07:53 +00:00
Fariborz Jahanian
9d798d13f3
Cope with llvm's reference to bool type of 'i1' vs. clang's
...
type of 'i8' for the same for __block variables of
type bool. refixes radar 8382559.
llvm-svn: 113015
2010-09-03 21:36:02 +00:00
John McCall
56f57589af
A constant initializer never matches the type of the variable it's
...
initializing; it at best matches the element type of the variable
it's initializing. Fixes PR8073.
llvm-svn: 112992
2010-09-03 18:58:50 +00:00
Daniel Dunbar
2f8df98c92
IRgen: Fix silly thinko in r112021, which was generating code for the same expr
...
twice. This showed up as an assert on the odd test case because we generated the
decl map entry twice.
llvm-svn: 112943
2010-09-03 02:07:00 +00:00
Dawn Perchik
335e16bad4
Add symantic support for the Pascal calling convention via
...
"__attribute((pascal))" or "__pascal" (and "_pascal" under
-fborland-extensions). Support still needs to be added to llvm.
llvm-svn: 112939
2010-09-03 01:29:35 +00:00
Bob Wilson
6061b05d51
Translate NEON vabdl, vaba, and vabal builtins to be implemented using the
...
vabd intrinsic combined with zext and add operations.
llvm-svn: 112937
2010-09-03 01:27:09 +00:00
John McCall
0d635f53a8
Re-commit r112916 with an additional fix for the self-host failures.
...
I've audited the remaining getFunctionInfo call sites.
llvm-svn: 112936
2010-09-03 01:26:39 +00:00
John McCall
c32f94b4ce
Revert r112916, it's breaking selfhost pretty badly.
...
llvm-svn: 112925
2010-09-03 00:40:45 +00:00
Daniel Dunbar
be13194655
Revert "Another i1 vs. i8 type mismatch issue. This time", it breaks some projects.
...
llvm-svn: 112922
2010-09-03 00:35:23 +00:00
John McCall
12d3891a27
It's not safe to use the generic CXXMethodDecl overload of CGT::getFunctionInfo
...
to set up a destructor call, because ABIs can tweak these conventions.
Fixes rdar://problem/8386802.
llvm-svn: 112916
2010-09-03 00:01:57 +00:00
Daniel Dunbar
a70fab8dd7
IRgen/Obj-C: Rewrite Objective-C bit-field access to compute the access strategy
...
using the same methods as used for normal structures.
- This fixes problems with reading past the end of the structure and with
handling straddled bit-field access.
llvm-svn: 112914
2010-09-02 23:53:31 +00:00
Daniel Dunbar
c7f9bbafe4
IRgen: Move CGBitFieldInfo strategy computation helpers to static member
...
functions.
llvm-svn: 112913
2010-09-02 23:53:28 +00:00
Douglas Gregor
040ad500c4
Fix a few more ConvertTypes that should be ConvertTypeForMems, fixing
...
two regressions in Boost.Config.
llvm-svn: 112908
2010-09-02 23:24:14 +00:00
Bob Wilson
5b4904f7a3
Add a bunch of missing bitcasts for clang NEON builtin expansions.
...
Radar 8388233
llvm-svn: 112890
2010-09-02 22:37:30 +00:00
Douglas Gregor
6429f5cf29
Eliminate CXXBindReferenceExpr, which was used in a ton of
...
well-intentioned but completely unused code.
llvm-svn: 112868
2010-09-02 21:50:02 +00:00
David Chisnall
cf60744cd7
Tidy up last commit, as per Devang's comments.
...
llvm-svn: 112840
2010-09-02 18:01:51 +00:00
Douglas Gregor
04f3621860
Revert my two IRgen fixes for "bool", then use a far simpler approach
...
based on ConvertTypeForMem. Thanks to John for pointing out the right
solution.
llvm-svn: 112838
2010-09-02 17:38:50 +00:00
Fariborz Jahanian
05bbef63b6
Another i1 vs. i8 type mismatch issue. This time
...
a 'bool' byref variable in memory. Fixes radar 8382559.
llvm-svn: 112835
2010-09-02 17:28:31 +00:00
David Chisnall
6bf98ff491
Use the unmangled name for the display name in Objective-C debug info. This should have no effect with the Mac runtime where clang (unlike GCC) uses the display name symbol name.
...
llvm-svn: 112833
2010-09-02 17:16:32 +00:00
Douglas Gregor
262e4e2ab5
Fix more i1/i8 pointer madness. Here, an overactive assertion
...
complains when the element type of a C++ "delete" expression is
different from what we would expect from the pointer type. When
deleting a bool*, we end up with an i1 on one side (where we compute
the LLVM type from the Clang bool type) and i8 on the other (where we
grab the LLVM type from the LLVM pointer type). I've weakened the
assertion appropriately, and the Boost Parallel Graph Library now
passes its regression tests.
llvm-svn: 112821
2010-09-02 15:34:35 +00:00
Douglas Gregor
e791a0546c
Fix a crash involving pointer-to-data-members of boolean type. We were
...
constructing an LLVM PointerType directly from the "bool"'s LLVM type
(i1), which resulted in unfortunate pointer type i1*. The fix is to
build the LLVM PointerType from the corresponding Clang PointerType,
so that we get i8* in the case of a bool.
John, please review. I also left a FIXME there because we seem to be
dropping "volatile", which would be rather unfortunate.
llvm-svn: 112819
2010-09-02 15:00:29 +00:00
John McCall
9bca923c10
Simplify some random accesses to the ASTContext from the ABI classes.
...
llvm-svn: 112816
2010-09-02 10:25:57 +00:00
John McCall
8ed55a54fd
Abstract IR generation of array cookies into the C++ ABI class and
...
implement ARM array cookies. Also fix a few unfortunate bugs:
- throwing dtors in deletes prevented the allocation from being deleted
- adding the cookie to the new[] size was not being considered for
overflow (and, more seriously, was screwing up the earlier checks)
- deleting an array via a pointer to array of class type was not
causing any destructors to be run and was passing the unadjusted
pointer to the deallocator
- lots of address-space problems, in case anyone wants to support
free store in a variant address space :)
llvm-svn: 112814
2010-09-02 09:58:18 +00:00
Bob Wilson
1b87c9a646
Translate NEON vmull, vmlal, and vmlsl builtins to llvm multiply-add/sub
...
with zext/sext operations, instead of to llvm intrinsics. I have a plan to
avoid the clang builtins for these, but it is going to take a little longer
and I want to get the NEON intrinsics updated before the 2.8 release.
llvm-svn: 112764
2010-09-01 23:20:27 +00:00
Fariborz Jahanian
61a312413c
Fix IRGen when property-dot syntax used to access
...
a c++ class object 'ivar'. Fixes radar 8366604.
llvm-svn: 112729
2010-09-01 19:36:41 +00:00
Ted Kremenek
0ef508d301
Split ObjCInterfaceDecl::ReferencedProtocols into two lists: ReferencedProtocols and AllReferencedProtocols. ReferencedProtocols
...
(and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in
an @interface declaration. 'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced
in both the @interface and class extensions. The latter is needed for semantic analysis/codegen, while the former is
needed to maintain the lexical information of the original source.
Fixes <rdar://problem/8380046>.
llvm-svn: 112691
2010-09-01 01:21:15 +00:00
Chris Lattner
d426c8eae3
fix rdar://8360877 a really nasty miscompilation in Boost.Xpressive
...
caused by my ABI work. Passing:
struct outer {
int x;
struct epsilon_matcher {} e;
int f;
};
as {i32,i32} isn't safe, because the offset of the second element
needs to be at 8 when it is interpreted as a memory value.
llvm-svn: 112686
2010-09-01 00:50:20 +00:00
Chris Lattner
be5eb17536
same refactoring as before, this time on the argument side.
...
llvm-svn: 112684
2010-09-01 00:24:35 +00:00
Chris Lattner
52b3c13149
refactor some code to cut down on redundancy, no functionality change.
...
llvm-svn: 112683
2010-09-01 00:20:33 +00:00
John McCall
c134eb5ada
Amusingly, I missed this point of abstraction in all my earlier
...
member-pointer refactoring: dereferencing a member data pointer.
llvm-svn: 112640
2010-08-31 21:07:20 +00:00
Chris Lattner
04dc957260
Add support for windows x86-64 varargs, patch by Cameron Esfahani!
...
llvm-svn: 112603
2010-08-31 16:44:54 +00:00
John McCall
5d865c3292
Teach IR generation to return 'this' from constructors and destructors
...
under the ARM ABI.
llvm-svn: 112588
2010-08-31 07:33:07 +00:00
Sebastian Redl
50c682585f
Rename DeclContext::getLookupContext to getRedeclContext and change its semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them.
...
llvm-svn: 112563
2010-08-31 00:36:30 +00:00
Chris Lattner
a48fbe8c53
Fix PR8029, a x86-32 ABI regression in introduced in r112211
...
llvm-svn: 112537
2010-08-30 22:03:23 +00:00
Bob Wilson
b9225f7f85
Translate NEON vmovn builtin to a vector truncation instead of using an llvm
...
intrinsic.
llvm-svn: 112504
2010-08-30 19:57:13 +00:00
Alexis Hunt
3b7918625c
Revert my user-defined literal commits - r1124{58,60,67} pending
...
some issues being sorted out.
llvm-svn: 112493
2010-08-30 17:47:05 +00:00
Alexis Hunt
e3675ef0f3
Two minor fixes to user-defined literals:
...
- Zero-initialize UDLData so that crashes stop
- Stop complaining that we can't emit them (we most certainly can)
llvm-svn: 112467
2010-08-30 09:27:16 +00:00