- 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
-
Ben Langmuir authored
Provides a way to create a virtual file system using a YAML file that supports mapping a file to a path on an 'external' file system. The external file system will typically be the 'real' file system, but for testing it can be changed. A future patch will add a clang option to allow the user to specify such a file and overlay it, but for now this code is only exercised by the unit tests. Differential Revision: http://llvm-reviews.chandlerc.com/D2835 llvm-svn: 201905
-
Warren Hunt authored
Because GCC incorrectly defines _mm_prefetch to take anything that casts to void*, people have started using that behavior. The previous patch that made _mm_prefetch actually take a const char * broke compatibility with existing code. This update to the patch leaves the macro that defines _mm_prefetch with the (void*) cast when _MSC_VER is not defined. llvm-svn: 201901
-
- 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
-
Ted Kremenek authored
llvm-svn: 201879
-
Ted Kremenek authored
[ObjC] Change default property synthesis logic to not completely skip DiagnoseUnimplementedProperties. We're going to extend DiagnoseUnimplementedProperties shortly to look for more cases that aren't handled by default property synthesis. llvm-svn: 201878
-
Ted Kremenek authored
No functionality change. llvm-svn: 201877
-
Richard Smith authored
spotting this! llvm-svn: 201871
-
NAKAMURA Takumi authored
llvm-svn: 201862
-
Aaron Ballman authored
llvm-svn: 201858
-
Aaron Ballman authored
llvm-svn: 201857
-
Aaron Ballman authored
Moving the documentation for the type safety checking attributes into AttrDocs. If a custom heading is provided, do not automatically generate the alternate spelling list. This is necessary because some attributes have distinct semantic spellings and meanings, but use the same semantic attribute internally. Such attributes should have multiple elements in their documentation list, but not show all spellings. At some point, it would be nice to have a way to attach the documentation element to a specific spelling for these cases. llvm-svn: 201851
-
Aaron Ballman authored
llvm-svn: 201850
-
Tim Northover authored
llvm-svn: 201849
-
Tim Northover authored
This extends the intrinsic lookup table format slightly, and adds entries for use the shared ARM/AArch64 definitions. The benefit is currently smaller than for the SISD intrinsics (there's more custom code implementing this set), but a few lines are saved and there's scope for future expansion. llvm-svn: 201848
-
Tim Northover authored
This extracts the table-driven intrinsic lookup phase into a separate function, to be used by EmitCommonNeonBuiltinExpr soon. It also simplifies the logic used in that lookup, since VectorCastArgN and ScalarArgN were actually identical. llvm-svn: 201847
-
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
-
NAKAMURA Takumi authored
[CMake] Get rid of explicit dependencies to include/clang/*.inc and introduce CLANG_TABLEGEN_TARGETS. This does; - clang_tablegen() adds each tblgen'd target to global property CLANG_TABLEGEN_TARGETS as list. - List of targets is added to LLVM_COMMON_DEPENDS. - all clang libraries and targets depend on generated headers. You might wonder this would be regression, but in fact, this is little loss. - Almost all of clang libraries depend on tblgen'd files and clang-tblgen. - clang-tblgen may cause short stall-out but doesn't cause unconditional rebuild. - Each library's dependencies to tblgen'd files might vary along headers' structure. It made hard to track and update *really optimal* dependencies. Each dependency to intrinsics_gen and ClangSACheckers is left as DEPENDS. llvm-svn: 201842
-
Patrik Hagglund authored
llvm-svn: 201840
-
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
-
Reid Kleckner authored
The pp-trace clang tool was using it successfully. We can still delete the callbacks in Frontend/PrintPreprocessedOutput.cpp because they were effectively dead. llvm-svn: 201825
-
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
-
Reid Kleckner authored
This reverts commit r201810. It was failing these tests on my workstation: Clang :: CodeGen/override-layout.c Clang :: CodeGenCXX/override-layout.cpp Clang :: PCH/check-deserializations.cpp llvm-svn: 201823
-
- 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
-
Reid Kleckner authored
This reduces the number of files we need to touch to add a new pragma, and reduces the number of externally visible symbols in clang. Make the handlers structs instead of classes because the vast majority have no private members. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D2834 llvm-svn: 201820
-
Ben Langmuir authored
Previously reverted in r201755 due to causing an assertion failure. I've removed the offending assertion, and taught the CompilerInstance to create a default virtual file system inside createFileManager. In the future, we should be able to reach into the CompilerInvocation to customize this behaviour without breaking clients that don't care. llvm-svn: 201818
-
Warren Hunt authored
External sources shouldn't prevent the layout engine from using MSLayout. If lldb were to support debugging in microsoft mode, some code will need to be added to MSRecordLayoutBuilder to handel external layouts. llvm-svn: 201810
-
Adrian Prantl authored
llvm-svn: 201807
-
Peter Collingbourne authored
hasAnyTemplateArgument, and (out of necessity) an isExpr matcher. Also updates the TemplateArgument doxygen to reflect reality for non-canonical template arguments. Differential Revision: http://llvm-reviews.chandlerc.com/D2810 llvm-svn: 201804
-
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
-
Jordan Rose authored
When CLANG_BUILD_EXAMPLES is not on we set the EXCLUDE_FROM_ALL directory property for the examples/ directory to tell CMake not to build them by default. The AddLLVM.cmake APIs are not aware of this and try to install targets that are not built. This does not cause an install-time error because CMake excludes the directory from the default installation. However, now that installation attaches targets to the LLVMExports export set CMake-based applications that find_package(LLVM) fail because the example plugin binary is not available. Tell the AddLLVM.cmake APIs to exclude the examples from installation by setting the EXCLUDE_FROM_ALL variable they check. Patch by Brad King! llvm-svn: 201799
-