aboutsummaryrefslogtreecommitdiff
path: root/clang
AgeCommit message (Collapse)AuthorFilesLines
2014-08-07Merging r215046:Bill Wendling20-115/+223
------------------------------------------------------------------------ r215046 | rsmith | 2014-08-06 17:24:21 -0700 (Wed, 06 Aug 2014) | 19 lines Use -Rblah, not -Wblah, to control remark diagnostics. This was always the intent when we added remark support, but was never implemented in the general case, because the first -R flags didn't need it. (-Rpass= had special handling to accomodate its argument.) -Rno-foo, -Reverything, and -Rno-everything can be used to turn off a remark, or to turn on or off all remarks. Per discussion on cfe-commits, -Weverything does not affect remarks, and -Reverything does not affect warnings or errors. The only "real" -R flag we have right now is -Rmodule-build; that flag is effectively renamed from -Wmodule-build to -Rmodule-build by this change. -Wpass and -Wno-pass (and their friends) are also renamed to -Rpass and -Rno-pass by this change; it's not completely clear whether we intended to have a -Rpass (with no =pattern), but that is unchanged by this commit, other than the flag name. The default pattern is effectively one which matches no passes. In future, we may want to make the default pattern be .*, so that -Reverything works for -Rpass properly. ------------------------------------------------------------------------ llvm-svn: 215057
2014-08-05Merging r214735:Bill Wendling2-13/+15
------------------------------------------------------------------------ r214735 | ogoffart | 2014-08-04 10:28:11 -0700 (Mon, 04 Aug 2014) | 1 line Fix crash when accessing a property of an invalid interface ------------------------------------------------------------------------ llvm-svn: 214840
2014-08-05Merging r214734:Bill Wendling2-1/+25
------------------------------------------------------------------------ r214734 | ogoffart | 2014-08-04 10:28:05 -0700 (Mon, 04 Aug 2014) | 7 lines Fix crash when assiging to a property with an invalid type This is a regression from clang 3.4 Set the result to ExprError and returns true, rather than simply returns false because errors have been reported already and returning false show a confusing error ------------------------------------------------------------------------ llvm-svn: 214839
2014-08-04Merging r214801:Bill Schmidt2-142/+4
------------------------------------------------------------------------ r214801 | wschmidt | 2014-08-04 18:21:26 -0500 (Mon, 04 Aug 2014) | 19 lines [PPC64LE] Fix wrong IR for vec_sld and vec_vsldoi My original LE implementation of the vsldoi instruction, with its altivec.h interfaces vec_sld and vec_vsldoi, produces incorrect shufflevector operations in the LLVM IR. Correct code is generated because the back end handles the incorrect shufflevector in a consistent manner. This patch and a companion patch for LLVM correct this problem by removing the fixup from altivec.h and the corresponding fixup from the PowerPC back end. Several test cases are also modified to reflect the now-correct LLVM IR. The vec_sums and vec_vsumsws interfaces in altivec.h are also fixed, because they used vec_perm calls intended to be recognized as vsldoi instructions. These vec_perm calls are now replaced with code that more clearly shows the intent of the transformation. ------------------------------------------------------------------------ llvm-svn: 214823
2014-08-04Merging r214777:Hans Wennborg1-49/+86
Excluding the /Zp option, because that was added after the 3.5 branch. ------------------------------------------------------------------------ r214777 | hans | 2014-08-04 14:07:58 -0700 (Mon, 04 Aug 2014) | 1 line UsersManual: update clang-cl options ------------------------------------------------------------------------ llvm-svn: 214778
2014-08-04Merging r214060:Bill Wendling1-1/+1
------------------------------------------------------------------------ r214060 | brad | 2014-07-27 18:57:32 -0700 (Sun, 27 Jul 2014) | 2 lines Add missing override keyword to OpenBSD IsIntegratedAssemblerDefault(). ------------------------------------------------------------------------ llvm-svn: 214765
2014-08-04Merging r213834:Bill Wendling2-3/+21
------------------------------------------------------------------------ r213834 | rsmith | 2014-07-23 19:27:39 -0700 (Wed, 23 Jul 2014) | 4 lines Take the canonical type when forming a canonical template argument with 'nullptr' value. Fixes profiling of such template arguments to always give the same value. ------------------------------------------------------------------------ llvm-svn: 214751
2014-08-04Merging r213913:Bill Wendling3-18/+19
------------------------------------------------------------------------ r213913 | rsmith | 2014-07-24 18:12:44 -0700 (Thu, 24 Jul 2014) | 4 lines PR20445: Properly transform the initializer in a CXXNewExpr rather than running it through the normal TreeTransform logic for Exprs (which will strip off implicit parts of the initialization and never re-create them). ------------------------------------------------------------------------ llvm-svn: 214750
2014-08-04Merging r213999:Bill Wendling2-0/+3
------------------------------------------------------------------------ r213999 | tstellar | 2014-07-25 18:05:20 -0700 (Fri, 25 Jul 2014) | 1 line R600: Add processor type for Mullins ------------------------------------------------------------------------ llvm-svn: 214748
2014-08-04Merging r214119:Bill Wendling4-158/+158
------------------------------------------------------------------------ r214119 | joerg | 2014-07-28 14:06:22 -0700 (Mon, 28 Jul 2014) | 7 lines Change __INTx_TYPE__ to be always signed. This changes the value for char-based types from "char" to "signed char". Adjust stdint.h to use __INTx_TYPE__ directly without prefixing it with signed and to use __UINTx_TYPE__ for unsigned ones. The value of __INTx_TYPE__ now matches GCC. ------------------------------------------------------------------------ llvm-svn: 214746
2014-08-04Merging r214222:Bill Wendling3-37/+21
------------------------------------------------------------------------ r214222 | rsmith | 2014-07-29 14:20:12 -0700 (Tue, 29 Jul 2014) | 4 lines PR20473: Don't "deduplicate" string literals with the same value but different lengths! In passing, simplify string literal deduplication by relying on LLVM to deduplicate the underlying constant values. ------------------------------------------------------------------------ llvm-svn: 214745
2014-08-04------------------------------------------------------------------------Bill Wendling8-15/+172
llvm-svn: 214744
2014-08-04Merging r214369:Bill Wendling1-1/+1
------------------------------------------------------------------------ r214369 | rsmith | 2014-07-30 17:22:56 -0700 (Wed, 30 Jul 2014) | 2 lines Rename this test so that it actually runs, and fix it so that it passes. ------------------------------------------------------------------------ llvm-svn: 214743
2014-08-04Merging r214050:Bill Wendling3-1/+54
------------------------------------------------------------------------ r214050 | rsmith | 2014-07-26 22:12:49 -0700 (Sat, 26 Jul 2014) | 7 lines When looking for temporary dtors while building the CFG, do not walk into lambda expressions (other than their capture initializers) nor blocks. Do walk into default argument expressions and default initializer expressions. These bugs were causing us to produce broken CFGs whenever a lambda expression was used to initialize a libstdc++ std::function object! ------------------------------------------------------------------------ llvm-svn: 214742
2014-08-04Merging r214471:Bill Wendling1-3/+7
------------------------------------------------------------------------ r214471 | rtrieu | 2014-07-31 18:42:01 -0700 (Thu, 31 Jul 2014) | 5 lines Remove this pointer that is converted to bool. In well-defined contexts, the this pointer is always non-null. If the this pointer is null, it is undefined and the compiler may optimize it away by assuming it is non-null. The null checks are pushed into the callers. ------------------------------------------------------------------------ llvm-svn: 214741
2014-08-04Merging r214008:Bill Wendling2-7/+43
------------------------------------------------------------------------ r214008 | rtrieu | 2014-07-25 19:10:52 -0700 (Fri, 25 Jul 2014) | 3 lines If a template argument is non-evaluable expression, use the profile ID to see if the two arguments are equal. ------------------------------------------------------------------------ llvm-svn: 214696
2014-08-04Merging r213912:Bill Wendling2-11/+20
------------------------------------------------------------------------ r213912 | rtrieu | 2014-07-24 17:24:02 -0700 (Thu, 24 Jul 2014) | 4 lines Pass the PrintingPolicy when converting types to strings in template type diffing. This removes extra "struct"/"class" in the type names and gives "bool" instead of "_Bool" for booleans. ------------------------------------------------------------------------ llvm-svn: 214695
2014-08-04Merging r213902:Bill Wendling2-1/+23
------------------------------------------------------------------------ r213902 | rtrieu | 2014-07-24 16:14:16 -0700 (Thu, 24 Jul 2014) | 3 lines Print "(default)" for default template template arguments to match the printing of other types. ------------------------------------------------------------------------ llvm-svn: 214694
2014-08-04Merging r213840:Bill Wendling2-31/+161
------------------------------------------------------------------------ r213840 | rtrieu | 2014-07-23 21:24:50 -0700 (Wed, 23 Jul 2014) | 2 lines Add support for nullptr template arguments to template type diffing. ------------------------------------------------------------------------ llvm-svn: 214693
2014-08-04Merging r213613:Bill Wendling2-5/+12
------------------------------------------------------------------------ r213613 | rtrieu | 2014-07-21 21:42:15 -0700 (Mon, 21 Jul 2014) | 2 lines Fix '&' printing for template arguments in parentheses in template diffing. ------------------------------------------------------------------------ llvm-svn: 214692
2014-08-04Merging r213611:Bill Wendling2-2/+7
------------------------------------------------------------------------ r213611 | rtrieu | 2014-07-21 21:06:54 -0700 (Mon, 21 Jul 2014) | 2 lines More gracefully handle parentheses in templare arguments in template diffing. ------------------------------------------------------------------------ llvm-svn: 214691
2014-08-04Merging r213609:Bill Wendling2-6/+42
------------------------------------------------------------------------ r213609 | rtrieu | 2014-07-21 20:33:01 -0700 (Mon, 21 Jul 2014) | 3 lines Fix a template diffing problem were an '&' is unexpectedly printed in a template argument. ------------------------------------------------------------------------ llvm-svn: 214690
2014-07-30Merging r213993,213998:Bob Wilson1-1/+1
llvm-svn: 214262
2014-07-29Merging r214208:Bob Wilson3-3/+13
llvm-svn: 214257
2014-07-28Merging r213714:Renato Golin1-1/+1
------------------------------------------------------------------------ r213714 | compnerd | 2014-07-23 02:32:32 +0100 (Wed, 23 Jul 2014) | 4 lines test: add an explicit target triple Now that we support WoA, this test fails on ARM build bots as __va_start has a different signature on different architectures. ------------------------------------------------------------------------ llvm-svn: 214110
2014-07-27Merging r213937:Simon Atanasyan216-415/+400
------------------------------------------------------------------------ r213937 | atanasyan | 2014-07-25 15:20:21 +0400 (Fri, 25 Jul 2014) | 3 lines [Driver][Mips] Remove "fp64" directories from the mips-mti-linux-gnu toolchain directories description. Released version of this toolchain has not separate libraries for -mfp64 command line option. ------------------------------------------------------------------------ llvm-svn: 214053
2014-07-23Merging r213733:Yi Kong1-0/+13
------------------------------------------------------------------------ r213733 | kongyi | 2014-07-23 10:25:02 +0100 (Wed, 23 Jul 2014) | 5 lines ARM: Add doc for ACLE memory barrier intrinsics Add documentations for ACLE memory barrier intrinsics, describing their motion barrier characteristics. ------------------------------------------------------------------------ llvm-svn: 213787
2014-07-23Merging r213741:Daniel Sanders2-3/+17
------------------------------------------------------------------------ r213741 | dsanders | 2014-07-23 13:06:13 +0100 (Wed, 23 Jul 2014) | 5 lines [mips] -mno-shared should only be given to the assembler when -fPIC/-fpic/-fPIE/-fpie is not in effect. This fixes compiler recursion on MIPS32r2. ------------------------------------------------------------------------ llvm-svn: 213742
2014-07-22Sema: correct handling for __va_start for WoASaleem Abdulrasool4-1/+131
Windows ARM indicates __va_start as a variadic function. However, the function itself is treated as having 4 formal arguments: - (out) pointer to the va_list - (in) address of the last named argument - (in) slot size for the type of the last argument - address of the last named argument The last argument does not seem to have any bearing on codegen, and thus is not explicitly type checked at this point. Unlike the previous handling for __va_start, it does not currently validate if the parameter is the last named parameter (it seems that MSVC currently accepts this). llvm-svn: 213595
2014-07-22Avoid crash if default argument parsed with errors.Serge Pavlov5-5/+12
If function parameters have default values, and that of the second parameter is parsed with errors, function declaration would have a parameter without default value that follows a parameter with that. Such declaration breaks logic of selecting overloaded function. As a solution, put opaque object as default value in such case. This patch fixes PR20055. Differential Revision: http://reviews.llvm.org/D4378 llvm-svn: 213594
2014-07-22-fms-extensions: Implement half of #pragma init_segReid Kleckner14-25/+232
Summary: This pragma is very rare. We could *hypothetically* lower some uses of it down to @llvm.global_ctors, but given that GlobalOpt isn't able to optimize prioritized global ctors today, there's really no point. If we wanted to do this in the future, I would check if the section used in the pragma started with ".CRT$XC" and had up to two characters after it. Those two characters could form the 16-bit initialization priority that we support in @llvm.global_ctors. We would have to teach LLVM to lower prioritized global ctors on COFF as well. This should let us compile some silly uses of this pragma in WebKit / Blink. Reviewers: rsmith, majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4549 llvm-svn: 213593
2014-07-21clang-cl: ignore /showIncludes when combined with /E (PR20336)Hans Wennborg2-2/+9
Both /showIncludes and /E write to stdout. Allowing both results in interleaved output and an error when double-closing the file descriptor, intended to catch issues like this. llvm-svn: 213589
2014-07-21Rename metadata llvm.loop.vectorize.unroll to llvm.loop.vectorize.interleave.Mark Heffernan4-6/+6
llvm-svn: 213587
2014-07-21clang-format vs plugin: set version number from cmake (PR20307)Hans Wennborg2-4/+11
Previously it was hard-coded to 1.0, which meant the installer would not install the plugin over previous versions. This commit makes us use LLVM's major.minor.patch version from cmake, or whatever CLANG_FORMAT_VS_VERSION is set to when configuring the build. It's pretty dirty to update a configuration file in the source directory from the cmake build like this. However, the plugin build is already dirty in this regard since it builds in the source dir when visual studio, and then copies out the resulting vsix. llvm-svn: 213584
2014-07-21Revert "Emit lifetime.start / lifetime.end markers for unnamed temporary ↵Arnaud A. de Grandmaison4-210/+24
objects." This commit did break the sanitizer-x86 bot. Revert it while investigating. llvm-svn: 213579
2014-07-21Fix build breakage caused by use of std::to_string(int). Replace with ↵Mark Heffernan1-14/+19
raw_string_ostream. llvm-svn: 213578
2014-07-21Emit lifetime.start / lifetime.end markers for unnamed temporary objects.Arnaud A. de Grandmaison4-24/+210
This will give more information to the optimizers so that they can reuse stack slots. llvm-svn: 213576
2014-07-21Add support for '#pragma unroll'.Mark Heffernan16-149/+566
llvm-svn: 213574
2014-07-21Sema: Handle C11 atomics when diagnosing out of range comparisonsJustin Bogner3-0/+30
This fixes a couple of asserts when analyzing comparisons involving C11 atomics that were uncovered by r205608 when we extended the applicability of -Wtautological-constant-out-of-range-compare. llvm-svn: 213573
2014-07-21[OPENMP] Initial parsing and sema analysis for 'flush' directive.Alexey Bataev28-11/+673
llvm-svn: 213512
2014-07-21[OPENMP] Parsing/Sema of the OpenMP directive 'critical'.Alexander Musman28-24/+779
llvm-svn: 213510
2014-07-21Trivial doc fixes: add missing whitespace, and s/overriden/overridden/g.James Dennett1-5/+6
llvm-svn: 213502
2014-07-21Add clang::DesignatedInitExpr::designators() for range-based access,James Dennett1-0/+11
with overloads for designators_range and designators_const_range. llvm-svn: 213500
2014-07-21Add missing initialization found due to a valgrind false positive.Richard Smith1-1/+1
This field is never inspected in the object state initialized by this constructor; however, initializing it seems reasonable, since it has a meaningful value. llvm-svn: 213499
2014-07-21[modules] Fix some of the confusion when computing the override set for a macroRichard Smith15-27/+79
introduced by finalization. This is still not entirely correct; more fixes to follow. llvm-svn: 213498
2014-07-21[OPENMP] Added several test cases for clauses 'ordered' and 'nowait': if ↵Alexey Bataev5-42/+82
there are more than one 'nowait' or 'ordered' clause an error message is expected. llvm-svn: 213496
2014-07-21[PowerPC] Optimize passing certain aggregates by valueUlrich Weigand4-13/+57
In addition to enabling ELFv2 homogeneous aggregate handling, LLVM support to pass array types directly also enables a performance enhancement. We can now pass (non-homogeneous) aggregates that fit fully in registers as direct integer arrays, using an element type to encode the alignment requirement (that would otherwise go to the "byval align" field). This is preferable since "byval" forces the back-end to write the aggregate out to the stack, even if it could be passed fully in registers. This is particularly annoying on ELFv2, if there is no parameter save area available, since we then need to allocate space on the callee's stack just to hold those aggregates. Note that to implement this optimization, this patch does not attempt to fully anticipate register allocation rules as (defined in the ABI and) implemented in the back-end. Instead, the patch is simply passing *any* aggregate passed by value using the array mechanism if its size is up to 64 bytes. This means that some of those will end up being passed in stack slots anyway, but the generated code shouldn't be any worse either. (*Large* aggregates remain passed using "byval" to enable optimized copying via memcpy etc.) llvm-svn: 213495
2014-07-21[PowerPC] Support the ELFv2 ABIUlrich Weigand2-9/+591
This patch implements clang support for the PowerPC ELFv2 ABI. Together with a series of companion patches in LLVM, this makes clang/LLVM fully usable on powerpc64le-linux. Most of the ELFv2 ABI changes are fully implemented on the LLVM side. On the clang side, we only need to implement some changes in how aggregate types are passed by value. Specifically, we need to: - pass (and return) "homogeneous" floating-point or vector aggregates in FPRs and VRs (this is similar to the ARM homogeneous aggregate ABI) - return aggregates of up to 16 bytes in one or two GPRs The second piece is trivial to implement in any case. To implement the first piece, this patch makes use of infrastructure recently enabled in the LLVM PowerPC back-end to support passing array types directly, where the array element type encodes properties needed to handle homogeneous aggregates correctly. Specifically, the array element type encodes: - whether the parameter should be passed in FPRs, VRs, or just GPRs/stack slots (for float / vector / integer element types, respectively) - what the alignment requirements of the parameter are when passed in GPRs/stack slots (8 for float / 16 for vector / the element type size for integer element types) -- this corresponds to the "byval align" field With this support in place, the clang part simply needs to *detect* whether an aggregate type implements a float / vector homogeneous aggregate as defined by the ELFv2 ABI, and if so, pass/return it as array type using the appropriate float / vector element type. llvm-svn: 213494
2014-07-19If a module build reports errors, don't try to load itBen Langmuir1-13/+21
... just to find out that it didn't build. llvm-svn: 213454
2014-07-19Revert D3908 due to issues on Mac platformsViktor Kutuzov3-218/+0
llvm-svn: 213450