summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Fix gcc -Wparentheses warning.Patrik Hagglund2014-02-211-1/+1
| | | | llvm-svn: 201840
* Accept -no-integrated-as in -cc1 and forward it to llvm.Rafael Espindola2014-02-216-6/+11
| | | | llvm-svn: 201837
* MS ABI: Include the vfptr offset in memptrs to virtual methodsReid Kleckner2014-02-212-13/+45
| | | | | | | | | | | | | | | 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
* [MS-ABI] Update to zero-sized padding algorithmWarren Hunt2014-02-212-21/+59
| | | | | | | | | | 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
* Fix an assertion failure when invoking dsymutil.Bob Wilson2014-02-212-2/+8
| | | | | | | | | 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
* [analyzer] Fix a bug in IdenticalExprChecker concerning while loops.Jordan Rose2014-02-212-2/+18
| | | | | | | | | 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
* Revert the removal of PPCallbacks::PragmaComment() in r201821Reid Kleckner2014-02-202-0/+34
| | | | | | | | 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
* Sema: Do not assert when dereferencing member pointer using virtual ↵David Majnemer2014-02-207-58/+68
| | | | | | | | | | | | | | 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
* Revert "Enable MSRecordLayout in the presence of external sources."Reid Kleckner2014-02-201-1/+1
| | | | | | | | | | | 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
* Expand macros in pragmas with -fms-extensions and -EReid Kleckner2014-02-204-70/+27
| | | | | | | | | | | | | | 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
* Hide pragma handler classes in ParsePragma.cppReid Kleckner2014-02-204-246/+212
| | | | | | | | | | | | | | 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
* Recommit virtual file systemBen Langmuir2014-02-2017-109/+711
| | | | | | | | | | | 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
* Enable MSRecordLayout in the presence of external sources.Warren Hunt2014-02-201-1/+1
| | | | | | | | | 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
* Clarify comment.Adrian Prantl2014-02-201-1/+1
| | | | llvm-svn: 201807
* Add TemplateSpecializationType polymorphism for hasTemplateArgument andPeter Collingbourne2014-02-204-15/+79
| | | | | | | | | | | 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
* add a comment.Adrian Prantl2014-02-201-0/+1
| | | | llvm-svn: 201801
* Revert "Remove dead option."Adrian Prantl2014-02-201-0/+4
| | | | | | | | Some tests in debuginfo-tests require the system-darwin feature. This reverts commit 179670. llvm-svn: 201800
* [CMake] Fix installation without CLANG_BUILD_EXAMPLESJordan Rose2014-02-201-0/+1
| | | | | | | | | | | | | | | | | | 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
* Remove unused diagnostic.Benjamin Kramer2014-02-201-2/+0
| | | | llvm-svn: 201796
* Sema: Emit a warning for non-null terminated format strings and other ↵Benjamin Kramer2014-02-203-2/+35
| | | | | | | | pathological cases. PR18905. llvm-svn: 201795
* Fix typo.Rafael Espindola2014-02-201-1/+1
| | | | | | Patch by Stephan Falke. llvm-svn: 201794
* [mips] Make it impossible to have UnknownABI in CodeGen and Integrated ↵Daniel Sanders2014-02-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Assembler. Summary: This removes the need to coerce UnknownABI to the default ABI (O32 for MIPS32, N64 for MIPS64 [*]) in both MipsSubtarget and MipsAsmParser. Clang has been updated to disable both possible default ABI's before enabling the ABI it intends to use. [*] N64 being the default for MIPS64 is not actually correct. However N32 is not fully implemented/tested yet. Depends on: D2830 Reviewers: jacksprat, matheusalmeida Reviewed By: matheusalmeida Differential Revision: http://llvm-reviews.chandlerc.com/D2832 Differential Revision: http://llvm-reviews.chandlerc.com/D2846 llvm-svn: 201792
* Remove really old "APPLE LOCAL" markers.Rafael Espindola2014-02-202-2/+1
| | | | llvm-svn: 201791
* Get rid of obsolete addProfileRT(), generalize the relevant ↵Alexey Samsonov2014-02-202-31/+24
| | | | | | addProfileRTLinux() to all OS llvm-svn: 201789
* OpenCL: fix for the restriction on pointers to functions.Pekka Jaaskelainen2014-02-205-9/+78
| | | | | | Patch from Anastasia Stulova! llvm-svn: 201788
* [CMake] clang_tablegen(AttrSpellings.inc): Prune redundant DEPENDS.NAKAMURA Takumi2014-02-201-1/+1
| | | | llvm-svn: 201785
* D2843 - [OPENMP] move all clauses to a separate headerAlexey Bataev2014-02-202-400/+425
| | | | llvm-svn: 201781
* Revert r201734 and r201742.Daniel Jasper2014-02-209-122/+23
| | | | | | | | | | | | | | | | | | | | | 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
* Revert r201772 as it breaks things on WindowsTimur Iskhodzhanov2014-02-202-2/+2
| | | | | | We should probably use different argument types on different platforms? llvm-svn: 201774
* Change parameter type of _mm_prefetch to "const void *".Daniel Jasper2014-02-202-2/+2
| | | | | | | Otherwise, this is not backwards compatible to the existing macro and can break existing code. llvm-svn: 201772
* Don't actually emit output in test/Headers/mmprefetch.c.Daniel Jasper2014-02-201-1/+1
| | | | | | The test directory cannot assumed to be writable. llvm-svn: 201768
* [code-completion] Style guideline for Cocoa has custom accessor in property ↵Argyrios Kyrtzidis2014-02-202-8/+8
| | | | | | | | declarations without spaces around '='. rdar://16059171 llvm-svn: 201765
* [libclang/python] Use a Python standard library module to create a temporary ↵Argyrios Kyrtzidis2014-02-201-9/+2
| | | | | | | | file. Patch by Brian Gesiak! llvm-svn: 201762
* Reverting the virtual file system implementation, because it triggers an ↵Juergen Ributzka2014-02-2018-707/+108
| | | | | | | | | | assertion in our internal build bots. This reverts commits 201618, 201635, 201636, 201639, 201685, 201691, and 201696. llvm-svn: 201755
* [AST] Follow-up for r201468, move the check to the caller and add an assertion.Argyrios Kyrtzidis2014-02-201-4/+8
| | | | | | Suggested by Richard Smith. llvm-svn: 201753
* Updated to r201734. Removed unused declaration from lit test.Warren Hunt2014-02-191-5/+4
| | | | | | | Also updating lit test to be more roboust (changing fixed offsets to flexible offsets) llvm-svn: 201742
* Use llvm::DeleteContainerSeconds when possibleReid Kleckner2014-02-1912-52/+14
| | | | llvm-svn: 201739
* Fix two pedantic issues with our builtin headers. The __STDC_VERSION__Chandler Carruth2014-02-192-2/+2
| | | | | | | | | for C99 is '199901L' and we shouldn't be comparing it with anything else. Neither of these should have had any impact in practice. llvm-svn: 201738
* Doing some temporary touch-up on the gnu namespace attribute documentation, ↵Aaron Ballman2014-02-191-4/+1
| | | | | | | | from a post-commit review comment. Ideally, this content will eventually find a home with the rest of the attribute documentation. llvm-svn: 201736
* Add _mm_prefetch and some others as MS builtinsWarren Hunt2014-02-199-23/+123
| | | | | | | | | | | | | 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
* Until attribute documentation is implemented as a server-side feature, I ↵Aaron Ballman2014-02-192-5/+622
| | | | | | | | will be manually committing AttributeReference.rst so that attribute documentation can be on the live server instead of simply disappearing from the language extensions page without obvious replacement. This is a temporary stop-gap solution until server-side generation is implemented, at which point the AttributeReference.rst will go back to holding placeholder text. llvm-svn: 201733
* Refactored the way attribute category headers are handled so that it is ↵Aaron Ballman2014-02-194-117/+109
| | | | | | possible to use custom categories. This allows for moving the consumable attributes (consumable, callable_when, return_typestate, etc) to be grouped together, with a content heading, like they were in the language extensions documentation. Moved the consumable attribute documentation from the language extensions into the attribute documentation table. llvm-svn: 201732
* Remove a broken attempt to cope with someone #undef'ing __has_include_next.Richard Smith2014-02-193-5/+3
| | | | | | | This was broken because __has_include_next(...) would not be valid in a preprocessor condition if __has_include_next is not defined. llvm-svn: 201731
* Hook up NetBSD/sparc and NetBSD/sparc64 as and ld invocations.Joerg Sonnenberger2014-02-193-0/+107
| | | | llvm-svn: 201730
* Teach Clang to provide ::max_align_t in C11 and C++11 modes.Chandler Carruth2014-02-192-0/+14
| | | | | | | | | | | | | | | | | | | | | | | 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
* GC now unused variable.Joerg Sonnenberger2014-02-191-4/+0
| | | | llvm-svn: 201728
* Use a switch for the architecture specific logic inJoerg Sonnenberger2014-02-191-12/+16
| | | | | | netbsd::Assemble::ConstructJob. llvm-svn: 201725
* MS ABI: Let non-virtual method overloads participate in vftable orderingReid Kleckner2014-02-192-5/+30
| | | | | | | | | | | | | 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
* clang-cl: Pass /Z7 when we fallback to cl with debug info enabledReid Kleckner2014-02-192-1/+4
| | | | | | | Clang itself only emits CodeView line tables, so it seems more consistent to ask cl.exe for the same format. llvm-svn: 201721
* Refactor -KPIC handling for as invocation.Joerg Sonnenberger2014-02-191-53/+21
| | | | llvm-svn: 201719
OpenPOWER on IntegriCloud