summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [mips] Removing __SIZEOF_INT128__ macro for MIPS64Simon Atanasyan2014-12-101-1/+6
| | | | | | | | | | | | | This is a temporary workaround while MIPS64 has not yet fully supported 128-bit integers. But declaration of int128 type is necessary even though `__SIZEOF_INT128__` is undefined because c++ standard header files like `limits` throw error message if `__int128` is not available. Patch by Sagar Thakur. Differential Revision: http://reviews.llvm.org/D6402 llvm-svn: 223927
* Reinstate r223753, reverted in r223759 due to breakage of clang-tools-extra.Richard Smith2014-12-103-26/+41
| | | | | | | | | | | | | | | | | Original commit message: [modules] Add experimental -fmodule-map-file-home-is-cwd flag to -cc1. For files named by -fmodule-map-file=, and files found by 'extern module' directives, this flag specifies that we should resolve filenames relative to the current working directory rather than relative to the directory in which the module map file resides. This is aimed at fixing path handling, in particular for relative -I paths, when building modules that represent components of the current project (rather than libraries installed on the current system, which the current project has as dependencies, where we'd typically expect the module map files to be looked up implicitly). llvm-svn: 223913
* Fixed the AST importer ot use redeclaration contexts properly.Sean Callanan2014-12-101-16/+16
| | | | | | | | | | | | | | To ensure that we don't import duplicates, the ASTImporter often checks the DeclContext for a Decl before importing it to see if a Decl with the same name is already present. This is problematic if the Decl is inside a transparent context like an extern "C" block. Lookup isn't allowed on such contexts, and in fact they assert() if you do that. So instead we look at the redeclaration context -- the containing context that can be used safely for these kinds of checks -- instead. llvm-svn: 223912
* DebugInfo: Correct location information for array accesses to elements of ↵David Blaikie2014-12-101-0/+3
| | | | | | variable array type. llvm-svn: 223902
* Made the ASTImporter resilient if it can't importSean Callanan2014-12-101-1/+6
| | | | | | | | | | | | | | SourceLocations. LLDB rarely has the same files mapped into the target AST context as the source AST context, so the ASTImporter shouldn't expect to see those files there. This started to become a problem when importing entities from modules -- these have proper source locations, in contrast to all the ASTs LLDB creates which have empty ones. llvm-svn: 223900
* DebugInfo: Fix another case of array access line informationDavid Blaikie2014-12-101-0/+3
| | | | llvm-svn: 223897
* DebugInfo: Correct the location of array accessesDavid Blaikie2014-12-101-0/+2
| | | | | | | Especially relevant to ASan when dealing with complex expressions containing multiple array accesses. See PR21737. llvm-svn: 223872
* Make sure that vec_perm is listed as a static function in altivec.h.Eric Christopher2014-12-101-18/+18
| | | | llvm-svn: 223871
* cmake: Make SVNVersion.inc step depend on GetSVN.cmake.Nico Weber2014-12-101-2/+4
| | | | | | | | This way, the step generating SVNVersion.inc gets rerun every time someone changes GetSVN.cmake (which is the file that decides how the contents of SVNVersion.inc look). This makes hacking on GetSVN.cmake a bit easier. llvm-svn: 223861
* Updated the AST importer to support importingSean Callanan2014-12-101-0/+30
| | | | | | | | | LinkageSpecDecls. This is relevant when LLDB wants to import Decls from non-C++ modules, since many declarations are in extern "C" blocks. llvm-svn: 223860
* Modified the Objective-C lexer and parser (only Sean Callanan2014-12-092-9/+18
| | | | | | | | | | | | | | | | in debugger mode) to accept @import declarations and pass them to the debugger. In the preprocessor, accept import declarations if the debugger is enabled, but don't actually load the module, just pass the import path on to the preprocessor callbacks. In the Objective-C parser, if it sees an import declaration in statement context (usual for LLDB), ignore it and return a NullStmt. llvm-svn: 223855
* DebugInfo: Correct location of aggregate assignmentDavid Blaikie2014-12-091-0/+2
| | | | llvm-svn: 223854
* AST: Don't assume two zero sized objects live at different addressesDavid Majnemer2014-12-091-0/+10
| | | | | | | | Zero sized objects may overlap with each other or any other object. This fixes PR21786. llvm-svn: 223852
* Objective-C SDK modernizer. Modernize to use Fariborz Jahanian2014-12-091-6/+12
| | | | | | | property-dot-syntax when receiver is 'super'. rdar://19140267 llvm-svn: 223846
* DebugInfo: Correct location of initialization of auto __complexDavid Blaikie2014-12-091-1/+1
| | | | llvm-svn: 223842
* DebugInfo: Correct the location of initializations of auto.David Blaikie2014-12-093-4/+6
| | | | llvm-svn: 223839
* DebugInfo: Correct location for compound complex assignmentDavid Blaikie2014-12-091-2/+1
| | | | llvm-svn: 223835
* DebugInfo: Accurate location information for complex assignmentDavid Blaikie2014-12-091-4/+4
| | | | llvm-svn: 223828
* DebugInfo: Emit the correct location for initialization of a complex variableDavid Blaikie2014-12-093-11/+19
| | | | | | Especially useful for sanitizer reports. llvm-svn: 223825
* Fix a GCC error from r223803Duncan P. N. Exon Smith2014-12-091-3/+5
| | | | llvm-svn: 223814
* IR: Update clang for Metadata/Value split in r223802Duncan P. N. Exon Smith2014-12-0914-274/+266
| | | | | | Match LLVM API changes from r223802. llvm-svn: 223803
* Re-work the Clang system for classifying Intel x86 CPUs to use theirChandler Carruth2014-12-091-38/+71
| | | | | | | | | | | | | | | | | | | | | | | | basic microarchitecture names, and add support (with tests) for parsing all of the masic microarchitecture names for CPUs documented to be accepted by GCC with -march. I didn't go back through the 32-bit-only old microarchitectures, but this at least brings the recent architecture names up to speed. This is essentially the follow-up to the LLVM commit r223769 which did similar cleanups for the LLVM CPUs. One particular benefit is that you can now use -march=westmere in Clang and get the LLVM westmere processor which is a different ISA variant (!) and so quite significant. Much like with r223769, I would appreciate the Intel folks carefully thinking about the macros defined, names used, etc for the atom chips and newest primary x86 chips. The current patterns seem quite strange to me, especially here in Clang. Note that I haven't replicated the per-microarchitecture macro defines provided by GCC. I'm really opposed to source code using these rather than using ISA feature macros. llvm-svn: 223776
* Revert "[modules] Add experimental -fmodule-map-file-home-is-cwd flag to -cc1."Duncan P. N. Exon Smith2014-12-093-41/+26
| | | | | | | | | | | | | This reverts commit r223753. It broke the Green Dragon build for a few hours: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/2259/ http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/2259/consoleFull#43901905849ba4694-19c4-4d7e-bec5-911270d8a58c I suspect `clang-tools-extra` just needs a follow-up for an API change, but I'm not the right one to look into it. llvm-svn: 223759
* [modules] Add experimental -fmodule-map-file-home-is-cwd flag to -cc1.Richard Smith2014-12-093-26/+41
| | | | | | | | | | | | | For files named by -fmodule-map-file=, and files found by 'extern module' directives, this flag specifies that we should resolve filenames relative to the current working directory rather than relative to the directory in which the module map file resides. This is aimed at fixing path handling, in particular for relative -I paths, when building modules that represent components of the current project (rather than libraries installed on the current system, which the current project has as dependencies, where we'd typically expect the module map files to be looked up implicitly). llvm-svn: 223753
* DebugInfo: Correctly identify the location of C++ member initializer list ↵David Blaikie2014-12-094-23/+31
| | | | | | | | | | | | | elements This particularly helps the fidelity of ASan reports (which can occur even in these examples - if, for example, one uses placement new over a buffer of insufficient size - now ASan will correctly identify which member's initialization went over the end of the buffer). This doesn't cover all types of members - more coming. llvm-svn: 223726
* [modules] If the same .pcm file is imported via two different paths, don'tRichard Smith2014-12-091-1/+3
| | | | | | complain that the contained modules are defined twice. llvm-svn: 223724
* Revert "Driver: Objective-C should respect -fno-exceptions"David Majnemer2014-12-091-14/+25
| | | | | | | | This reverts commit r223455. It's been succesfully argued that -fexceptions (at the driver level) is a misnomer and has little to do with -fobjc-exceptions. llvm-svn: 223723
* Handle possible TypoExprs in member initializers.Kaelyn Takata2014-12-081-0/+5
| | | | | | | Includes a new test case since none of the existing tests were hitting this code path. llvm-svn: 223705
* DebugInfo: Ensure the store for an assignment is attributed to the beginning ↵David Blaikie2014-12-081-0/+2
| | | | | | of the assignment expression llvm-svn: 223699
* clang-format: Indent correctly in conditional expressions after return.Daniel Jasper2014-12-081-1/+2
| | | | | | | | | | | | | | | | | | | This only applies when not aligning after the return itself (which is commonly done for C++. Before: return aaaaaaaaaa ? bbbbbbbbbb( bbbbbb) // This is indented relative to aaaaaaaaaa. : b; After: return aaaaaaaaaa ? bbbbbbbbbb( bbbbbb) : b; llvm-svn: 223694
* clang-format: [Java] Always break after annotations of multiline decls.Daniel Jasper2014-12-082-5/+6
| | | | | | | | | | | | | Before: @Mock DataLoader loooooooooooooooooooooooader = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; After: @Mock DataLoader loooooooooooooooooooooooader = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; llvm-svn: 223688
* InstrProf: Use LLVM's -instrprof pass for profilingJustin Bogner2014-12-088-274/+54
| | | | | | | | The logic for lowering profiling counters has been moved to an LLVM pass. Emit the intrinsics rather than duplicating the whole pass in clang. llvm-svn: 223683
* clang-format: Support commas in lambda return types.Daniel Jasper2014-12-081-0/+1
| | | | | | | | | | Before: auto next_pair = [](A * a) -> pair<A*, A*>{}; After: auto next_pair = [](A* a) -> pair<A*, A*>{}; llvm-svn: 223652
* [libclang] Use same USR encoding for 'char' regardless of what the target ↵Argyrios Kyrtzidis2014-12-081-1/+1
| | | | | | | | considers the sign to be. Should fix the clang-hexagon-elf bot. llvm-svn: 223642
* [libclang] Encode InjectedClassNameType in the USR.Argyrios Kyrtzidis2014-12-081-0/+4
| | | | llvm-svn: 223634
* [libclang] Encode location info for anonymous embedded tag decls.Argyrios Kyrtzidis2014-12-081-1/+5
| | | | | | Otherwise the USR will conflict with different embedded tag decls. llvm-svn: 223633
* [libclang] Use same USR encoding for 'class' as 'struct'.Argyrios Kyrtzidis2014-12-081-3/+3
| | | | | | | | 'class' and 'struct' can be used interchangebly for forward references. Use the same encoding otherwise we may get into a weird situation where the USR for the same declaration is different based on whether the definition of the tag reference is visible or not. llvm-svn: 223632
* [libclang] Encode C++11 rvalue reference types in the USR.Argyrios Kyrtzidis2014-12-081-0/+5
| | | | llvm-svn: 223631
* [libclang] Encode the C++11 method reference qualifier in the USR.Argyrios Kyrtzidis2014-12-081-0/+5
| | | | llvm-svn: 223630
* [libclang] Reflect in USR generation that 'signed char' and 'unsigned char' ↵Argyrios Kyrtzidis2014-12-081-1/+2
| | | | | | can overload a 'char' in C++, by giving them distinct encodings. llvm-svn: 223629
* [libclang] Function templates can be 'overloaded' by return type, so encode ↵Argyrios Kyrtzidis2014-12-081-0/+23
| | | | | | | | the return type in the USR and handle DependentNameType in order to be able to distinguish them. llvm-svn: 223628
* clang-format: Don't merge lines with comments.Daniel Jasper2014-12-071-0/+3
| | | | | | | | | | | | | | Before: int f() { // comment return 42; } After: int f() { // comment return 42; } This fixes llvm.org/PR21769. llvm-svn: 223609
* Rename a couple of preprocessor symbols to be more descriptive. NFC.Paul Robinson2014-12-063-11/+11
| | | | | | Review feedback from recent changes to GetSVN.cmake. llvm-svn: 223578
* [modules] If we import a module, and we've seen a module map that describes theRichard Smith2014-12-061-2/+24
| | | | | | | | | module, use the path from the module map file in preference to the path from the .pcm file when resolving relative paths in the .pcm file. This allows diagnostics (and .d output) to give relative paths if the module was found via a relative path. llvm-svn: 223577
* No memcpy for copy ctor with -fsanitize-address-field-padding=1Kostya Serebryany2014-12-061-2/+3
| | | | | | | | | | | | | | | | | | | Summary: When -fsanitize-address-field-padding=1 is present don't emit memcpy for copy constructor. Thanks Nico for the extra test case. Test Plan: regression tests Reviewers: thakis, rsmith Reviewed By: rsmith Subscribers: rsmith, cfe-commits Differential Revision: http://reviews.llvm.org/D6515 llvm-svn: 223563
* PR21217: Slightly more eagerly load -fmodule-map-file= files and provideRichard Smith2014-12-063-15/+9
| | | | | | diagnostics if they don't exist. Based on a patch by John Thompson! llvm-svn: 223561
* Additional safety for the root cause of regression in r223443; make the moduleRichard Smith2014-12-061-0/+1
| | | | | | map path more canonical before hashing it. No functionality change. llvm-svn: 223547
* [modules] Instead of storing absolute paths in a .pcm file, store the path toRichard Smith2014-12-053-142/+187
| | | | | | | | | | | | | | | the root of the module and use paths relative to that directory wherever possible. This is a step towards allowing explicit modules to be relocated without being rebuilt, which is important for some kinds of distributed builds, for good paths in diagnostics, and for appropriate .d output. This is a recommit of r223443, reverted in r223465; when joining together imported file paths, we now use the system's separator rather than always using '/'. This avoids path mismatches between the original module build and the module user on Windows (at least, in some cases). A more comprehensive fix will follow. llvm-svn: 223539
* ASTDumper: print whether a function is constexprHans Wennborg2014-12-051-0/+4
| | | | llvm-svn: 223538
* Specify the name of the generated header only once. NFC.Paul Robinson2014-12-051-4/+7
| | | | | | This will also simplify a private patch that we have. llvm-svn: 223537
OpenPOWER on IntegriCloud