- Feb 22, 2014
-
-
Warren Hunt authored
CGRecordLayoutBuilder was aging, complex, multi-pass, and shows signs of existing before ASTRecordLayoutBuilder. It redundantly performed many layout operations that are now performed by ASTRecordLayoutBuilder and asserted that the results were the same. With the addition of support for the MS-ABI, such as placement of vbptrs, vtordisps, different bitfield layout and a variety of other features, CGRecordLayoutBuilder was growing unwieldy in its redundancy. This patch re-architects CGRecordLayoutBuilder to not perform any redundant layout but rather, as directly as possible, lower an ASTRecordLayout to an llvm::type. The new architecture is significantly smaller and simpler than the CGRecordLayoutBuilder and contains fewer ABI-specific code paths. It's also one pass. The architecture of the new system is described in the comments. For the most part, the new system simply takes all of the fields and bases from an ASTRecordLayout, sorts them, inserts padding and dumps a record. Bitfields, unions and primary virtual bases make this process a bit more complicated. See the inline comments. In addition, this patch updates a few lit tests due to the fact that the new system computes more accurate llvm types than CGRecordLayoutBuilder. Each change is commented individually in the review. Differential Revision: http://llvm-reviews.chandlerc.com/D2795 llvm-svn: 201907
-
- Feb 21, 2014
-
-
Ted Kremenek authored
Add requirement that attribute 'objc_protocol_requires_explicit_implementation' can only be applied to protocol definitions. llvm-svn: 201899
-
Joerg Sonnenberger authored
llvm-svn: 201894
-
Ted Kremenek authored
llvm-svn: 201893
-
Aaron Ballman authored
Adding role-based capability attributes that allow you to express role management: asserting a capability is held, acquiring a capability and releasing a capability. Also includes some skeleton documentation for these new attributes. This functionality should be considered a WIP. llvm-svn: 201890
-
Ted Kremenek authored
llvm-svn: 201880
-
Oliver Stannard authored
Added two new options for -mfpu when targetting ARM: * fpv4-sp-d16 * fp4-sp-d16 The first is the same spelling as gcc. The lack of a leading `v' is correct, this is consistent with ARM's documentation and gcc's spelling of the option. llvm-svn: 201846
-
Rafael Espindola authored
llvm-svn: 201837
-
Reid Kleckner authored
Virtual methods expect 'this' to point to the vfptr containing the virtual method, and this extends to virtual member pointer thunks. The relevant vfptr is always at offset zero on entry to the thunk, and no this adjustment is needed. Previously we would not include the vfptr adjustment in the member pointer, and we'd look at the vfptr offset when loading from the vftable in the thunk. Fixes PR18917. llvm-svn: 201835
-
Warren Hunt authored
Slight change to the way zero-sized sub-objects are tracked in the presence of virtual bases. In addition we correctly distinguish between dsize and nvsize. addresses http://llvm.org/bugs/show_bug.cgi?id=18826 Unit tests are included. llvm-svn: 201832
-
Bob Wilson authored
There is no bound architecture for the dsymutil action in the driver. Trying to check various properties of the target will cause an assertion failure because the target doesn't get initialized without a bound architecture. <rdar://problem/16111555> llvm-svn: 201830
-
Jordan Rose authored
Somehow both Daniel and I missed the fact that while loops are only identical if they have identical bodies. Patch by Daniel Fahlgren! llvm-svn: 201829
-
David Majnemer authored
Sema: Do not assert when dereferencing member pointer using virtual inheritance with an incomplete class type The MS ABI requires that we determine the vbptr offset if have a virtual inheritance model. Instead, raise an error pointing to the diagnostic when this happens. This fixes PR18583. Differential Revision: http://llvm-reviews.chandlerc.com/D2842 llvm-svn: 201824
-
- Feb 20, 2014
-
-
Reid Kleckner authored
gcc never expands macros in pragmas and MSVC always expands macros before processing pragmas. Clang usually allows macro expansion, except in a handful of pragmas, most of which are handled by the lexer. Also remove PPCallbacks for pragmas that are currently handled in the parser. Without a Parser, such as with clang -E, these callbacks would never be called. Fixes PR18576. llvm-svn: 201821
-
Adrian Prantl authored
llvm-svn: 201807
-
Adrian Prantl authored
llvm-svn: 201801
-
Adrian Prantl authored
Some tests in debuginfo-tests require the system-darwin feature. This reverts commit 179670. llvm-svn: 201800
-
Benjamin Kramer authored
PR18905. llvm-svn: 201795
-
Rafael Espindola authored
llvm-svn: 201791
-
Alexey Samsonov authored
llvm-svn: 201789
-
Pekka Jaaskelainen authored
Patch from Anastasia Stulova! llvm-svn: 201788
-
Daniel Jasper authored
This breaks backwards compatibility with existing code. Previously, this was defined as #define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, (sel))) Which basically accepts any pointer. Changing this to char* simply breaks a lot of existing code. I have tried changing char* to "const void*", which seems to be the right thing as per Intel specification this should work on basically any pointer. However, apparently this breaks windows compatibility (because of a conflicting declaration in windows.h). So, we probably need to #ifdef this based on whether clang is compiling for windows. According to Chandler, this might be done by introducing an additional symbol to a fake type in BuiltinsX86.def and then condition the type expansion on the platform. llvm-svn: 201775
-
Timur Iskhodzhanov authored
We should probably use different argument types on different platforms? llvm-svn: 201774
-
Daniel Jasper authored
Otherwise, this is not backwards compatible to the existing macro and can break existing code. llvm-svn: 201772
-
Daniel Jasper authored
The test directory cannot assumed to be writable. llvm-svn: 201768
-
Argyrios Kyrtzidis authored
[code-completion] Style guideline for Cocoa has custom accessor in property declarations without spaces around '='. rdar://16059171 llvm-svn: 201765
-
Warren Hunt authored
Also updating lit test to be more roboust (changing fixed offsets to flexible offsets) llvm-svn: 201742
-
Warren Hunt authored
This patch adds several built-ins that are required for ms compatibility. _mm_prefetch must be a built-in because it takes a compile-time constant argument and our prior approach of using a #define to the current built-in doesn't work in the presence of re-declaration of _mm_prefetch. The others can be obtained by including the windows system headers. If a user includes the windows system headers but not intrin.h they still need to work and therefore must be built-in because we don't get a chance to implement them in intrin.h in this case. llvm-svn: 201734
-
- Feb 19, 2014
-
-
Joerg Sonnenberger authored
llvm-svn: 201730
-
Chandler Carruth authored
This definition is not chosen idly. There is an unfortunate reality with max_align_t -- the specific nature of its definition leaks into the ABI almost immediately. Because it is part of C11 and C++11 it becomes essential for it to match with other systems on that ABI. There is an effort to discourage any further use of this construct as a consequence -- using max_align_t introduces an immediate ABI problem. We can never update it to have larger alignment even as the microarchitecture changes to necessitate higher alignment. =/ The particular definition here exactly matches the ABI of GCC's chosen ::max_align_t definition, for better or worse. This was written with the help of Richard Smith who was decoding the exact ABI implications of the selected definition in GCC. Notably, in-register arguments are impacted by the particular definition chosen. =/ No one is under the illusion that this is a "good" or "useful" definition of max_align_t, and we are working with the standards committee to specify a more useful interface to address this need. llvm-svn: 201729
-
Reid Kleckner authored
In the Microsoft ABI, the vftable is laid out as if all methods in every overload set were declared in reverse order of declaration at the point of declaration of the first overload in the set. Previously we only considered virtual methods in an overload set, but MSVC includes non-virtual methods for ordering purposes. Fixes PR18902. llvm-svn: 201722
-
Reid Kleckner authored
Clang itself only emits CodeView line tables, so it seems more consistent to ask cl.exe for the same format. llvm-svn: 201721
-
Jordan Rose authored
IdenticalExprChecker now warns if any expressions in a logical or bitwise chain (&&, ||, &, |, or ^) are the same. Unlike the previous patch, this actually checks all subexpressions against each other (an O(N^2) operation, but N is likely to be small). Patch by Daniel Fahlgren! llvm-svn: 201702
-
Jordan Rose authored
This extends the checks for identical expressions to handle identical statements, and compares the consequent and alternative ("then" and "else") branches of an if-statement to see if they are identical, treating a single statement surrounded by braces as equivalent to one without braces. This does /not/ check subsequent branches in an if/else chain, let alone branches that are not consecutive. This may improve in a future patch, but it would certainly take more work. Patch by Daniel Fahlgren! llvm-svn: 201701
-
Tim Northover authored
This fixes one immediate bug where an expression with side-effects could be emitted twice during a NEON call. It also prepares the way for folding CodeGen for many of the SISD intrinsics into a table, reducing code size and hopefully increasing performance eventually ("binary search + few switch cases" should be better than "lots of switch cases"). llvm-svn: 201667
-
Renato Golin authored
Patch by Andrew Turner. llvm-svn: 201662
-
Tim Northover authored
These instructions (well, the f32 ones) are supported on 32-bit ARMv8, not just AArch64. Now that the arm_neon.td refactoring is complete, adding them is surprisingly simple. rdar://problem/16035743 llvm-svn: 201661
-
Ted Kremenek authored
llvm-svn: 201640
-
David Majnemer authored
DR18 previously forebode typedefs to be used as parameter types if they were of type 'void'. DR577 allows 'void' to be used as a function parameter type regardless from where it came. llvm-svn: 201631
-
Hans Wennborg authored
llvm-svn: 201626
-