summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Sema: Avoid a stack overflow on large CFGsDuncan P. N. Exon Smith2015-07-231-16/+24
| | | | | | | | | Large CFGs cause `checkForFunctionCall()` to overflow its stack. Break the recursion by manually managing the call stack instead. Patch by Vedant Kumar! llvm-svn: 243039
* Sema: Split out helper from checkForFunctionCall(), NFCDuncan P. N. Exon Smith2015-07-231-37/+37
| | | | | | | | | | Split out `hasRecursiveCallInPath()` from `checkForFunctionCall()` to flatten nesting and clarify the code. This also simplifies a follow-up patch that refactors the other logic in `checkForFunctionCall()`. Patch by Vedant Kumar! llvm-svn: 243038
* [Compiler-RT] Remove dependency on libgcc_s/ehRenato Golin2015-07-231-7/+0
| | | | | | | | | | | | | | Currently, for --rtlib=compiler-rt on GNU systems, we're assuming that one has libgcc_s and libgcc_eh as low-level libraries, which when used in conjunction with -lunwind or -lc++abi, breaks that assumption. My original fix was wrong, and this patch reverts it to prepare for a new flag to choose the unwinder/C++ libraries. For the time being, people can use "-lgcc_s -lgcc_eh" or "-lunwind -lc++abi" or any combination they need explicitly. llvm-svn: 243025
* [X86][AVX512F] Add FP scalar intrinsicsAsaf Badouh2015-07-231-0/+357
| | | | | | | | intrinsics for: add/sub/mul/div/min/max in their FP scalar versions Differential Revision: http://reviews.llvm.org/D11418 llvm-svn: 243009
* [X86][AVX512BW] add madd and maddubs intrinsicsAsaf Badouh2015-07-231-0/+54
| | | | | | Differential Revision: http://reviews.llvm.org/D11420 llvm-svn: 242986
* ArrayRef-ize a pointer/length pair.Richard Smith2015-07-231-14/+13
| | | | llvm-svn: 242977
* Downgrade error about adding 'dllimport' to used free function to warning ↵Hans Wennborg2015-07-221-3/+9
| | | | | | | | (PR24215) The code will still work as it can reference the function via its thunk. llvm-svn: 242973
* Move EHPersonality to CGCleanupDavid Majnemer2015-07-222-32/+33
| | | | | | | | This makes it possible to use EHPersonality in other parts of CodeGen. Differential Revision: http://reviews.llvm.org/D11440 llvm-svn: 242971
* [MS Compat] Allow _Atomic(Type) and 'struct _Atomic' to coexistDavid Majnemer2015-07-222-0/+50
| | | | | | | | | | | | | | | | | | | | | | MSVC 2013 ships, as part of its STL implementation, a class named '_Atomic'. This is unfortunate because this keyword is in conflict with the C11 keyword with the same name. Our solution was to disable this keyword when targeting MSVC 2013 and reenable it for 2015. However, this makes it impossible for clang's headers to make use of _Atomic. This is problematic in the case of libc++ as it makes heavy use of this keyword. Let the keywordness of _Atomic float under certain circumstances: the body of a class named _Atomic, or a class with a base specifier named _Atomic, will not have the keyword variant of _Atomic for the duration of the class body. This is sufficient to allow us to correctly handle _Atomic in the STL while permitting us to use _Atomic as a keyword everywhere else. Differential Revision: http://reviews.llvm.org/D11233 llvm-svn: 242970
* Fix dumb use-after-free bug introduced in r242868.Richard Smith2015-07-221-9/+9
| | | | llvm-svn: 242960
* [MSVC Compatibility] Use a better predicate for __BOOL_DEFINEDDavid Majnemer2015-07-221-1/+2
| | | | | | | Instead of using CPlusPlus, use Bool. No functionality change is intended, it just makes things a tad bit more clear. llvm-svn: 242957
* Fix -Wextra-semi warnings.Hans Wennborg2015-07-221-3/+3
| | | | | | | | Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D11401 llvm-svn: 242931
* Add cygwin x86_64 target.Yaron Keren2015-07-221-0/+27
| | | | | | | | Patch by Martell Malone! http://reviews.llvm.org/D11349 llvm-svn: 242914
* [OpenMP] Make target data directive generate unexpected directive diagnostic.Samuel Antao2015-07-221-2/+1
| | | | llvm-svn: 242906
* [mingw] Add support for -rtlib option and -stdlib option to the mingw driverReid Kleckner2015-07-222-37/+46
| | | | | | | | | | Now clang should be able to use compiler-rt and libc++ on mingw. Based on a patch by Martell Malone. Differential Revision: http://reviews.llvm.org/D11237 llvm-svn: 242905
* Pass -I options to integrates and external assemblersRenato Golin2015-07-221-0/+4
| | | | | | | | Fixes PR21000. Patch by Artem Belevich. llvm-svn: 242904
* [CONCEPTS] Add diagnostics: non-defining function; non-namespace scopeHubert Tong2015-07-221-0/+26
| | | | | | | | | | | | | | | | | | | | | Summary: Create diagnostic for function concept declaration which is not a definition. Create diagnostic for concept declaration which isn't in namespace scope. Create associated tests. Reviewers: rsmith, faisalv, fraggamuffin, hubert.reinterpretcast Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11027 Patch by Nathan Wilson! llvm-svn: 242899
* [modules] Stop performing PCM lookups for all identifiers when building with ↵Richard Smith2015-07-224-20/+94
| | | | | | C++ modules. Instead, serialize a list of interesting identifiers and mark those ones out of date on module import. Avoiding the identifier lookups here gives a 20-30% speedup in builds with large numbers of modules. No functionality change intended. llvm-svn: 242868
* [modules] Change module manager visitation order to be a bit more stable whenRichard Smith2015-07-221-13/+9
| | | | | | | | | | | more modules are added: visit modules depth-first rather than breadth-first. The visitation is still (approximately) oldest-to-newest, and still guarantees that a module is visited before anything it imports, so modules that are imported by others sometimes need to jump to a later position in the visitation order when more modules are loaded, but independent module trees don't interfere with each other any more. llvm-svn: 242863
* [Sema] Diagnose use of declaration correctly.Davide Italiano2015-07-221-9/+1
| | | | | | | | | | | | | Before we skipped that for virtual functions not fully qualified (r81507). This commit basically reverts this to the older behaviour, which seems more consistent. We now also correctly consider ill-formed calls to deleted member functions, which were silently passed before in some cases. The review contains the whole discussion. PR: 20268 Differential Revision: http://reviews.llvm.org/D11334 llvm-svn: 242857
* [modules] In C++, stop serializing and deserializing a list of declarations inRichard Smith2015-07-214-70/+63
| | | | | | | | | the identifier table. This is redundant, since the TU-scope lookups are also serialized as part of the TU DeclContext, and wasteful in a number of ways. We still emit the decls for PCH / preamble builds, since for those we want identical results, not merely semantically equivalent ones. llvm-svn: 242855
* clang-format: Fix unary operator detection in for loops.Daniel Jasper2015-07-211-1/+2
| | | | | | | | | | Before: for (;; * a = b) {} After: for (;; *a = b) {} llvm-svn: 242849
* Use range-based for loops; NFC.Aaron Ballman2015-07-211-10/+6
| | | | llvm-svn: 242846
* ARM: actually define __ARM_ARCH_7S__ for the armv7s sliceTim Northover2015-07-211-1/+2
| | | | | | | We ended up with the wrong predefine after the recent TargetParser shuffle, and I accidentally solidified it with a test. This should fix it. llvm-svn: 242841
* Use a range-based for loop; NFC.Aaron Ballman2015-07-211-2/+2
| | | | llvm-svn: 242836
* Replace some uses of Self.Context with the local variable C; NFC.Aaron Ballman2015-07-211-14/+14
| | | | llvm-svn: 242835
* Fix GCC build due to shadowingDavid Blaikie2015-07-211-2/+2
| | | | llvm-svn: 242826
* Pass an iterator range to EmitCallArgsDavid Blaikie2015-07-218-35/+30
| | | | llvm-svn: 242824
* [modules] Produce an error if -cc1 wants to implicitly build a module and noRichard Smith2015-07-212-10/+10
| | | | | | | module cache has been provided, rather than creating one in the current directory. llvm-svn: 242819
* Add missing parentheses to appease -Wlogical-op-parentheses.Daniel Jasper2015-07-211-3/+5
| | | | | | Add missing case to appease -Wswitch. llvm-svn: 242797
* [X86][AVX512F] add FP arithmetic intrinsicsAsaf Badouh2015-07-211-0/+246
| | | | | | | | | add/div/mul/sub include rounding versions Differential Revision: http://reviews.llvm.org/D11354 llvm-svn: 242790
* Commit for http://reviews.llvm.org/D10765Michael Wong2015-07-2113-8/+118
| | | | | | | for OpenMP 4 target data directive parsing and sema. This commit is on behalf of Kelvin Li. llvm-svn: 242785
* Fix mingw toolchain to honor sysroot on Linux and add tests.Yaron Keren2015-07-212-43/+86
| | | | | | | | It should now support three mingw distributions running on Windows and three Linux distributions. The include directories for each are listed in the comments. llvm-svn: 242766
* [ARM] Pass subtarget feature "+reserve-r9" instead of passing backendAkira Hatanaka2015-07-211-7/+6
| | | | | | | | | | | | | | | | | | option "-arm-reserve-r9". This recommits r242736, which had to be reverted because the llvm-side change that was committed in r242737 caused the number of subtarget features to go over the limit of 64. This change is needed since backend options do not make it to the backend when doing LTO and are not capable of changing the behavior of code-gen passes on a per-function basis. rdar://problem/21529937 Differential Revision: http://reviews.llvm.org/D11319 llvm-svn: 242755
* Fix crash-on-invalid: don't look ahead past an unknown token, it might be EOF.Richard Smith2015-07-211-1/+2
| | | | llvm-svn: 242744
* Revert r242736.Akira Hatanaka2015-07-201-6/+7
| | | | | | | | | r242737 caused builds to fail with the following error message, so I'm reverting the clang side change too: error:Too many subtarget features! Bump MAX_SUBTARGET_FEATURES. llvm-svn: 242741
* clang-format: Fix crasher when a UTF8 character is found in an escapeDaniel Jasper2015-07-201-1/+1
| | | | | | sequence. Discovered by the fuzzer. llvm-svn: 242738
* [ARM] Pass subtarget feature "+reserve-r9" instead of passing backendAkira Hatanaka2015-07-201-7/+6
| | | | | | | | | | | | | | option "-arm-reserve-r9". This change is needed since backend options do not make it to the backend when doing LTO and are not capable of changing the behavior of code-gen passes on a per-function basis. rdar://problem/21529937 Differential Revision: http://reviews.llvm.org/D11319 llvm-svn: 242736
* Ignore the "novtable" declspec when not using the Microsoft C++ ABI.Bob Wilson2015-07-206-11/+12
| | | | | | | | | | | | | | Clang used to silently ignore __declspec(novtable). It is implemented now, but leaving the vtable uninitialized does not work when using the Itanium ABI, where the class layout for complex class hierarchies is stored in the vtable. It might be possible to honor the novtable attribute in some simple cases and either report an error or ignore it in more complex situations, but it’s not clear if that would be worthwhile. There is also value in having a simple and predictable behavior, so this changes clang to simply ignore novtable when not using the Microsoft C++ ABI. llvm-svn: 242730
* [MS Compat] Add support for __declspec(noalias)David Majnemer2015-07-202-1/+7
| | | | | | | The attribute '__declspec(noalias)' communicates that the function only accesses memory pointed to by its pointer-typed arguments. llvm-svn: 242728
* [CUDA] Moved device-side triple calculation to buildCudaActions().Artem Belevich2015-07-202-26/+26
| | | | | | Differential Revision: http://reviews.llvm.org/D11310 llvm-svn: 242718
* Fix a case where we forgot to make a static local variable comdatReid Kleckner2015-07-201-0/+1
| | | | | | | | | | | | | Sometimes we can provide an initializer for static locals, in which case we sometimes might need to change the type. Changing the type requires making a new LLVM GlobalVariable, and in this codepath we were forgetting to transfer the comdat. Fixes PR23838. Patch by Ivan Garramona. llvm-svn: 242704
* Fixed style issues pointed out by Justin Bogner.Artem Belevich2015-07-203-39/+35
| | | | | | Differential Revision: http://reviews.llvm.org/D11273 llvm-svn: 242698
* Fix quoting of #pragma comment for PS4.Yunzhong Gao2015-07-201-1/+5
| | | | | | | | | | | | This is the PS4 counterpart to r229376, which quotes the library name if the name contains space. It was discovered that if a library name contains both double-quote and space characters, quoting the name might produce unexpected results, but we are mostly concerned with a Windows host environment, which does not allow double-quote or slashes in file/folder names. Differential Revision: http://reviews.llvm.org/D11275 llvm-svn: 242689
* [CodeGen] Flip lanes when lowering __builtin_palignr with one laneBenjamin Kramer2015-07-201-0/+1
| | | | | | | Otherwise we'd pick the wrong lane for the resulting shuffle and miscompile code. PR24187. llvm-svn: 242678
* Silence a -Wtype-limits warning; NFC.Aaron Ballman2015-07-201-1/+1
| | | | llvm-svn: 242670
* Remove erroneous space in "lib64" string constant.Yaron Keren2015-07-201-1/+1
| | | | llvm-svn: 242667
* [X86, inlineasm] Improve analysis of x,Y0,Yi,Ym,Yt,L,e,Z,s asm constraints ↵Alexey Bataev2015-07-202-23/+52
| | | | | | | | | (patch by Alexey Frolov) Improve Sema checking of 9 existing inline asm constraints (‘x’, ‘Y*’, ‘L’, ‘e’, ‘Z’, ‘s’). Differential Revision: http://reviews.llvm.org/D10536 llvm-svn: 242665
* Allow case-insensitive values for -mtune for AArch64 target in line with GCC.Gabor Ballabas2015-07-201-4/+5
| | | | | | | | | GCC allows case-insensitive values for -mcpu, -march and -mtune options. This patch implements the same behaviour for the -mtune option for the AArch64 target. Differential Revision: http://reviews.llvm.org/D10563 llvm-svn: 242663
* Fix typo found by Joerg Sonnenberger.Yaron Keren2015-07-201-1/+1
| | | | llvm-svn: 242662
OpenPOWER on IntegriCloud