- May 23, 2016
-
-
David Majnemer authored
MSVC now supports the __is_assignable type trait intrinsic, to enable easier and more efficient implementation of the Standard Library's is_assignable trait. As of Visual Studio 2015 Update 3, the VC Standard Library implementation uses the new intrinsic unconditionally. The implementation is pretty straightforward due to the previously existing is_nothrow_assignable and is_trivially_assignable. We handle __is_assignable via the same code as the other two except that we skip the extra checks for nothrow or triviality. Patch by Dave Bartolomeo! Differential Revision: http://reviews.llvm.org/D20492 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270458 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
The layout_version attribute is pretty straightforward: use the layout rules from version XYZ of MSVC when used like struct __declspec(layout_version(XYZ)) S {}; The empty_bases attribute is more interesting. It tries to get the C++ empty base optimization to fire more often by tweaking the MSVC ABI rules in subtle ways: 1. Disable the leading and trailing zero-sized object flags if a class is marked __declspec(empty_bases) and is empty. This means that given: struct __declspec(empty_bases) A {}; struct __declspec(empty_bases) B {}; struct C : A, B {}; 'C' will have size 1 and nvsize 0 despite not being annotated __declspec(empty_bases). 2. When laying out virtual or non-virtual bases, disable the injection of padding between classes if the most derived class is marked __declspec(empty_bases). This means that given: struct A {}; struct B {}; struct __declspec(empty_bases) C : A, B {}; 'C' will have size 1 and nvsize 0. 3. When calculating the offset of a non-virtual base, choose offset zero if the most derived class is marked __declspec(empty_bases) and the base is empty _and_ has an nvsize of 0. Because of the ABI rules, this does not mean that empty bases reliably get placed at offset 0! For example: struct A {}; struct B {}; struct __declspec(empty_bases) C : A, B { virtual ~C(); }; 'C' will be pointer sized to account for the vfptr at offset 0. 'A' and 'B' will _not_ be at offset 0 despite being empty! Instead, they will be located right after the vfptr. This occurs due to the interaction betweeen non-virtual base layout and virtual function pointer injection: injection occurs after the nv-bases and shifts them down by the size of a pointer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270457 91177308-0d34-0410-b5e6-96231b3b80d8
-
Michael Zuckerman authored
[clang][AVX512][Builtin] adding missing intrinsics for vpmultishiftqb{128|256|512} instruction set . Differential Revision: http://reviews.llvm.org/D20521 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270441 91177308-0d34-0410-b5e6-96231b3b80d8
-
Jacob Baungard Hansen authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270435 91177308-0d34-0410-b5e6-96231b3b80d8
-
Michael Zuckerman authored
Differential Revision: http://reviews.llvm.org/D20514 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270401 91177308-0d34-0410-b5e6-96231b3b80d8
-
Saleem Abdulrasool authored
Exherbo has an alternative file system layout to accommodate multiarch. The loader is located at /usr/${triple}/lib/${loader}. Adjust the Linux toolchain to support that on exherbo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270392 91177308-0d34-0410-b5e6-96231b3b80d8
-
Bob Wilson authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270391 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Atanasyan authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270380 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 22, 2016
-
-
Simon Atanasyan authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270374 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Atanasyan authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270373 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Atanasyan authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270368 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Atanasyan authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270367 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Atanasyan authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270366 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
We were missing references to the standard, some of our home-grown verbiage didn't make any sense. No functional change is intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270353 91177308-0d34-0410-b5e6-96231b3b80d8
-
Saleem Abdulrasool authored
The parameter already requires the toolchain, sink the method into the class. This also enables the use of the distro detection logic which will be needed to support Exherbo's multiarch approach. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270352 91177308-0d34-0410-b5e6-96231b3b80d8
-
Saleem Abdulrasool authored
Convert the cascading if/else to a switch. This makes it easier to follow the logic. Minor difference is that we no longer default to x86_64 but rather to the architecture specified by the architecture. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270351 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 21, 2016
-
-
Simon Pilgrim authored
Ensure _mm256_extract_epi8 and _mm256_extract_epi16 zero extend their i8/i16 result to i32. This matches _mm_extract_epi8 and _mm_extract_epi16. Fix for PR27594 Differential Revision: http://reviews.llvm.org/D20468 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270330 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 20, 2016
-
-
Justin Lebar authored
Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20457 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270279 91177308-0d34-0410-b5e6-96231b3b80d8
-
Yaxun Liu authored
OpenCL builtin functions to_{global|local|private} accepts argument of pointer type to arbitrary pointee type, and return a pointer to the same pointee type in different addr space, i.e. global gentype *to_global(gentype *p); It is not desirable to declare it as global void *to_global(void *); in opencl header file since it misses diagnostics. This patch implements these builtin functions as Clang builtin functions. In the builtin def file they are defined to have signature void*(void*). When handling call expressions, their declarations are re-written to have correct parameter type and return type corresponding to the call argument. In codegen call to addr void *to_addr(void*) is generated with addrcasts or bitcasts to facilitate implementation in builtin library. Differential Revision: http://reviews.llvm.org/D19932 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270261 91177308-0d34-0410-b5e6-96231b3b80d8
-
Manman Ren authored
There is no need to apply kindof on an unqualified id type. rdar://24753825 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270241 91177308-0d34-0410-b5e6-96231b3b80d8
-
Dimitry Andric authored
The `FreeBSDTargetInfo` class has always set the `__FreeBSD_cc_version` predefined macro to a rather static value, calculated from the major OS version. In the FreeBSD base system, we will start incrementing the value of this macro whenever we make any signifant change to clang, so we need a way to configure the macro's value at build time. Use `FREEBSD_CC_VERSION` for this, which we can define in the FreeBSD build system using either the `-D` command line option, or an include file. Stock builds will keep the earlier value. Differential Revision: http://reviews.llvm.org/D20037 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270240 91177308-0d34-0410-b5e6-96231b3b80d8
-
Yaxun Liu authored
Patch by Aaron Enye Shi. Differential Revision: http://reviews.llvm.org/D17578 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270238 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Pilgrim authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270227 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adrian McCarthy authored
Differential Revision: http://reviews.llvm.org/D20454 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270226 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
This is matching what trunk gcc is accepting. Also adds a missing ssse3 case. PR27779. The amount of duplication here is annoying, maybe it should be factored into a separate .def file? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270224 91177308-0d34-0410-b5e6-96231b3b80d8
-
Krzysztof Parzyszek authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270216 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Pilgrim authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270212 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Pilgrim authored
llvm/test/CodeGen/X86/avx-intrinsics-fast-isel.ll will be synced to this git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270210 91177308-0d34-0410-b5e6-96231b3b80d8
-
Martin Probst authored
Summary: This change automatically sorts ES6 imports and exports into four groups: absolute imports, parent imports, relative imports, and then exports. Exports are sorted in the same order, but not grouped further. To keep JS import sorting out of Format.cpp, this required extracting the TokenAnalyzer infrastructure to separate header and implementation files. Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D20198 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270203 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Otherwise, clang-format can get confused with statements like: x.for = 1; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270188 91177308-0d34-0410-b5e6-96231b3b80d8
-
Saleem Abdulrasool authored
Add a const_cast rather than the C-style cast. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270180 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270170 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
appropriate changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270169 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
Some people have weird CI systems that run each test subdirectory independently without access to other parallel trees. Unfortunately, this means we have to suffer some duplication until Art can sort out how to share these types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270164 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vedant Kumar authored
The lexer sets the end location of macro arguments incorrectly *if*, while merging consecutive args to fit into a single SLocEntry, it finds args which come from different macro files. Fix the issue by using separate SLocEntries in this situation. This fixes a code coverage crasher (rdar://problem/26181005). Because the lexer reported end locations for certain macro args incorrectly, we would generate bogus coverage mappings with negative line offsets. Reviewed-by: akyrtzi Differential Revision: http://reviews.llvm.org/D20401 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270160 91177308-0d34-0410-b5e6-96231b3b80d8
-
Anton Yartsev authored
[analyzer] Fix for PR23790 : constrain return value of strcmp() rather than returning a concrete value. The function strcmp() can return any value, not just {-1,0,1} : "The strcmp(const char *s1, const char *s2) function returns an integer greater than, equal to, or less than zero, accordingly as the string pointed to by s1 is greater than, equal to, or less than the string pointed to by s2." [C11 7.24.4.2p3] https://llvm.org/bugs/show_bug.cgi?id=23790 http://reviews.llvm.org/D16317 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270154 91177308-0d34-0410-b5e6-96231b3b80d8
-
Justin Lebar authored
Summary: Previously it was implemented as inline asm in the CUDA headers. This change allows us to use the [addr+imm] addressing mode when executing ld.global.nc instructions. This translates into a 1.3x speedup on some benchmarks that call this instruction from within an unrolled loop. Reviewers: tra, rsmith Subscribers: jhen, cfe-commits, jholewinski Differential Revision: http://reviews.llvm.org/D19990 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270150 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 19, 2016
-
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270144 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Belevich authored
According to Cuda Programming guide (v7.5, E2.3.1): > __device__, __constant__ and __shared__ variables defined in namespace > scope, that are of class type, cannot have a non-empty constructor or a > non-empty destructor. Clang already deals with device-side constructors (see D15305). This patch enforces similar rules for destructors. Differential Revision: http://reviews.llvm.org/D20140 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270108 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Belevich authored
Codegen tests for device-side variable initialization are subset of test cases used to verify Sema's part of the job. Including CodeGenCUDA/device-var-init.cu from SemaCUDA makes it easier to keep both sides in sync. Differential Revision: http://reviews.llvm.org/D20139 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270107 91177308-0d34-0410-b5e6-96231b3b80d8
-