summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Devise a package-private means to determine the LLVM version string"Alp Toker2014-06-062-4/+5
| | | | | | | | This didn't work out on the build servers. Investigating This reverts commit r210313. llvm-svn: 210314
* Devise a package-private means to determine the LLVM version stringAlp Toker2014-06-062-5/+4
| | | | | | | | | | This will unbreak clang vendor builds as a follow-up to r210238, now that we can't poke into LLVM's private config.h (nor should the string be exposed by llvm-config.h). This hopefully removes for good the last include of LLVM's config.h. llvm-svn: 210313
* PR11306 - Variadic template fix-it suggestion. Recover from misplaced or ↵Nikola Smiljanic2014-06-063-21/+47
| | | | | | redundant ellipsis in parameter pack. llvm-svn: 210304
* PR19936: Fix a really dumb bug where we would profile dependent operator* ↵Richard Smith2014-06-051-6/+6
| | | | | | expressions incorrectly. llvm-svn: 210296
* Remove old proposal noticesAlp Toker2014-06-051-3/+0
| | | | | | Let's just go ahead and assume the answer was 'I do' llvm-svn: 210295
* Provide fallback locations for backend remarksAlp Toker2014-06-051-8/+15
| | | | | | | | | | | | Instead of disembodied diagnostics when debug info is disabled it's now possible to identify the associated function's location in order to provide some amount of of context. We use the definition's body right brace location to differentiate the fallback from diagnostics that genuinely relate to the function declaration itself (a convention also used by gcc). llvm-svn: 210294
* Implement -Wframe-larger-than backend diagnosticAlp Toker2014-06-058-56/+94
| | | | | | | | | | | | | | | | | | Add driver and frontend support for the GCC -Wframe-larger-than=bytes warning. This is the first GCC-compatible backend diagnostic built around LLVM's reporting feature. This commit adds infrastructure to perform reverse lookup from mangled names emitted after LLVM IR generation. We use that to resolve precise locations and originating AST functions, lambdas or block declarations to produce seamless codegen-guided diagnostics. An associated change, StringMap now maintains unique mangled name strings instead of allocating copies. This is a net memory saving in C++ and a small hit for C where we no longer reuse IdentifierInfo storage, pending further optimisation. llvm-svn: 210293
* When an inline-asm diagnostic is reported by the backend, report it with theJoey Gouly2014-06-051-6/+17
| | | | | | | | correct severity. Previously all inline-asm diagnostics were reported as errors. llvm-svn: 210286
* Mangle predefined string constants names to merge them at link-timeAlexey Samsonov2014-06-051-30/+6
| | | | | | | | | | | | | | | | | | | | | Summary: This change generalizes the code used to create global LLVM variables referencing predefined strings (e.g. __FUNCTION__): now it just calls GetAddrOfConstantStringFromLiteral method. As a result, global variables for these predefined strings may get mangled names and linkonce_odr linkage. Fix the test accordingly. Test Plan: clang regression tests Reviewers: majnemer Reviewed By: majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4023 llvm-svn: 210284
* Cleanup, and always create a DecltypeType for a decltype expression, ratherRichard Smith2014-06-051-21/+16
| | | | | | | than omitting it the first time we see a decltype type with a particular expression. llvm-svn: 210283
* [PPC64LE] Implement little-endian semantics for vec_permBill Schmidt2014-06-051-21/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PowerPC vperm (vector permute) instruction is defined architecturally with a big-endian bias, in that the two input vectors are assumed to be concatenated "left to right" and the elements of the combined input vector are assumed to be numbered from "left to right" (i.e., with element 0 referencing the high-order element). This definition is unnatural for little-endian code generation. To facilitate ease of porting, the vec_perm interface is designed to use natural element ordering, so that elements are numbered according to little-endian design principles when code is generated for a little-endian target. The desired semantics can be achieved with the vperm instruction provided that the two input vector registers are reversed, and the permute control vector is complemented. The complementing is performed using an xor with a vector containing all one bits. Only the rightmost 5 bits of each element of the permute control vector are relevant, so it would be possible to complement the vector with respect to a <16xi8> vector containing all 31s. However, when the permute control vector is not a constant, using 255 instead has the advantage that the vec_xor can be recognized during code generation as a vnor instruction. (Power8 introduces a vnand instruction which could alternatively be generated.) The correctness of this code is tested by the new perm.c test added in a previous patch. I plan to later make the existing ppc32 Altivec compile-time tests work for ppc64 and ppc64le as well. llvm-svn: 210279
* Add hasLocalStorage/hasGlobalStorage matchers.Samuel Benzaquen2014-06-051-0/+2
| | | | | | | | | | | | | | Summary: Add hasLocalStorage/hasGlobalStorage matchers for VarDecl nodes. Update the doc. Also add them to the dynamic registry. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D4034 llvm-svn: 210278
* Add pointer types to global named registerRenato Golin2014-06-052-5/+29
| | | | | | | | | | This patch adds support for pointer types in global named registers variables. It'll be lowered as a pair of read/write_register and inttoptr/ptrtoint calls. Also adds some early checks on types on SemaDecl to avoid the assert. Tests changed accordingly. (PR19837) llvm-svn: 210274
* [mips] Add macros _MIPS_ISA and __mips_isa_rev (same expansion as defined by ↵Matheus Almeida2014-06-051-0/+15
| | | | | | | | | | | | | | GCC). Summary: The Linux Kernel is one example of a piece of software that relies on them. Reviewers: atanasyan Reviewed By: atanasyan Differential Revision: http://reviews.llvm.org/D3756 llvm-svn: 210270
* Fix driver warning about -pthread on Android.Evgeniy Stepanov2014-06-051-3/+3
| | | | | | -pthread is no-op on Android. Suppress the unused argument warning. llvm-svn: 210253
* Fix driver warning about -shared-libasan on Android.Evgeniy Stepanov2014-06-051-2/+2
| | | | | | | Asan runtime library is always shared on Android, and -shared-libasan is no-op. Suppress the unused argument warning. llvm-svn: 210252
* XCore target: Fix 'typestring' binding qualifier to the array and not the typeRobert Lytton2014-06-051-6/+12
| | | | | | Differential Revision: http://reviews.llvm.org/D3949 llvm-svn: 210250
* Changing this line of code back to the way it was before Alp's config.h ↵Puyan Lotfi2014-06-051-0/+1
| | | | | | | | | clean up changes. I've already spoken to Alp and he signed off on making this one change, so that our buildbots go green in the short term. llvm-svn: 210238
* Bugfix: don't assert if someone manages to declare an operator new/delete ↵Richard Smith2014-06-051-2/+3
| | | | | | template before the builtin operator new/delete. llvm-svn: 210230
* [ubsan] Don't add a --dynamic-list for ubsan symbols when building a sharedRichard Smith2014-06-041-2/+8
| | | | | | | | | library. That results in the linker resolving all references to weak symbols in the DSO to the definition from within that DSO. Ironically, this rarely causes observable problems, except that it causes ubsan's own dynamic type check to spuriously fail (because we fail to properly merge type_info object names). llvm-svn: 210220
* Formatting cleanup.Richard Smith2014-06-041-10/+9
| | | | llvm-svn: 210219
* Don't dynamically initialize dllimport vars (PR19933)Hans Wennborg2014-06-041-0/+6
| | | | | | | | They should be initialized when they're exported. Differential Revision: http://reviews.llvm.org/D4020 llvm-svn: 210217
* Remove the overload of GetAddrOfConstantString methodAlexey Samsonov2014-06-043-41/+11
| | | | llvm-svn: 210214
* Refactor and generalize GetAddrOfConstantString and ↵Alexey Samsonov2014-06-042-95/+87
| | | | | | | | | | | | | GetAddrOfConstantStringFromLiteral. Share mode code between these functions and re-structure them in a way which shows how similar they actually are. The latter function works well with literals of multi-byte chars and does a GlobalVariable name mangling (if global strings are non-writable). No functionality change. llvm-svn: 210212
* This cast is not necessary any more (llvm api change).Rafael Espindola2014-06-041-1/+1
| | | | llvm-svn: 210206
* Update for llvm api change.Rafael Espindola2014-06-043-4/+4
| | | | llvm-svn: 210204
* MS-ABI: Mangle empty template parameter packs correctlyDavid Majnemer2014-06-041-4/+9
| | | | | | Tested for compatibility with VS2013. llvm-svn: 210198
* MS-ABI: Implement user defined literalsDavid Majnemer2014-06-041-5/+2
| | | | | | | | | Straightforward implementation of UDLs, it's compatible with VS "14". This nearly completes our implementation of C++ name mangling for the MS-ABI. llvm-svn: 210197
* [OPENMP] Parsing/Sema for OMPLasprivateClause.Alexander Musman2014-06-049-6/+267
| | | | | | Parsing this clause, allowing it on directive ‘omp simd’ and semantic checks. llvm-svn: 210184
* clang-format: Leave empty lines within UnwrappedLines.Daniel Jasper2014-06-042-4/+4
| | | | | | | | These are commonly used to structure things like enums or long braced lists. There doesn't seem to be a good reason to have the behavior in such structures be different from the behavior between statements. llvm-svn: 210183
* [OPENMP] Small comment and reformatting fixes.Alexander Musman2014-06-042-79/+68
| | | | | | | | | Fix post-commit review comments by Carlo Bertolli for commit r209660 - OMP collapse clause. Re-formatted TransformOMP* functions in TreeTransform.h with clang-format. llvm-svn: 210169
* Remove the last remaining llvm/Config/config.h includesAlp Toker2014-06-046-12/+6
| | | | | | | | | | | | This corrects long-standing misuses of LLVM's internal config.h. In most cases the public llvm-config.h header was intended and we can now remove the old hacks thanks to LLVM r210144. The config.h header is private, won't be installed and should no longer be included by clang or other modules. llvm-svn: 210145
* Downgrade "definition of dllimport static field" error to warning for class ↵Hans Wennborg2014-06-041-2/+11
| | | | | | | | | | | | | | | | | | | templates (PR19902) This allows us to compile the following kind of code, which occurs in MSVC headers: template <typename> struct S { __declspec(dllimport) static int x; }; template <typename T> int S<T>::x; The definition works similarly to a dllimport inline function definition and gets available_externally linkage. Differential Revision: http://reviews.llvm.org/D3998 llvm-svn: 210141
* Add __builtin_operator_new and __builtin_operator_delete, which act like callsRichard Smith2014-06-034-2/+43
| | | | | | | to the normal non-placement ::operator new and ::operator delete, but allow optimizations like new-expressions and delete-expressions do. llvm-svn: 210137
* Fix leak from r210059Alp Toker2014-06-032-1/+7
| | | | | | | Also revert r210096 which temporarily disabled the test while this was being investigated. llvm-svn: 210115
* clang-format: Refactor indentation behavior for multiple nested blocks.Daniel Jasper2014-06-034-33/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a few oddities when formatting multiple nested JavaScript blocks, e.g.: Before: promise.then( function success() { doFoo(); doBar(); }, [], function error() { doFoo(); doBaz(); }); promise.then([], function success() { doFoo(); doBar(); }, function error() { doFoo(); doBaz(); }); After: promise.then( function success() { doFoo(); doBar(); }, [], function error() { doFoo(); doBaz(); }); promise.then([], function success() { doFoo(); doBar(); }, function error() { doFoo(); doBaz(); }); llvm-svn: 210097
* [OPENMP] Loop canonical form analysis (Sema)Alexander Musman2014-06-035-18/+515
| | | | | | | | | This patch implements semantic analysis to make sure that the loop is in OpenMP canonical form. This is the form required for 'omp simd', 'omp for' and other loop pragmas. Differential revision: http://reviews.llvm.org/D3778 llvm-svn: 210095
* Remove incorrect assertion.Richard Smith2014-06-031-4/+3
| | | | llvm-svn: 210092
* Implement DR990 and DR1070. Aggregate initialization initializes uninitializedRichard Smith2014-06-032-84/+121
| | | | | | | | | elements from {}, rather than value-initializing them. This permits calling an initializer-list constructor or constructing a std::initializer_list object. (It would also permit initializing a const reference or rvalue reference if that weren't explicitly prohibited by other rules.) llvm-svn: 210091
* Teach AST dumper to dump the array filler in an initializer list.Richard Smith2014-06-031-0/+17
| | | | llvm-svn: 210090
* PR11410: Extend diagnostic to cover all cases of aggregate initialization, notRichard Smith2014-06-031-5/+5
| | | | | | | | | | just the extremely specific case of a trailing array element that couldn't be initialized because the default constructor for the element type is deleted. Also reword the diagnostic to better match our other context diagnostics and to prepare for the implementation of core issue 1070. llvm-svn: 210083
* When emitting a multidimensional array new, emit the initializers for theRichard Smith2014-06-032-137/+173
| | | | | | | | | trailing elements as a single loop, rather than sometimes emitting a nest of several loops. This fixes a bug where CodeGen would sometimes try to emit an expression with the wrong type for the element being initialized. Plus various other minor cleanups to the IR produced for array new initialization. llvm-svn: 210079
* Don't assume an implicit IntrusiveRefCntPtr -> bool operator.Rafael Espindola2014-06-031-1/+1
| | | | llvm-svn: 210075
* Update for llvm API change.Rafael Espindola2014-06-032-40/+55
| | | | | | Aliases in llvm now hold an arbitrary expression. llvm-svn: 210063
* Fix -emit-codegen-only to not generate binariesAlp Toker2014-06-031-0/+1
| | | | llvm-svn: 210059
* Eliminate redundant MangleBuffer classAlp Toker2014-06-034-16/+13
| | | | | | | | | The only remaining user didn't actually use the non-dynamic storage facility this class provides. The std::string is transitional and likely to be StringRefized shortly. llvm-svn: 210058
* Itanium ABI: Update getAddrOfVTable to set the DLL storage class for vtablesHans Wennborg2014-06-021-0/+6
| | | | | | | | This corresponds to the same change for the MS ABI in r209908. Differential Revision: http://reviews.llvm.org/D3993 llvm-svn: 210054
* Delete apparently unused methodAlexey Samsonov2014-06-022-29/+0
| | | | llvm-svn: 210047
* [CodeGen] Don't use SizeTy for EmitNeonSplat.Michael J. Spencer2014-06-021-1/+1
| | | | llvm-svn: 210042
* Remove unused variableAlexey Samsonov2014-06-021-2/+0
| | | | llvm-svn: 210041
OpenPOWER on IntegriCloud