- Jul 13, 2015
-
-
Mark Heffernan authored
This change updates the documentation for the loop unrolling pragma behavior change in r242047. Specifically, with that change "#pragma unroll" will not unroll loops with a runtime trip count. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242048 91177308-0d34-0410-b5e6-96231b3b80d8
-
Birunthan Mohanathas authored
Differential Revision: http://reviews.llvm.org/D11125 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242039 91177308-0d34-0410-b5e6-96231b3b80d8
-
Ulrich Weigand authored
Attribute names usually support an alternate spelling that uses double underscores before and after the attribute name, like e.g. attribute ((__aligned__)) for attribute ((aligned)). This is necessary to allow use of attributes in system headers without polluting the name space. However, for attribute ((enable_if)) that alternate spelling does not work correctly. This is because of code in Parser::ParseGNUAttributeArgs (ParseDecl.cpp) that specifically checks for the "enable_if" spelling without allowing the alternate spelling. Similar code in ParseDecl.cpp uses the normalizeAttrName helper to allow both spellings. This patch adds use of that helper for the "enable_if" check as well, which fixes attribute ((__enable_if__)). Differential Revision: http://reviews.llvm.org/D11142 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242029 91177308-0d34-0410-b5e6-96231b3b80d8
-
Ulrich Weigand authored
As noticed by David Majnemer, update an out-of-date comment in CGClass.cpp after the r241916 commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242021 91177308-0d34-0410-b5e6-96231b3b80d8
-
Rafael Espindola authored
Otherwise the visibility setting code would not know that a given function was available_externally. Fixes PR24097. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242012 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
The program is permitted to have stuff like '#define x' in it so avoid using identifiers not reserved for the implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242010 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
Three things: - The atomic intrinsics mandate memory barriers, let's start emitting some. - We don't need to manually create RMW operations, we can just do __atomic_fetch_foo instead of performing __atomic_foo_fetch and undoing foo. - Don't use inline assembly, we don't need it for these intrinsics. This fixes PR24101. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242009 91177308-0d34-0410-b5e6-96231b3b80d8
-
NAKAMURA Takumi authored
Fix clang/unittests/ASTMatchers/Dynamic/Makefile. clangDynamicASTMatchers should be linked in advance of clangAST and clangASTMatchers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242005 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242001 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
before the first imported declaration. We don't need to track all formerly-canonical declarations of an entity; it's sufficient to track those ones for which no other formerly-canonical declaration was imported into the same module. We call those ones "key declarations", and use them as our starting points for collecting redeclarations and performing namespace lookups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241999 91177308-0d34-0410-b5e6-96231b3b80d8
-
Davide Italiano authored
In the test, y1 is not reference compatible to y2 and we currently assume the cast is ill-formed so we emit a diagnostic. Instead, in order to honour the standard, if y1 it's not reference-compatible to y2 then it can't be converted using a static_cast, and a reinterpret_cast should be tried instead. Richard Smith provided the correct interpretation of the standard and explanation about the subtle difference between "can't be cast" and "the cast is ill-formed". The former applies in this case. PR: 23802 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241998 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 12, 2015
-
-
NAKAMURA Takumi authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241992 91177308-0d34-0410-b5e6-96231b3b80d8
-
NAKAMURA Takumi authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241991 91177308-0d34-0410-b5e6-96231b3b80d8
-
Birunthan Mohanathas authored
Differential Revision: http://reviews.llvm.org/D10883 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241986 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 11, 2015
-
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241976 91177308-0d34-0410-b5e6-96231b3b80d8
-
Justin Bogner authored
It's possible for TagRedeclarations to involve decls without a name, ie, anonymous enums. We hit some undefined behaviour if we bind these null names to the reference here. We never dereference the name, so it's harmless if it's null - make it a pointer to allow that. Fixes the Modules/submodules-merge-defs.cpp test under ubsan. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241963 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
visible in the module we're considering entering. Previously we assumed that if we knew the include guard for a modular header, we'd already parsed it, but that need not be the case if a header is present in the current module and one of its dependencies; the result of getting this wrong was that the current module's submodule for the header would end up empty. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241953 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
We don't need any more bug reports from users telling us that MSVC-style C++ exceptions are broken. Developers and adventurous users can still test the existing functionality by passing along -fexceptions to either clang or clang-cl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241952 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 10, 2015
-
-
Jordan Rose authored
BlockDecl has a poor AST representation because it doesn't carry its type with it. Instead, the containing BlockExpr has the full type. This almost never matters for the analyzer, but if the block decl contains static local variables we need to synthesize a region to put them in, and this region will necessarily not have the right type. Even /that/ doesn't matter, unless (1) the block calls the function or method containing the block, and (2) the value of the block expr is used in some interesting way. In this case, we actually end up needing the type of the block region, and it will be set to our synthesized type. It turns out we've been doing a terrible job faking that type -- it wasn't a block pointer type at all. This commit fixes that to at least guarantee a block pointer type, using the signature written by the user if there is one. This is not really a correct answer because the block region's type will /still/ be wrong, but further efforts to make this right in the analyzer would probably be silly. We should just change the AST. rdar://problem/21698099 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241944 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
We should only consider declarations which were written, implicit declarations shouldn't be considered. This fixes PR24084. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241941 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
[modules] Fix "prefer own module over others" rule when selecting a module for a header to work in the presence of module hierarchy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241936 91177308-0d34-0410-b5e6-96231b3b80d8
-
Evgeniy Stepanov authored
This flag will enable detection of use-after-destructor (but before memory deallocation) bugs. No actual functionality yet. https://code.google.com/p/address-sanitizer/issues/detail?id=73 Patch by Naomi Musgrave. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241935 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Belevich authored
Differential Revision: http://reviews.llvm.org/D11105 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241934 91177308-0d34-0410-b5e6-96231b3b80d8
-
Akira Hatanaka authored
Previously, clang/llvm treated inline-asm instructions conservatively, choosing not to eliminate the instructions or hoisting them out of a loop even when it was safe to do so. This commit makes changes to attach a readonly or readnone attribute to an inline-asm instruction, which enables passes such as LICM and EarlyCSE to move or optimize away the instruction. rdar://problem/11358192 Differential Revision: http://reviews.llvm.org/D10546 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241930 91177308-0d34-0410-b5e6-96231b3b80d8
-
Yaron Keren authored
The winpthreads library in mingw-w64 passes -no-pthread when building since pthreads is not available to build itself and pthreads it is linked by default. clang does not link to pthreads by default but did error on unknown -no-pthread option thus stopping the winpthreads build. http://reviews.llvm.org/D11087 Patch by Martell Malone. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241929 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
All of the ABIs we support are altivec style anyhow and so the option doesn't make much sense with the modern ABIs. We could make this a more noisy ignore, but it would break builds for projects that just pass it along by default because of historical reasons. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241925 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Christopher authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241924 91177308-0d34-0410-b5e6-96231b3b80d8
-
Diego Novillo authored
The function is massively large and GCC is emitting stack overflow errors when building it (stack, as counted by the compiler, grows to more than 16Kb). The new flag processing logic added in r241825 took it over the limit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241918 91177308-0d34-0410-b5e6-96231b3b80d8
-
Ulrich Weigand authored
tools/clang/test/CodeGen/packed-nest-unpacked.c contains this test: struct XBitfield { unsigned b1 : 10; unsigned b2 : 12; unsigned b3 : 10; }; struct YBitfield { char x; struct XBitfield y; } __attribute((packed)); struct YBitfield gbitfield; unsigned test7() { // CHECK: @test7 // CHECK: load i32, i32* getelementptr inbounds (%struct.YBitfield, %struct.YBitfield* @gbitfield, i32 0, i32 1, i32 0), align 4 return gbitfield.y.b2; } The "align 4" is actually wrong. Accessing all of "gbitfield.y" as a single i32 is of course possible, but that still doesn't make it 4-byte aligned as it remains packed at offset 1 in the surrounding gbitfield object. This alignment was changed by commit r169489, which also introduced changes to bitfield access code in CGExpr.cpp. Code before that change used to take into account *both* the alignment of the field to be accessed within the current struct, *and* the alignment of that outer struct itself; this logic was removed by the above commit. Neglecting to consider both values can cause incorrect code to be generated (I've seen an unaligned access crash on SystemZ due to this bug). In order to always use the best known alignment value, this patch removes the CGBitFieldInfo::StorageAlignment member and replaces it with a StorageOffset member specifying the offset from the start of the surrounding struct to the bitfield's underlying storage. This offset can then be combined with the best-known alignment for a bitfield access lvalue to determine the alignment to use when accessing the bitfield's storage. Differential Revision: http://reviews.llvm.org/D11034 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241916 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adrian Prantl authored
PR24067. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241915 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nemanja Ivanovic authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241912 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Before: class Test { aaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaa: aaaaaaaaaaaaaaaaaaaaaaaa): aaaaaaaaaaaaaaaaaaaaaa {} } After: class Test { aaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaa: aaaaaaaaaaaaaaaaaaaaaaaa): aaaaaaaaaaaaaaaaaaaaaa {} } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241908 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nemanja Ivanovic authored
This patch corresponds to review: http://reviews.llvm.org/D10972 Fix for the handling of dependent features that are enabled by default on some CPU's (such as -mvsx, -mpower8-vector). Also provides a number of new interfaces or fixes existing ones in altivec.h. Changed signatures to conform to ABI: vector short vec_perm(vector signed short, vector signed short, vector unsigned char) vector int vec_perm(vector signed int, vector signed int, vector unsigned char) vector long long vec_perm(vector signed long long, vector signed long long, vector unsigned char) vector signed char vec_sld(vector signed char, vector signed char, const int) vector unsigned char vec_sld(vector unsigned char, vector unsigned char, const int) vector bool char vec_sld(vector bool char, vector bool char, const int) vector unsigned short vec_sld(vector unsigned short, vector unsigned short, const int) vector signed short vec_sld(vector signed short, vector signed short, const int) vector signed int vec_sld(vector signed int, vector signed int, const int) vector unsigned int vec_sld(vector unsigned int, vector unsigned int, const int) vector float vec_sld(vector float, vector float, const int) vector signed char vec_splat(vector signed char, const int) vector unsigned char vec_splat(vector unsigned char, const int) vector bool char vec_splat(vector bool char, const int) vector signed short vec_splat(vector signed short, const int) vector unsigned short vec_splat(vector unsigned short, const int) vector bool short vec_splat(vector bool short, const int) vector pixel vec_splat(vector pixel, const int) vector signed int vec_splat(vector signed int, const int) vector unsigned int vec_splat(vector unsigned int, const int) vector bool int vec_splat(vector bool int, const int) vector float vec_splat(vector float, const int) Added a VSX path to: vector float vec_round(vector float) Added interfaces: vector signed char vec_eqv(vector signed char, vector signed char) vector signed char vec_eqv(vector bool char, vector signed char) vector signed char vec_eqv(vector signed char, vector bool char) vector unsigned char vec_eqv(vector unsigned char, vector unsigned char) vector unsigned char vec_eqv(vector bool char, vector unsigned char) vector unsigned char vec_eqv(vector unsigned char, vector bool char) vector signed short vec_eqv(vector signed short, vector signed short) vector signed short vec_eqv(vector bool short, vector signed short) vector signed short vec_eqv(vector signed short, vector bool short) vector unsigned short vec_eqv(vector unsigned short, vector unsigned short) vector unsigned short vec_eqv(vector bool short, vector unsigned short) vector unsigned short vec_eqv(vector unsigned short, vector bool short) vector signed int vec_eqv(vector signed int, vector signed int) vector signed int vec_eqv(vector bool int, vector signed int) vector signed int vec_eqv(vector signed int, vector bool int) vector unsigned int vec_eqv(vector unsigned int, vector unsigned int) vector unsigned int vec_eqv(vector bool int, vector unsigned int) vector unsigned int vec_eqv(vector unsigned int, vector bool int) vector signed long long vec_eqv(vector signed long long, vector signed long long) vector signed long long vec_eqv(vector bool long long, vector signed long long) vector signed long long vec_eqv(vector signed long long, vector bool long long) vector unsigned long long vec_eqv(vector unsigned long long, vector unsigned long long) vector unsigned long long vec_eqv(vector bool long long, vector unsigned long long) vector unsigned long long vec_eqv(vector unsigned long long, vector bool long long) vector float vec_eqv(vector float, vector float) vector float vec_eqv(vector bool int, vector float) vector float vec_eqv(vector float, vector bool int) vector double vec_eqv(vector double, vector double) vector double vec_eqv(vector bool long long, vector double) vector double vec_eqv(vector double, vector bool long long) vector bool long long vec_perm(vector bool long long, vector bool long long, vector unsigned char) vector double vec_round(vector double) vector double vec_splat(vector double, const int) vector bool long long vec_splat(vector bool long long, const int) vector signed long long vec_splat(vector signed long long, const int) vector unsigned long long vec_splat(vector unsigned long long, vector bool int vec_sld(vector bool int, vector bool int, const int) vector bool short vec_sld(vector bool short, vector bool short, const int) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241904 91177308-0d34-0410-b5e6-96231b3b80d8
-
NAKAMURA Takumi authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241903 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241902 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
Delayed template parsing interferes with code completion, just distable it for this test. This reverts r241811. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241899 91177308-0d34-0410-b5e6-96231b3b80d8
-
Ulrich Weigand authored
Code in CGCall.cpp that loads up function arguments that need to be coerced to a different type may in some cases ignore the fact that the source of the argument is not naturally aligned. This may cause incorrect code to be generated. In some places in CreateCoercedLoad, we already have setAlignment calls to address this, but I ran into one where it was missing, causing wrong code generation on SystemZ. However, in that location, we do not actually know what alignment of the source location we can rely on; the callers do not pass anything to this routine. This is already an issue in other places in CreateCoercedLoad; and the same problem exists for CreateCoercedStore. To avoid pessimising code, and to fix the FIXMEs already in place, this patch also adds an alignment argument to the CreateCoerced* routines and uses it instead of forcing an alignment of 1. The callers are changed to pass in the best information they have. This actually requires changes in a number of existing test cases since we now get better alignment in many places. Differential Revision: http://reviews.llvm.org/D11033 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241898 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
In certain builds (msan), this can otherwise exceed the stack frame limit set for certain environments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241894 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
cannot assume that the current working directory is writable in all test environments. I don't know a better way to write this test of hand, lets discuss. Possibly, a better option would be to put these together with other test testing the driver directly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241885 91177308-0d34-0410-b5e6-96231b3b80d8
-
NAKAMURA Takumi authored
Revert test lines added in r241811, "[CodeCompletion] Don't crash on member inits of templated constructors.", for now. It doesn't pass for targeting MS mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241882 91177308-0d34-0410-b5e6-96231b3b80d8
-