summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [lldb][NFC] Return a reference from ClangASTContext::getASTContext and ↵Raphael Isemann2019-12-2118-735/+682
| | | | | | | | | | | remove dead nullptr checks ClangASTContext::getASTContext() currently returns a ptr but we have an assert there since a while that the ASTContext is not a nullptr. This causes that we still have a lot of code that is doing nullptr checks on the result of getASTContext() which is all unreachable code. This patch changes the return value to a reference to make it clear this can't be a nullptr and deletes all the nullptr checks.
* [Lldb/Lua] Generate Lua BindingsJonas Devlieghere2019-12-218-28/+107
| | | | | | | | | | | This patch uses SWIG to generate the Lua bindings for the SB API. It covers most of the API, but some methods require a type map similar to Python. Discussion on the mailing list: http://lists.llvm.org/pipermail/lldb-dev/2019-December/015812.html Differential revision: https://reviews.llvm.org/D71235
* [analyzer] exploded-graph-rewriter: Fix string encodings in python3.Artem Dergachev2019-12-211-1/+5
| | | | | | | | Makes sure that the script works fine both in python2 and python3. Patch by Pavel Samolysov! Differential Revision: https://reviews.llvm.org/D71746
* [NFC] test commit revertedStepan Dyatkovskiy2019-12-211-1/+0
|
* [NFC] test commitStepan Dyatkovskiy2019-12-211-0/+1
|
* [lld][RISCV] Use an e_flags of 0 if there are only binary input files.John Baldwin2019-12-212-1/+12
| | | | | | | | | | | | | | | | | | Summary: If none of the input files are ELF object files (for example, when generating an object file from a single binary input file via "-b binary"), use a fallback value for the ELF header flags instead of crashing with an assertion failure. Reviewers: MaskRay, ruiu, espindola Reviewed By: MaskRay, ruiu Subscribers: kevans, grimar, emaste, arichardson, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits, jrtc27 Tags: #llvm Differential Revision: https://reviews.llvm.org/D71101
* Fix "result of 32-bit shift implicitly converted to 64 bits" warning. NFC.Simon Pilgrim2019-12-211-1/+1
|
* Fix Wpedantic 'extra semicolon' warning. NFC.Simon Pilgrim2019-12-211-1/+1
|
* Fix `-Wunused-variable` warning. NFC.Michael Liao2019-12-211-1/+1
|
* [InstCombine] check alloc size in bitcast of geps fold (PR44321)Sanjay Patel2019-12-212-12/+34
| | | | | | | | | | We missed a constraint in D44833 when folding a bitcast into a GEP with vector/array types. If the alloc sizes specified by the datalayout don't match, this could miscompile as shown in: https://bugs.llvm.org/show_bug.cgi?id=44321 Differential Revision: https://reviews.llvm.org/D71771
* [SimplifyLibCalls] require fast-math-flags for pow(X, -0.5) transformsSanjay Patel2019-12-212-14/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | As discussed in PR44330: https://bugs.llvm.org/show_bug.cgi?id=44330 ...the transform from pow(X, -0.5) libcall/intrinsic to reciprocal square root can result in small deviations from the expected result due to differences in the pow() implementation and/or the extra rounding step from the division. This patch proposes to allow that difference with either the 'approximate functions' or 'reassociate' FMF: http://llvm.org/docs/LangRef.html#fast-math-flags In practice, this likely means that the code is compiled with all of 'fast' (-ffast-math), but I have preserved the existing specializations for -0.0/-INF that enable generating safe code if those special values are allowed simultaneously with allowing approximation/reassociation. The question about whether a similar restriction is needed for the non-reciprocal case -- pow(X, 0.5) -- is deferred. That transform is allowed without FMF currently, and this patch does not change that behavior. Differential Revision: https://reviews.llvm.org/D71706
* [lldb][NFC] Remove all ASTContext getter wrappers from ClangASTContextRaphael Isemann2019-12-217-120/+59
| | | | | | | | | | | | Their naming is misleading as they only return the ClangASTContext-owned variables. For ClangASTContext instances constructed for a given clang::ASTContext they silently generated duplicated instances (e.g., a second IdentifierTable) that were essentially unusable. This removes all these getters as they are anyway not very useful in comparison to just calling the clang::ASTContext getters. The initialization code has been moved to the CreateASTContext initialization method so that all code for making our own clang::ASTContext is in one place.
* [AArch64] Respect reserved registers while renaming in LdSt opt.Florian Hahn2019-12-212-1/+93
| | | | | | We cannot pick reserved registers as rename registers. Fixes https://bugs.llvm.org/show_bug.cgi?id=44358
* [Analyzer] Use a reference in a range-based forMark de Wever2019-12-213-15/+15
| | | | | | | | This avoids unneeded copies when using a range-based for loops. This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D70869
* [Wdocumentation] Implement \anchorMark de Wever2019-12-2115-10/+80
| | | | Differential revision: https://reviews.llvm.org/D69223
* [lldb] disable thread-step-out-ret-addr-check on windowsPavel Labath2019-12-211-0/+1
| | | | I'm unable to get this test working there.
* [lldb] One more attempt to fix thread-step-out-ret-addr-check on windowsPavel Labath2019-12-211-0/+1
|
* Add missing `REQUIRES: hexagon-registered-target`David Zarzycki2019-12-211-0/+1
| | | | | After d567b0ba841d4b6f4b0d906da350a3bb2b2f769f, the test suite no longer passes if hexagon is disabled.
* [lldb] Force the preprocessor to run in thread-step-out-ret-addr-check.testPavel Labath2019-12-211-1/+1
| | | | It does not seem to run automatically on windows.
* Customize simplified dumping and matching of LambdaExprStephen Kelly2019-12-214-10/+223
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71680
* [lldb] Fix -Wstringop-truncation in PythonReadline.cppPavel Labath2019-12-211-1/+1
| | | | | The size is known and the truncation is deliberate -- use memcpy instead of strncpy.
* [lldb] [testsuite] Fix Linux fail: Unwind/thread-step-out-ret-addr-check.testJan Kratochvil2019-12-212-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | D71372 introduced: `Unwind/thread-step-out-ret-addr-check.test` failing on Fedora 30 Linux x86_64. [lldb] Add additional validation on return address in 'thread step-out' https://reviews.llvm.org/D71372 One problem is the underscored `_nonstandard_stub` in the `.s` file but not in the LLDB command: (lldb) breakpoint set -n nonstandard_stub Breakpoint 1: no locations (pending). WARNING: Unable to resolve breakpoint to any actual locations. (lldb) process launch Process 21919 exited with status = 0 (0x00000000) Process 21919 launched: '/home/jkratoch/redhat/llvm-monorepo-clangassert/tools/lldb/test/Unwind/Output/thread-step-out-ret-addr-check.test.tmp' (x86_64) (lldb) thread step-out error: invalid thread (lldb) _ Another problem is that Fedora Linux has executable stack by default and all programs indicate non-executable stack by `PT_GNU_STACK`, after fixing the underscore I was getting: (lldb) thread step-out Process 22294 exited with status = 0 (0x00000000) (lldb) _ A different approach was tried as: [lldb] Refactor thread-step-out-ret-addr-check test to use .data instead of stack variable https://reviews.llvm.org/D71789 Differential revision: https://reviews.llvm.org/D71784
* [lldb] Fix ARM32 inferior callsJan Kratochvil2019-12-216-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | echo -e '#include <unistd.h>\nint main(void){\nsync();return 0;}'|./bin/clang -g -x c -;./bin/lldb -o 'file ./a.out' -o 'b main' -o r -o 'p (void)sync()' Actual: error: Expression can't be run, because there is no JIT compiled function Expected: <nothing, sync() has been executed> This patch has been checked by: D71707: clang-tidy: new bugprone-pointer-cast-widening https://reviews.llvm.org/D71707 Casting from 32-bit `void *` to `uint64_t` requires an intermediate `uintptr_t` cast otherwise the pointer gets sign-extended: echo -e '#include <stdio.h>\n#include <stdint.h>\nint main(void){void *p=(void *)0x80000000;unsigned long long ull=(unsigned long long)p;unsigned long long ull2=(unsigned long long)(uintptr_t)p;printf("p=%p ull=0x%llx ull2=0x%llx\\n",p,ull,ull2);return 0;}'|gcc -Wall -m32 -x c -;./a.out <stdin>: In function ‘main’: <stdin>:3:66: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] p=0x80000000 ull=0xffffffff80000000 ull2=0x80000000 With debug output: Actual: IRMemoryMap::WriteMemory (0xb6ff8640, 0xffffffffb6f82158, 0x112) went to [0xb6ff8640..0xb6ff86b3) Code can be run in the target. Found function, has local address 0xffffffffb6f84000 and remote address 0xffffffffffffffff Couldn't disassemble function : Couldn't find code range for function _Z12$__lldb_exprPv Sections: [0xb6f84000+0x3c]->0xb6ff9020 (alignment 4, section ID 0, name .text) ... HandleCommand, command did not succeed error: Expression can't be run, because there is no JIT compiled function Expected: IRMemoryMap::WriteMemory (0xb6ff8640, 0xb6faa15c, 0x128) went to [0xb6ff8640..0xb6ff86c3) IRExecutionUnit::GetRemoteAddressForLocal() found 0xb6fac000 in [0xb6fac000..0xb6fac040], and returned 0xb6ff9020 from [0xb6ff9020..0xb6ff9060]. Code can be run in the target. Found function, has local address 0xb6fac000 and remote address 0xb6ff9020 Function's code range is [0xb6ff9020+0x40] ... Function data has contents: 0xb6ff9020: 10 4c 2d e9 08 b0 8d e2 08 d0 4d e2 00 40 a0 e1 ... Function disassembly: 0xb6ff9020: 0xe92d4c10 push {r4, r10, r11, lr} Differential revision: https://reviews.llvm.org/D71498
* AMDGPU: Fix repeated word in commentMatt Arsenault2019-12-211-1/+1
|
* Mips: Make test resistant to future changesMatt Arsenault2019-12-211-0/+2
| | | | | | | This seems to have been relying on extra spills being inserted in these blocks to increase the code size to trigger branch relaxation. This broke when these spills were avoided. Add some asm to pad the size of the blocks to make it not matter.
* AMDGPU/GlobalISel: Fix misuse of div_scale intrinsicsMatt Arsenault2019-12-212-157/+157
| | | | | | | | | | | Confusingly, the intrinsic operands do not match the instruction/custom node. The order is shuffled, and the 3rd operand is an immediate to select operands. I'm not 100% sure I did this right, but fdiv still doesn't select end to end and it will be easier to tell when it does. This at least avoids an assertion in RegBankSelect and allows hitting the fallback on selection.
* AMDGPU/GlobalISel: Fix missing scc imp-def on scalar and/or/xorMatt Arsenault2019-12-214-56/+61
|
* AMDGPU/GlobalISel: Simplify codeMatt Arsenault2019-12-211-5/+5
| | | | | This can directly access the register bank, and doesn't need to get it through the ID.
* features.html: Remove some old infoSylvestre Ledru2019-12-211-3/+0
|
* clang is now under the apache2 licenseSylvestre Ledru2019-12-212-10/+9
|
* Remove a gcc 4.9 comparison as it doesn't make senseSylvestre Ledru2019-12-211-8/+2
|
* [libc++] Fix typo in std::midpointRuslan Baratov2019-12-211-1/+1
| | | | | | Reviewed By: mclow.lists Differential Revision: https://reviews.llvm.org/D71525
* Revert "[msan] Check qsort input." and "[msan] Intercept qsort, qsort_r."Jonas Devlieghere2019-12-203-169/+0
| | | | | | | | | | | | | | Temporarily revert the qsort changes because they fail to build on bots that build with modules: > error: thread-local storage is not supported for the current > target (iossim) http://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/1820/console http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/4983/console This reverts commit ddf897fc80499ece298bc33201db6b697d2af50e. This reverts commit 07861e955d0095f25639d84c5726c73b528567cb.
* [lldb/test] Update !DIModule for isysroot renameJonas Devlieghere2019-12-201-2/+2
| | | | | The isysroot field in DIModule was renamed to sysroot but the test in LLDB wasn't updated. This fixes that.
* [ORC] De-register eh-frames in the RTDyldObjectLinkingLayer destructor.Lang Hames2019-12-202-0/+8
| | | | | This matches the behavior of the legacy layer, which automatically deregistered frames.
* [lldb/test] Skip editline tests when LLDB_ENABLE_LIBEDIT is off.Jonas Devlieghere2019-12-205-0/+8
| | | | | Add a new decorator that checks if LLDB was build with editline support and mark the relevant tests as skipped when that's not the case.
* [lldb] Expose more optional dependencies through GetBuildConfiguration()Jonas Devlieghere2019-12-201-0/+12
| | | | | Expose all the externally-observable optional dependencies through SBDebugger::GetBuildConfiguration().
* [lldb/CMake] Don't use return() from macro()Jonas Devlieghere2019-12-201-4/+7
| | | | | | | | | > A macro is executed as if the macro body were pasted in place of the > calling statement. This has the consequence that a return() in a macro > body does not just terminate execution of the macro After converting from a function() to a macro(), the return() became invalid. This modifies the control flow to elude the return.
* Re-land "[lldb/CMake] Change how we deal with optional dependencies"Jonas Devlieghere2019-12-204-46/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recently there has been some discussion about how we deal with optional dependencies in LLDB. The approach in LLVM is to make things work out of the box. If the dependency isn't there, we move on silently. That's not true for LLDB. Unless you explicitly disable the dependency with LLDB_ENABLE_*, you'll get a configuration-time error. The historical reason for this is that LLDB's dependencies have a much broader impact, think about Python for example which is required to run the test suite. The current approach can be frustrating from a user experience perspective. Sometimes you just want to ensure LLDB builds with a change in clang. This patch changes the optional dependencies (with the exception of Python) to a new scheme. The LLDB_ENABLE_* now takes three values: On, Off or Auto, with the latter being the default. On and Off behave the same as today, forcing the dependency to be enabled or disabled. If the dependency is set to On but is not found, it results in a configuration time warning. For Auto we detect if the dependency is there and either enable or disable it depending on whether it's found. Differential revision: https://reviews.llvm.org/D71306 PS: The reason Python isn't included yet is because it's so pervasive that I plan on doing that in a separate patch.
* hopefully last doc typo fix to cycle botsNico Weber2019-12-201-1/+1
|
* fix yet another doc typo to cycle botsNico Weber2019-12-201-2/+2
|
* fix another doc typo to cycle botsNico Weber2019-12-201-1/+1
|
* fix a doc typo to cycle botsNico Weber2019-12-201-1/+1
|
* Constrain the macho-stabs test added in f72d001e099 to run on systems ↵Michael Trent2019-12-201-0/+1
| | | | | | | | | | | | | | | | configured with an x86 backend. Summary: This fixes a failure on the Builder clang-cmake-armv7-quick bot. Reviewers: lhames, jhenderson Reviewed By: lhames Subscribers: kristof.beyls, rupprecht, seiya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71792
* Add a set of tests with basic coverage of the recently added boundary align ↵Philip Reames2019-12-201-0/+110
| | | | | | feature. There are tests in the included patch, but the duplication is non obvious, so I'm starting with basic coverage beore cleaning up a few of them
* gn build: Silence mismatched-new-delete warning in scudo C++ wrapper tests.Peter Collingbourne2019-12-201-0/+4
| | | | | | | These tests are deliberately mismatching new and delete, so the warnings are just noise. Differential Revision: https://reviews.llvm.org/D71783
* [NFC][MachineOutliner] Rewrite setSuffixIndices to be iterativeJessica Paquette2019-12-201-18/+25
| | | | | | | | Having this function be recursive could use up way too much stack space. Rewrite it as an iterative traversal in the tree instead to prevent this. Fixes PR44344.
* [X86] Add test cases for missing propagation of fpexcept flag on strict fp ↵Craig Topper2019-12-203-0/+191
| | | | | | | operations. NFC The flag is being lost during type legalization or lowering. This covers some of the cases. I'm sure there are many missing.
* [llvm-symbolizer] Prefix invocations in test with envPetr Hosek2019-12-201-2/+2
| | | | | This addresses an issue introduced in dedad08 and is needed to make sure this test works properly on Windows.
* Revert "[lldb/CMake] Change how we deal with optional dependencies"Jonas Devlieghere2019-12-203-47/+44
| | | | This is failing on both the Windows and Debian bot.
OpenPOWER on IntegriCloud