summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-objdump] errorToErrorCode+message -> toStringFangrui Song2019-04-241-4/+3
| | | | llvm-svn: 359100
* [ELF] Delete a redundant SHT_NOBITS -> SHT_PROGBITS after D60131Fangrui Song2019-04-241-1/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D61006 llvm-svn: 359099
* Use llvm::stable_sortFangrui Song2019-04-2420-84/+58
| | | | llvm-svn: 359098
* [scudo][standalone] Introduce the Secondary allocatorKostya Kortchinsky2019-04-2414-88/+476
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The Secondary allocator wraps the platform allocation primitives. It is meant to be used for larger sizes that the Primary can't fullfill, as it will be slower, and sizes are multiple of the system page size. This also changes some of the existing code, notably the opaque platform data being passed to the platform specific functions: we can shave a couple of syscalls on Fuchsia by storing additional data (this addresses a TODO). Reviewers: eugenis, vitalybuka, hctim, morehouse Reviewed By: morehouse Subscribers: mgorny, delcypher, jfb, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D60787 llvm-svn: 359097
* [AMDGPU][MC] Parser cleanup and refactoringDmitry Preobrazhensky2019-04-241-93/+48
| | | | | | | | Reviewers: artem.tamazov, arsenm Differential Revision: https://reviews.llvm.org/D60767 llvm-svn: 359096
* [x86] make sure horizontal op and broadcast types match to simplify (PR41414)Sanjay Patel2019-04-242-3/+71
| | | | | | | | | If the types don't match, we can't just remove the shuffle. There may be some other opportunity for optimization here, but this should prevent the crashing seen in: https://bugs.llvm.org/show_bug.cgi?id=41414 llvm-svn: 359095
* [PPC64] Consider localentry offset when computing branch distanceFangrui Song2019-04-242-1/+34
| | | | | | | | | | | | | | | Summary: We don't take localentry offset into account, and thus may fail to create a long branch when the gap is just a few bytes smaller than 2^25. relocation R_PPC64_REL24 out of range: 33554432 is not in [-33554432, 33554431] relocation R_PPC64_REL24 out of range: 33554436 is not in [-33554432, 33554431] Fix that by adding the offset to the symbol VA. Differential Revision: https://reviews.llvm.org/D61058 llvm-svn: 359094
* [LLVM-C] Use dyn_cast instead of unwrap in LLVMGetDebugLoc functionswhitequark2019-04-241-15/+21
| | | | | | | | | | | | | | | | | | | | | Summary: The `unwrap<Type>` calls can assert with: ``` Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast ``` so replace them with `dyn_cast`. Reviewers: whitequark, abdulras, hiraditya, compnerd Reviewed By: whitequark Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60473 llvm-svn: 359093
* Kill modify-python-lldb.pyPavel Labath2019-04-244-191/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: After the last round of cleanups, this script was almost a no-op. The only piece of functionality that remained was the one which tried to make the swig-generated function signatures more pythonic. The "tried" part is important here, as it wasn't doing a really good job and the end result was not valid python nor c (e.g., SetExecutable(SBAttachInfo self, str const * path)). Doing these transformations another way is not possible, as these signatures are generated by swig, and not present in source. However, given that this is the only reason why we need a swig post-process step, and that the current implementation is pretty sub-optimal, this patch simply abandons the signature fixup idea, and chooses to simplify our build process instead. Reviewers: amccarth, jingham, clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D61000 llvm-svn: 359092
* [yaml2obj] Replace num_zeros with write_zerosFangrui Song2019-04-241-35/+24
| | | | llvm-svn: 359091
* [yaml2elf] - Replace a loop with write_zeros(). NFC.George Rimar2019-04-241-6/+5
| | | | | | And apply clang-format to the method changed. llvm-svn: 359090
* Minor code style fix in ClangUserExpression.cpp [NFC]Raphael Isemann2019-04-241-2/+1
| | | | llvm-svn: 359089
* [X86] Add shouldFoldConstantShiftPairToMask override placeholder. NFCI.Simon Pilgrim2019-04-242-0/+9
| | | | | | Prep work toward fixing PR40758 llvm-svn: 359088
* Shorten comment line to be below 80 characters [NFC]Raphael Isemann2019-04-241-1/+1
| | | | llvm-svn: 359087
* [LLD][ELF] - Remove binding.elf binary from test case. NFCI.George Rimar2019-04-243-7/+21
| | | | | | This introduces YAML based invalid-binding.test instead. llvm-svn: 359086
* Add an any_cast test for array types. Thanks to Jonathan Wakely for the ↵Marshall Clow2019-04-242-8/+25
| | | | | | suggestion. llvm-svn: 359085
* [LLD][ELD] - Remove excessive lines from test. NFC.George Rimar2019-04-241-5/+0
| | | | | | They are not used. llvm-svn: 359084
* Let llvm-cvtres (and lld-link) report duplicate resourcesNico Weber2019-04-247-30/+103
| | | | | | | | | | | | | | | | | If two .res files contain the same resource, cvtres.exe (and hence link.exe) reject the input with this message: CVTRES : fatal error CVT1100: duplicate resource. type:STRING, name:101, language:0x0409 LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt llvm-cvtres (and lld-link) used to silently pick one of the duplicate resources instead. This patch makes them report an error as well. We slightly improve on cvtres by printing the name of two .res files containing duplicate entries as well. Differential Revision: https://reviews.llvm.org/D61049 llvm-svn: 359083
* [X86][SSE] Add masked bit test cases for PR26697Simon Pilgrim2019-04-242-20/+150
| | | | llvm-svn: 359082
* Add 'REQUIRES: shell' to verbose-output-quoting.cHans Wennborg2019-04-241-0/+1
| | | | | | The lit shell couldn't handle these run lines. llvm-svn: 359081
* Avoid name conflict with kernel headersEric Fiselier2019-04-244-9/+12
| | | | llvm-svn: 359080
* [clangd] Fix handling of include paths in windows testsKadir Cetinkaya2019-04-242-8/+12
| | | | llvm-svn: 359079
* [clang][HeaderSuggestion] Handle the case of dotdot with an absolute pathKadir Cetinkaya2019-04-243-4/+15
| | | | | | | | | | | | | | | | | Summary: Include insertion in clangd was inserting absolute paths when the include directory was an absolute path with a double dot. This patch makes sure double dots are handled both with absolute and relative paths. Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60873 llvm-svn: 359078
* Fix unquoted spaces in args in clang --verbose outputHans Wennborg2019-04-242-1/+10
| | | | | | | | | | | The behaviour of not quoting spaces appears to have been introduced by mistake in r190620. Patch by Brad Moody! Differential revision: https://reviews.llvm.org/D60997 llvm-svn: 359077
* Revert r359048: C++ DR2387: a variable template declared wthiIlya Biryukov2019-04-2413-14404/+14242
| | | | | | | | | | | | | The change breaks libc++ with the follwing error: In file included from valarray:4: .../include/c++/v1/valarray:1062:60: error: explicit instantiation declaration of 'valarray<_Tp>' with internal linkage _LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS valarray<size_t>::valarray(size_t)) ^ .../include/c++/v1/valarray:1063:60: error: explicit instantiation declaration of '~valarray<_Tp>' with internal linkage _LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS valarray<size_t>::~valarray()) llvm-svn: 359076
* [clang][HeaderSearch] Make sure there are no backslashes in suggestedPathKadir Cetinkaya2019-04-243-5/+16
| | | | | | | | Reviewers: sammccall Differential Revision: https://reviews.llvm.org/D60995 llvm-svn: 359075
* yamlify lit/Minidump testsPavel Labath2019-04-247-82/+173
| | | | | | Replace checked-in binaries by their yaml equivalents. llvm-svn: 359074
* PostfixExpression: move parser out of NativePDB internalsPavel Labath2019-04-246-96/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The postfix expressions in PDB and breakpad symbol files are similar enough that they can be parsed by the same parser. This patch generalizes the parser in the NativePDB plugin and moves it into the PostfixExpression file created in the previous commit (r358976). The generalization consists of treating any unrecognised token as a "symbol" node (previously these would only be created for tokens starting with "$", and other token would abort the parse). This is needed because breakpad symbols can also contain ".cfa" tokens, which refer to the frame's CFA. The cosmetic changes include: - using a factory function instead of a class for creating nodes (this is more generic as it allows the same BumpPtrAllocator to be used for other things too) - using dedicated function for parsing operator tokens instead of a DenseMap (more efficient as we don't need to create the DenseMap every time). Reviewers: amccarth, clayborg, JDevlieghere, aleksandr.urakov Subscribers: jasonmolenda, lldb-commits, markmentovai, mgorny Differential Revision: https://reviews.llvm.org/D61003 llvm-svn: 359073
* Add "const" in GetUnderlyingObjects. NFCBjorn Pettersson2019-04-2413-54/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Both the input Value pointer and the returned Value pointers in GetUnderlyingObjects are now declared as const. It turned out that all current (in-tree) uses of GetUnderlyingObjects were trivial to update, being satisfied with have those Value pointers declared as const. Actually, in the past several of the users had to use const_cast, just because of ValueTracking not providing a version of GetUnderlyingObjects with "const" Value pointers. With this patch we get rid of those const casts. Reviewers: hfinkel, materi, jkorous Reviewed By: jkorous Subscribers: dexonsmith, jkorous, jholewinski, sdardis, eraman, hiraditya, jrtc27, atanasyan, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61038 llvm-svn: 359072
* [Mips][CodeGen] Remove MachineFunction::setSubtarget. Change Mips to just ↵Craig Topper2019-04-243-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | copy the subtarget from the MachineFunction instead of recalculating it. Summary: The MachineFunction should have been created with the correct subtarget. As long as there is no way to change it, MipsTargetMachine can just capture it directly from the MachineFunction without calling getSubtargetImpl again. While there, const correct the Subtarget pointer to avoid a const_cast. I believe the Mips16Subtarget and NoMips16Subtarget members are never used, but I'll leave there removal for a separate patch. Reviewers: echristo, atanasyan Reviewed By: atanasyan Subscribers: sdardis, arichardson, hiraditya, jrtc27, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60936 llvm-svn: 359071
* [ELF] Fix a gcc -Wextra warningFangrui Song2019-04-241-2/+2
| | | | | | | | | | Extracted from D61046. warning: enumeral and non-enumeral type in conditional expression [-Wextra] Cast SHF_ALLOC to avoid that. llvm-svn: 359070
* Cleanup new cxa guard implementation.Eric Fiselier2019-04-243-8/+58
| | | | | | | | * Add TSAN annotations around the futex syscalls. * Test that the futex syscall wrappers actually work. * Fix bad names. llvm-svn: 359069
* [CommandLine] Provide parser<unsigned long> instantiation to allow ↵Fangrui Song2019-04-2413-73/+100
| | | | | | | | | | | | | cl::opt<uint64_t> on LP64 platforms Summary: And migrate opt<unsigned long long> to opt<uint64_t> Fixes PR19665 Differential Revision: https://reviews.llvm.org/D60933 llvm-svn: 359068
* [Builtins] Implement __builtin_is_constant_evaluated for use in C++2aEric Fiselier2019-04-247-2/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements `__builtin_is_constant_evaluated` as specifier by [P0595R2](https://wg21.link/p0595r2). It is built on the back of Bill Wendling's work for `__builtin_constant_p()`. More tests to come, but early feedback is appreciated. I plan to implement warnings for common mis-usages like those belowe in a following patch: ``` void foo(int x) { if constexpr (std::is_constant_evaluated())) { // condition is always `true`. Should use plain `if` instead. foo_constexpr(x); } else { foo_runtime(x); } } ``` Reviewers: rsmith, MaskRay, bruno, void Reviewed By: rsmith Subscribers: dexonsmith, zoecarver, fdeazeve, kristina, cfe-commits Differential Revision: https://reviews.llvm.org/D55500 llvm-svn: 359067
* Revert r350917 "[Sema] If CheckPlaceholderExpr rewrites the initializerRichard Smith2019-04-246-29/+33
| | | | | | | | | | | | | | of an auto" This commit changed the initializer expression passed into initialization (stripping off an enclosing pair of parentheses or braces) and subtly changing the meaning of programs, typically by inserting bogus calls to copy constructors. See the added testcase in test/SemaCXX/cxx1y-init-captures.cpp for an example of the breakage. llvm-svn: 359066
* Work around GCC test failure.Eric Fiselier2019-04-241-2/+2
| | | | llvm-svn: 359065
* llvm-cvtres: Accept /? as help flag, like cvtres.exeNico Weber2019-04-241-0/+1
| | | | llvm-svn: 359064
* [Docs] Add more redirectsJonas Devlieghere2019-04-241-1/+2
| | | | | | Found two more broken links. llvm-svn: 359063
* [Docs] Update the CI pageJonas Devlieghere2019-04-241-0/+17
| | | | | | | - Add the Sphinx bot - Add a little more info llvm-svn: 359062
* [Docs] Move external links upJonas Devlieghere2019-04-242-18/+5
| | | | | | | With a duplicate link removed and the API reference moved up, the page didn't make much sense anymore. llvm-svn: 359061
* Rewrite cxa guard implementation.Eric Fiselier2019-04-245-263/+1127
| | | | | | | | | | | | | This patch does three main things: (1) It re-writes the cxa guard implementation to make it testable. (2) Adds support for recursive init detection on non-apple platforms. (3) It adds a futex based implementation. The futex based implementation locks and notifies on a per-object basis, unlike the current implementation which uses a global lock for all objects. Once this patch settles I'll turn it on by default when supported. llvm-svn: 359060
* Fix interactions between __builtin_constant_p and constexpr to matchRichard Smith2019-04-244-29/+112
| | | | | | | | | | | | | | | | | | current trunk GCC. GCC permits information from outside the operand of __builtin_constant_p (but in the same constant evaluation context) to be used within that operand; clang now does so too. A few other minor deviations from GCC's behavior showed up in my testing and are also fixed (matching GCC): * Clang now supports nullptr_t as the argument type for __builtin_constant_p * Clang now returns true from __builtin_constant_p if called with a null pointer * Clang now returns true from __builtin_constant_p if called with an integer cast to pointer type llvm-svn: 359059
* gn build: Merge r359050 moreNico Weber2019-04-242-0/+2
| | | | llvm-svn: 359058
* Fix test after r359009 on platforms where %ms_abi_triple is 32-bitNico Weber2019-04-241-1/+1
| | | | llvm-svn: 359057
* gn build: Merge r359050Nico Weber2019-04-242-0/+2
| | | | llvm-svn: 359056
* Revert [AliasAnalysis] AAResults preserves AAManager.Alina Sbirlea2019-04-245-13/+13
| | | | | | Triggers use-after-free. llvm-svn: 359055
* Fixes in creduce-clang-crash.py for clang crash message parsing and reading ↵Amy Huang2019-04-241-4/+9
| | | | | | the command from the repro script. llvm-svn: 359054
* [Remarks] Fix documentation indentationFrancis Visoiu Mistrih2019-04-241-5/+4
| | | | | | | | Fix the documentation bot: http://lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/30450/steps/docs-llvm-html/logs/stdio llvm-svn: 359053
* [Docs] Fix link to C++ docsJonas Devlieghere2019-04-242-2/+3
| | | | | | ... and add a redirect for the old URL. llvm-svn: 359052
* Add missing diagnostic for anonymous struct/union definitions that don'tRichard Smith2019-04-2412-27/+40
| | | | | | introduce any names. llvm-svn: 359051
OpenPOWER on IntegriCloud