aboutsummaryrefslogtreecommitdiff
path: root/clang/lib
AgeCommit message (Collapse)Author
2019-01-16[NewPM][TSan] Reiterate the TSan portPhilip Pfaffe
Summary: Second iteration of D56433 which got reverted in rL350719. The problem in the previous version was that we dropped the thunk calling the tsan init function. The new version keeps the thunk which should appease dyld, but is not actually OK wrt. the current semantics of function passes. Hence, add a helper to insert the functions only on the first time. The helper allows hooking into the insertion to be able to append them to the global ctors list. Reviewers: chandlerc, vitalybuka, fedor.sergeev, leonardchan Subscribers: hiraditya, bollu, llvm-commits Differential Revision: https://reviews.llvm.org/D56538 llvm-svn: 351314
2019-01-16[SEH] Pass the frame pointer from SEH finally to finally functionsSanjin Sijaric
Pass the frame pointer that the first finally block receives onto the nested finally block, instead of generating it using localaddr. Differential Revision: https://reviews.llvm.org/D56463 llvm-svn: 351302
2019-01-16[WebAssembly] COWS has been renamed to WASI.Dan Gohman
llvm-svn: 351298
2019-01-16[SemaCXX] Unconfuse Clang when std::align_val_t is unscoped in C++03Eric Fiselier
When -faligned-allocation is specified in C++03 libc++ defines std::align_val_t as an unscoped enumeration type (because Clang didn't provide scoped enumerations as an extension until 8.0). Unfortunately Clang confuses the `align_val_t` overloads of delete with the sized deallocation overloads which aren't enabled. This caused Clang to call the aligned deallocation function as if it were the sized deallocation overload. For example: https://godbolt.org/z/xXJELh This patch fixes the confusion. llvm-svn: 351294
2019-01-16[EH] Rename llvm.x86.seh.recoverfp intrinsic to llvm.eh.recoverfpEli Friedman
This is the clang counterpart to D56747. Patch by Mandeep Singh Grang. Differential Revision: https://reviews.llvm.org/D56748 llvm-svn: 351284
2019-01-16Revert "[Tooling] Make clang-tool find libc++ dir on mac when running on a ↵Vlad Tsyrklevich
file without compilation database." This reverts commits r351222 and r351229, they were causing ASan/MSan failures on the sanitizer bots. llvm-svn: 351282
2019-01-15Re-order type param children of ObjC nodesStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55394 llvm-svn: 351272
2019-01-15NFC: Some cleanups that I missed in the previous commitStephen Kelly
llvm-svn: 351271
2019-01-15Re-order overrides in FunctionDecl dumpStephen Kelly
Output all content which is local to the FunctionDecl before traversing to child AST nodes. This is necessary so that all of the part which is local to the FunctionDecl can be split into a different method. Reviewers: aaron.ballman Differential Revision: https://reviews.llvm.org/D55083 llvm-svn: 351269
2019-01-15NFC: Replace iterator loop with cxx_range_forStephen Kelly
llvm-svn: 351268
2019-01-15Enable IAS for OpenBSD SPARC.Brad Smith
llvm-svn: 351245
2019-01-15CodeGen: Remove debug printf unintentionally added in r351228.Peter Collingbourne
llvm-svn: 351241
2019-01-15Implement BlockDecl::Capture dump in terms of visitorsStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56709 llvm-svn: 351239
2019-01-15NFC: Implement OMPClause dump in terms of visitorsStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56708 llvm-svn: 351236
2019-01-15Implement CXXCtorInitializer dump in terms of VisitorStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56707 llvm-svn: 351235
2019-01-15[MSVC Compat] Fix typo correction for inclusion directives.Volodymyr Sapsai
In MSVC compatibility mode we were checking not the typo corrected filename but the original filename. Reviewers: christylee, compnerd Reviewed By: christylee Subscribers: jkorous, dexonsmith, sammccall, hokein, cfe-commits Differential Revision: https://reviews.llvm.org/D56631 llvm-svn: 351232
2019-01-15[Nios2] Remove Nios2 backendCraig Topper
As mentioned here http://lists.llvm.org/pipermail/llvm-dev/2019-January/129121.html This backend is incomplete and has not been maintained in several months. Differential Revision: https://reviews.llvm.org/D56690 llvm-svn: 351230
2019-01-15[MSP430] Provide a toolchain descriptionAnton Korobeynikov
This is an initial implementation for msp430 toolchain including -mmcu option support -mhwmult options support -integrated-as by default The toolchain uses msp430-elf-as as a linker and supports msp430-gcc toolchain tree. Patch by Kristina Bessonova! Differential Revision: https://reviews.llvm.org/D56658 llvm-svn: 351228
2019-01-15[Tooling] Make clang-tool find libc++ dir on mac when running on a file ↵Haojian Wu
without compilation database. Summary: This is a regression of r348365. When clang-tools run on a file without a complation database (`clang-check /tmp/t.cc`), we will use fixed compilation database as a fallback. However the actual compiler path in the fallback complation command is just `clang-tool` which is insufficient to detect the libc++ dir. Reviewers: ilya-biryukov, EricWF Reviewed By: ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56680 llvm-svn: 351222
2019-01-15[Solaris] Move enabling IAS for SPARC from the Solaris toolchain to Generic_GCC.Brad Smith
llvm-svn: 351217
2019-01-15Fix cpu-dispatch MV regression caused by r347812Erich Keane
r347812 permitted forward declarations for cpu-dispatch functions, which are occassionally useful as exposition in header files. However, this inadvertently permitted this function to become multiversioned after a usage. This patch ensures that the "CausesMV" checks are still run in the forward-declaration case. Change-Id: Icb6f975a2d068f088b89e3bbe26cf1d24f5a972c llvm-svn: 351212
2019-01-15Revert "[X86] Make _xgetbv/_xsetbv on non-windows platforms"Benjamin Kramer
This reverts commit r351160. Breaks building v8. llvm-svn: 351210
2019-01-15Revert "Correct the source range returned from preprocessor callbacks."Benjamin Kramer
This reverts commit r350891. Also add a test case that would return an empty string with r350891. llvm-svn: 351209
2019-01-15[OpenCL] opencl-c.h: read_image*(): sampler-less, and image{1,2}d_array_t ↵Roman Lebedev
variants are OpenCL-1.2+, mark them as such Summary: Refer to [[ https://www.khronos.org/registry/OpenCL/specs/opencl-1.1.pdf#page=242 | `6.11.13.2 Built-in Image Functions` ]], and [[ https://www.khronos.org/registry/OpenCL/specs/opencl-1.1.pdf#page=306 | `9.6.8 Image Read and Write Functions` ]] of the OpenCL 1.1 spec. * There is no mention of `image1d_array_t` and `image2d_array_t` anywhere in the OpenCL 1.1 spec. * All the `read_image{f,i,ui,h}()` functions, as of OpenCL 1.1 spec, have a second required parameter `sampler_t sampler` Should have prevented the following regression: https://redmine.darktable.org/issues/12493 Reviewers: yaxunl, Anastasia, echuraev, asavonic Reviewed By: Anastasia Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D56646 llvm-svn: 351188
2019-01-15[clang][UBSan] Sanitization for alignment assumptions.Roman Lebedev
Summary: UB isn't nice. It's cool and powerful, but not nice. Having a way to detect it is nice though. [[ https://wg21.link/p1007r3 | P1007R3: std::assume_aligned ]] / http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1007r2.pdf says: ``` We propose to add this functionality via a library function instead of a core language attribute. ... If the pointer passed in is not aligned to at least N bytes, calling assume_aligned results in undefined behaviour. ``` This differential teaches clang to sanitize all the various variants of this assume-aligned attribute. Requires D54588 for LLVM IRBuilder changes. The compiler-rt part is D54590. This is a second commit, the original one was r351105, which was mass-reverted in r351159 because 2 compiler-rt tests were failing. Reviewers: ABataev, craig.topper, vsk, rsmith, rnk, #sanitizers, erichkeane, filcab, rjmccall Reviewed By: rjmccall Subscribers: chandlerc, ldionne, EricWF, mclow.lists, cfe-commits, bkramer Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54589 llvm-svn: 351177
2019-01-15NFC: Move Decl node handling to TextNodeDumperStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56643 llvm-svn: 351175
2019-01-15[ASTDump] NFC: Move dump of type nodes to NodeDumperStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56642 llvm-svn: 351172
2019-01-15[WebAssembly] Support multilibs for wasm32 and add a wasm OS that uses itDan Gohman
This adds support for multilib paths for wasm32 targets, following [Debian's Multiarch conventions], and also adds an experimental OS name in order to test it. [Debian's Multiarch conventions]: https://wiki.debian.org/Multiarch/ Differential Revision: https://reviews.llvm.org/D56553 llvm-svn: 351164
2019-01-15[X86] Make _xgetbv/_xsetbv on non-windows platformsCraig Topper
Summary: This patch attempts to redo what was tried in r278783, but was reverted. These intrinsics should be available on non-windows platforms with "xsave" feature check. But on Windows platforms they shouldn't have feature check since that's how MSVC behaves. To accomplish this I've added a MS builtin with no feature check. And a normal gcc builtin with a feature check. When _MSC_VER is not defined _xgetbv/_xsetbv will be macros pointing to the gcc builtin name. I've moved the forward declarations from intrin.h to immintrin.h to match the MSDN documentation and used that as the header file for the MS builtin. I'm not super happy with this implementation, and I'm open to suggestions for better ways to do it. Reviewers: rnk, RKSimon, spatel Reviewed By: rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56686 llvm-svn: 351160
2019-01-15Revert alignment assumptions changesVlad Tsyrklevich
Revert r351104-6, r351109, r351110, r351119, r351134, and r351153. These changes fail on the sanitizer bots. llvm-svn: 351159
2019-01-15[COFF, ARM64] Add __byteswap intrinsicsMandeep Singh Grang
Reviewers: rnk, efriedma, ssijaric, TomTan, haripul Reviewed By: efriedma Subscribers: javed.absar, cfe-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D56685 llvm-svn: 351147
2019-01-14[Sema] Change std::sort to llvm::sortMandeep Singh Grang
llvm-svn: 351137
2019-01-14[COFF, ARM64] Add __nop intrinsicMandeep Singh Grang
Reviewers: rnk, efriedma, TomTan, haripul, ssijaric Reviewed By: rnk, efriedma Subscribers: javed.absar, kristof.beyls, cfe-commits Differential Revision: https://reviews.llvm.org/D56671 llvm-svn: 351135
2019-01-14[ASTDump] NFC: Move dumping of QualType node to TextNodeDumperStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56641 llvm-svn: 351116
2019-01-14[ASTDump] NFC: Canonicalize handling of TypeLocInfoStephen Kelly
Summary: No need to avoid the Visit method. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56640 llvm-svn: 351115
2019-01-14[ASTDump] NFC: Move Type Visit implementation to TextNodeDumperStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56639 llvm-svn: 351114
2019-01-14NFC: Fix nits I missed beforeStephen Kelly
llvm-svn: 351112
2019-01-14Improve a -Wunguarded-availability noteErik Pilkington
Mention the deployment target, and don't say "partial" which doesn't really mean anything to users. rdar://problem/33601513 Differential revision: https://reviews.llvm.org/D56523 llvm-svn: 351108
2019-01-14[clang][UBSan] Sanitization for alignment assumptions.Roman Lebedev
Summary: UB isn't nice. It's cool and powerful, but not nice. Having a way to detect it is nice though. [[ https://wg21.link/p1007r3 | P1007R3: std::assume_aligned ]] / http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1007r2.pdf says: ``` We propose to add this functionality via a library function instead of a core language attribute. ... If the pointer passed in is not aligned to at least N bytes, calling assume_aligned results in undefined behaviour. ``` This differential teaches clang to sanitize all the various variants of this assume-aligned attribute. Requires D54588 for LLVM IRBuilder changes. The compiler-rt part is D54590. Reviewers: ABataev, craig.topper, vsk, rsmith, rnk, #sanitizers, erichkeane, filcab, rjmccall Reviewed By: rjmccall Subscribers: chandlerc, ldionne, EricWF, mclow.lists, cfe-commits, bkramer Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54589 llvm-svn: 351105
2019-01-14[analyzer] [PR39792] false positive on strcpy targeting struct membersGeorge Karpenkov
Patch by Pierre van Houtryve. Differential Revision: https://reviews.llvm.org/D55226 llvm-svn: 351097
2019-01-14[analyzer] [NFC] Remove unused undefined method.George Karpenkov
Wow, at no point the linker or compiler complaints about that! llvm-svn: 351096
2019-01-14[WebAssembly] Remove old builtinsDan Gohman
This removes the old grow_memory and mem.grow-style builtins, leaving just the memory.grow-style builtins. Differential Revision: https://reviews.llvm.org/D56645 llvm-svn: 351089
2019-01-14[OpenCL] Set generic addr space of 'this' in special class members.Anastasia Stulova
Set address spaces of 'this' param correctly for implicit special class members. This also changes initialization conversion sequence to separate address space conversion from other qualifiers in case of binding reference to a temporary. In this case address space conversion should happen after the binding (unlike for other quals). This is needed to materialize it correctly in the alloca address space. Initial patch by Mikael Nilssoni! Differential Revision: https://reviews.llvm.org/D56066 llvm-svn: 351053
2019-01-14[AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.Sam McCall
Summary: This fixes ASTContext's parent map for nodes in such classes (e.g. operator()). https://bugs.llvm.org/show_bug.cgi?id=39949 This also changes the observed shape of the AST for implicit RAVs. - this includes AST MatchFinder: cxxRecordDecl() now matches lambda classes, functionDecl() matches the call operator, and the parent chain is body -> call operator -> lambda class -> lambdaexpr rather than body -> lambdaexpr. - this appears not to matter for the ASTImporterLookupTable builder - this doesn't matter for the other RAVs in-tree. In order to do this, we remove the TraverseLambdaBody hook. The problem is it's hard/weird to ensure this hook is called when traversing via the implicit class. There were just two users of this hook in-tree, who use it to skip bodies. I replaced these with explicitly traversing the captures only. Another approach would be recording the bodies when the lambda is visited, and then recognizing them later. I'd be open to suggestion on how to preserve this hook, instead. Reviewers: aaron.ballman, JonasToth Subscribers: cfe-commits, rsmith, jdennett Differential Revision: https://reviews.llvm.org/D56444 llvm-svn: 351047
2019-01-14[X86] Remove mask parameter from avx512 pmultishiftqb intrinsics. Use select ↵Craig Topper
in IR instead. Fixes PR40259 llvm-svn: 351036
2019-01-14[X86] Remove mask parameter from vpshufbitqmb intrinsics. Change result to a ↵Craig Topper
vXi1 vector. We'll do the scalar<->vXi1 conversions with bitcasts in IR. Fixes PR40258 llvm-svn: 351029
2019-01-12[ASTDump] NFC: Move dump of individual Stmts to TextNodeDumperStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55340 llvm-svn: 351014
2019-01-12Implement TemplateArgument dumping in terms of VisitorStephen Kelly
Summary: Split the output streaming from the traversal to other AST nodes. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55491 llvm-svn: 351012
2019-01-12[ASTDump] Change parameter to StringRefStephen Kelly
llvm-svn: 351011
2019-01-12[analyzer] Fix unused variable warnings in Release buildsBenjamin Kramer
This was just an inlined version of isa<CXXConstructExpr>. NFC. llvm-svn: 351007