summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [winasan] Fix strrchr interception with vs2019 CRTReid Kleckner2019-04-041-0/+2
| | | | | | | | | | | | | | strrchr in vs2019 CRT begins with unrecognized instructions. VCRUNTIME140!strrchr: 4533c9 xor r9d, r9d 4c8bc1 mov r8, rcx Patch by Christopher Reid! Differential Revision: https://reviews.llvm.org/D60217 llvm-svn: 357725
* Make SourceManager::createFileID(UnownedTag, ...) take a const ↵Nico Weber2019-04-0413-44/+51
| | | | | | | | | | | | | | | | | | | | | llvm::MemoryBuffer* Requires making the llvm::MemoryBuffer* stored by SourceManager const, which in turn requires making the accessors for that return const llvm::MemoryBuffer*s and updating all call sites. The original motivation for this was to use it and fix the TODO in CodeGenAction.cpp's ConvertBackendLocation() by using the UnownedTag version of createFileID, and since llvm::SourceMgr* hands out a const llvm::MemoryBuffer* this is required. I'm not sure if fixing the TODO this way actually works, but this seems like a good change on its own anyways. No intended behavior change. Differential Revision: https://reviews.llvm.org/D60247 llvm-svn: 357724
* Fix some MCTargetOptions Doxygen comments (NFC)Scott Linder2019-04-041-9/+9
| | | | llvm-svn: 357723
* [OpenMP] Fix hang on WindowsJonathan Peyton2019-04-041-21/+46
| | | | | | | | | | | | | | | | | | | | | | | | Debug dump on large machine shows when many OpenMP threads (401 in total) sleep on a barrier, one of the innermost nesting levels sleeps on a child's b_arrived flag whose value is equal to 4 and is equal to checker value. i.e., (1) sleep bit is 0, and (2) done_check() would return true if called. It is unclear how this might happen. It could be Windows Server 2016's error of EnterCriticalSection / LeaveCriticalSection, or error of WaitForSingleObject / SetEvent / ResetEvent, or error in the library which is very difficult to find. As a workaround, change INFINITE wait to timed wait, so that each thread awakens each 5 seconds (the timeout was chosen arbitrary to not disturb other threads much), check flag condition under the lock, and either go to sleep again or stop sleeping as a result of the check. Patch by Andrey Churbanov Differential Revision: https://reviews.llvm.org/D59793 llvm-svn: 357722
* Special case ObjCPropertyDecl for printingDavid Goldman2019-04-042-1/+47
| | | | | | | | ObjCPropertyDecl should use the category interface as a context similar to what is done for methods. Previously category methods would be printed as `::property`; now they are printed as `Class::property`. llvm-svn: 357720
* check-clang-tools: Actually build and run XPC testNico Weber2019-04-042-3/+3
| | | | | | | | | | | | | | The CMake variable controlling if XPC code is built is called CLANGD_BUILD_XPC but three places unintentionally checked the non-existent variable CLANGD_BUILD_XPC_SUPPORT instead, which (due to being nonexistent, and due to cmake) always silently evaluated to false. Luckily the test still seems to pass, despite never running after being added almost 3 months ago in r351280. Differential Revision: https://reviews.llvm.org/D60120 llvm-svn: 357719
* Revert [X86] When using Win64 ABI, exit with error if SSE is disabled for ↵James Y Knight2019-04-042-20/+0
| | | | | | | | | | | | | | | varargs It unnecessarily breaks previously-working code which used varargs, but didn't pass any float/double arguments (such as EDK2). Also revert the fixup on top of that: Revert [X86] Fix a test from r357317 This reverts r357317 (git commit d413f41de6baf500e5d20c638375447e18777db2) This reverts r357380 (git commit 7af32444b9b17719ebabb6bee6eb52465acc8507) llvm-svn: 357718
* [OPENMP]Add codegen for task reduction vars with allocate clause, NFC.Alexey Bataev2019-04-042-2/+22
| | | | | | Added test for the task reduction variables with the allocate clause. llvm-svn: 357717
* Appease STLs where std::atomic<void*> lacks a constexpr default ctorReid Kleckner2019-04-042-5/+3
| | | | | | | | MSVC 2019 casts the pointer to a pointer-sized integer, which is a reinterpret_cast, which is invalid in a constexpr context, so I have to remove the LLVM_REQUIRES_CONSTANT_INITIALIZATION annotation for now. llvm-svn: 357716
* [WebAssembly] Apply data relocations at runtime in shared objectsSam Clegg2019-04-0411-43/+192
| | | | | | | | | | | | | See: https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md Data section relocations in wasm shared libraries are applied by the library itself at static constructor time. This change adds a new synthetic function that applies relocations to relevant memory locations on startup. Differential Revision: https://reviews.llvm.org/D59278 llvm-svn: 357715
* Ensure that ManagedStatic is constant initialized in MSVC 2017 & 2019Reid Kleckner2019-04-043-4/+37
| | | | | | | | | | | | | | | | | | | Fixes PR41367. This effectively relands r357655 with a workaround for MSVC 2017. I tried various approaches with unions, but I ended up going with this ifdef approach because it lets us write the proper C++11 code that we want to write, with a separate workaround that we can delete when we drop MSVC 2017 support. This also adds LLVM_REQUIRE_CONSTANT_INITIALIZATION, which wraps [[clang::require_constant_initialization]]. This actually detected a minor issue when using clang-cl where clang wasn't able to use the constexpr constructor in MSVC's STL, so I switched back to using the default ctor of std::atomic<void*>. llvm-svn: 357714
* Verify that Android targets generate DWARF 4 by default.Stephen Hines2019-04-041-1/+7
| | | | | | | | | | | | | | | | | | | | | Summary: In the future, Android releases will support DWARF 5, but we need to ensure that older targets only have DWARF 4 generated for them. This patch inserts that verification for all Android releases now. The patch also fixes 2 minor mistakes (a mistakenly moved RUN line, and the missing G_DWARF2 check label). Reviewers: aprantl Reviewed By: aprantl Subscribers: chh, pirama, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60238 llvm-svn: 357713
* [OPENMP]Add codegen for linear vars with allocate clause, NFC.Alexey Bataev2019-04-041-3/+16
| | | | | | Added test for the linear variables with the allocate clause. llvm-svn: 357712
* Move the alias definition of unw_getcontext to within ↵Martin Storsjo2019-04-041-1/+2
| | | | | | | | | | | | !defined(__USING_SJLJ_EXCEPTIONS__) For builds with SJLJ, there is no __unw_getcontext symbol. On Windows, the weak alias macro also expands to a dllexport directive, which fails if the symbol doesn't exist. Differential Revision: https://reviews.llvm.org/D60251 llvm-svn: 357711
* [WebAssembly] Add new explicit relocation types for PIC relocationsSam Clegg2019-04-0414-51/+200
| | | | | | | | See https://github.com/WebAssembly/tool-conventions/pull/106 Differential Revision: https://reviews.llvm.org/D59907 llvm-svn: 357710
* [llvm-objcopy] [llvm-symbolizer] Fix failing testsDon Hinton2019-04-042-10/+16
| | | | | | | | | | | | | | | | Summary: Fix failing tests that matched substrings in path. Reviewers: evgeny777, mattd, espindola, alexshap, rupprecht, jhenderson Reviewed By: jhenderson Subscribers: Bulletmagnet, emaste, arichardson, jakehehrlich, MaskRay, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60170 llvm-svn: 357709
* [OPENMP]Fix lookup of the user-defined reductions in C.Alexey Bataev2019-04-042-11/+26
| | | | | | Fixed the regression of the lookup of user-defined reductions for C. llvm-svn: 357708
* [TSan][libdispatch] Specify libdispatch header dir for lit testsJulian Lettner2019-04-043-11/+14
| | | | | | | | | Specify libdispatch header dir (include path) for lit tests. This is the last missing piece in order to run the libdispatch tests on Linux even when libdispatch is installed in a custom path instead of a default (system) location. llvm-svn: 357707
* llvm-dwarfdump: Support alternative architecture names in the -arch filterAdrian Prantl2019-04-043-7/+30
| | | | | | <rdar://problem/47918606> llvm-svn: 357706
* Handle TLS values in sym_checkEric Fiselier2019-04-041-1/+1
| | | | llvm-svn: 357705
* [x86] eliminate unnecessary broadcast of horizontal opSanjay Patel2019-04-042-5/+14
| | | | | | | This is another pattern that comes up if we more aggressively scalarize FP ops. llvm-svn: 357703
* [RISCV] Fix rL357699 by adding missing zero-length filesAlex Bradbury2019-04-043-0/+0
| | | | | | svn add doesn't play very nicely here... llvm-svn: 357702
* [llvm] [cmake] Add additional headers only if they existMichal Gorny2019-04-041-1/+9
| | | | | | | | | | | Modify the add_header_files_for_glob() function to only add files that do exist, rather than all matches of the glob. This fixes CMake error when one of the include directories (which happen to include /usr/include) contain broken symlinks. Differential Revision: https://reviews.llvm.org/D59632 llvm-svn: 357701
* Updating Chromium's Java import orderNico Weber2019-04-041-3/+10
| | | | | | | | | | Adding in androidx as another import group. Differential Revision: https://reviews.llvm.org/D60203 Patch from Sam Maier <smaier@chromium.org>! llvm-svn: 357700
* [RISCV] Collect library directories and triples for riscv64 triple tooAlex Bradbury2019-04-044-6/+113
| | | | | | | | | | | | When setting up library and tools paths when detecting an accompanying GCC installation only riscv32 was handled. As a consequence when targetting riscv64 neither the linker nor libraries would be found. This adds handling and tests for riscv64. Differential Revision: https://reviews.llvm.org/D53392 Patch by Edward Jones. llvm-svn: 357699
* [RISCV] Support assembling TLS add and associated modifiersLewis Revill2019-04-0415-34/+263
| | | | | | | | | | This patch adds support in the MC layer for parsing and assembling the 4-operand add instruction needed for TLS addressing. This also involves parsing the %tprel_hi, %tprel_lo and %tprel_add operand modifiers. Differential Revision: https://reviews.llvm.org/D55341 llvm-svn: 357698
* [COFF] Fix delay import directory iteratorJoseph Tremoulet2019-04-044-1/+237
| | | | | | | | | | | | | | | | | | Summary: Take the Index into account in `getDelayImportTable`, otherwise we always return the entry for the first delay DLL reference. Reviewers: ruiu Reviewed By: ruiu Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60081 llvm-svn: 357697
* Fix clangd-fuzzer buildNico Weber2019-04-042-2/+6
| | | | | | | | | r357102 made clangd-fuzzer no longer compile, but before r357654 / r357694 we didn't notice. Fix the compile. Also add a dep on FuzzMutate which I forgot to do in r357654. llvm-svn: 357696
* [clang-format] Preserve include blocks in ObjC Google styleKrasimir Georgiev2019-04-042-0/+17
| | | | | | | | | | | | | | | | | | Summary: r357567 started to regroup include block for Google style; it was meant to apply only for C++. This patch reverts this for ObjC. Reviewers: ioeric Reviewed By: ioeric Subscribers: thakis, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60263 llvm-svn: 357695
* Use a cmake check for linux that actually works.Nico Weber2019-04-041-1/+1
| | | | llvm-svn: 357694
* [RISCV][NFC] s/riscv32-linux-unknown-elf/riscv32-unknown-linux-gnu in ↵Alex Bradbury2019-04-041-2/+2
| | | | | | | | | | test/Driver/riscv32-toolchain.c riscv32-linux-unknown-elf was a weird thing to test for as it doesn't match the triple used in any common RISC-V toolchain distributions (e.g. riscv-gnu-toolchain scripts produce riscv{32,64}-unknown-linux-gnu). llvm-svn: 357693
* Try to suppress nodiscard_extension failures with Xcode 9Nico Weber2019-04-042-0/+8
| | | | | | See https://crbug.com/949509 for the error message. llvm-svn: 357692
* Breakpad: Refine record classification codePavel Labath2019-04-047-38/+76
| | | | | | | | | | | | | | | | | Previously we would classify all STACK records into a single bucket. This is not really helpful, because there are three distinct types of records beginning with the token "STACK" (STACK CFI INIT, STACK CFI, STACK WIN). To be consistent with how we're treating other records, we should classify these as three different record types. It also implements the logic to put "STACK CFI INIT" and "STACK CFI" records into the same "section" of the breakpad file, as they are meant to be read together (similar to how FUNC and LINE records are treated). The code which performs actual parsing of these records will come in a separate patch. llvm-svn: 357691
* [clangd] Test #import directive go-to-definition. NFCSam McCall2019-04-041-0/+12
| | | | llvm-svn: 357690
* [clangd] Stop passing around PCHContainerOperations, just create it in ↵Sam McCall2019-04-0414-90/+52
| | | | | | place. NFC llvm-svn: 357689
* [SystemZ] Bugfix in isFusableLoadOpStorePattern()Jonas Paulsson2019-04-042-15/+50
| | | | | | | | | | | | | | | | | | | | | This function is responsible for checking the legality of fusing an instance of load -> op -> store into a single operation. In the SystemZ backend the check was incomplete and a test case emerged with a cycle in the instruction selection DAG as a result. Instead of using the NodeIds to determine node relationships, hasPredecessorHelper() now is used just like in the X86 backend. This handled the failing tests and as well gave a few additional transformations on benchmarks. The SystemZ isFusableLoadOpStorePattern() is now a very near copy of the X86 function, and it seems this could be made a utility function in common code instead. Review: Ulrich Weigand https://reviews.llvm.org/D60255 llvm-svn: 357688
* [yaml2obj] - Check we correctly set the sh_info field of .symtab section.George Rimar2019-04-041-0/+36
| | | | | | | | | | | | initSymtabSectionHeader has the following line: SHeader.sh_info = findLocalsNum(Symbols) + 1; As was mentioned in a review comments for D60122, it is never tested. The patch adds a test. Differential revision: https://reviews.llvm.org/D60192 llvm-svn: 357687
* [CodeComplete] Fix crash when completing ObjC block parameter with a broken typeSam McCall2019-04-042-0/+17
| | | | | | | | | | | | | | | | | | | Summary: The fix isn't great, but it's hard to fix properly because the completion code sensibly uses ParmVarDecl to represent parameters, but the AST-building code sensibly doesn't synthesize them if the type is broken. Also this case is apparently really rare, so it's probably not worth bending over backwards for. Reviewers: ilya-biryukov Subscribers: javed.absar, kristof.beyls, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60258 llvm-svn: 357686
* Revert rL357655 and rL357656 from llvm/trunk:Simon Pilgrim2019-04-041-8/+3
| | | | | | | | | | | | | Fix minor innaccuracy in previous comment on ManagedStaticBase ........ Make ManagedStatic constexpr constructible Apparently it needs member initializers so that it can be constructed in a constexpr context. I explained my investigation of this in PR41367. ........ Causes vs2017 debug llvm-tblgen to fail with "Unknown command line argument" errors - similar to the vs2019 error discussed on PR41367 without the patch.... llvm-svn: 357685
* [PR41157][OpenCL] Prevent implicit init of local addr space var in C++ mode.Anastasia Stulova2019-04-043-5/+27
| | | | | | | | | | | Prevent adding initializers implicitly to variables declared in local address space. This happens when they get converted into global variables and therefore theoretically have to be default initialized in C++. Differential Revision: https://reviews.llvm.org/D59646 llvm-svn: 357684
* [Symbolize] Keep SymbolDescs with the same address and improve ↵Fangrui Song2019-04-042-3/+6
| | | | | | | | getNameFromSymbolTable heuristic I'll follow up with better heuristics or tests. llvm-svn: 357683
* [PR41276] Fixed incorrect generation of addr space cast for 'this' in C++.Anastasia Stulova2019-04-047-26/+49
| | | | | | | | | | | | | | | Improved classification of address space cast when qualification conversion is performed - prevent adding addr space cast for non-pointer and non-reference types. Take address space correctly from the pointee. Also pass correct address space from 'this' object using AggValueSlot when generating addrspacecast in the constructor call. Differential Revision: https://reviews.llvm.org/D59988 llvm-svn: 357682
* [ARM GlobalISel] Support DBG_VALUEDiana Picus2019-04-043-0/+120
| | | | | | Make sure we can map and select DBG_VALUE. llvm-svn: 357681
* modify-python-lldb.py: (Re)move __len__ and __iter__ supportPavel Labath2019-04-044-106/+27
| | | | | | | | | | | | | | | | Summary: This patch moves the modify-python-lldb code for adding new functions to the SBModule class into the SBModule interface file. As this is the last class using this functionality, I also remove all support for this kind of modifications from modify-python-lldb.py. Reviewers: amccarth, clayborg, jingham Subscribers: zturner, lldb-commits Differential Revision: https://reviews.llvm.org/D60195 llvm-svn: 357680
* [SLP][X86] Regenerate operandorder tests with arguments on same line. NFCI.Simon Pilgrim2019-04-041-25/+8
| | | | | | Stops update_test_checks.py from splitting the later arguments after the CHECKs. llvm-svn: 357679
* Add dropped ManualDWARFIndex assert()Jan Kratochvil2019-04-041-0/+3
| | | | | | | | D47253 dropped this assertion. Differential Revision: https://reviews.llvm.org/D60254 llvm-svn: 357678
* [AArch64][AsmParser] Fix .arch_extension directive parsingSander de Smalen2019-04-047-20/+156
| | | | | | | | | | | | | | | | | | This patch fixes .arch_extension directive parsing to handle a wider range of architecture extension options. The existing parser was parsing extensions as an identifier which breaks for extensions containing a "-", such as the "tlb-rmi" extension. The extension is now parsed as a string. This is consistent with the extension parsing in the .arch and .cpu directive parsing. Patch by Cullen Rhodes (c-rhodes) Reviewed By: SjoerdMeijer Differential Revision: https://reviews.llvm.org/D60118 llvm-svn: 357677
* [llvm-symbolizer] Allow more flexible usage of -e.Igor Kudrin2019-04-043-4/+8
| | | | | | | | | | | | | | | | addr2line allows -e to be grouped with other options; it also allows it to prefix the value. Thus, all the following usages are possible: * addr2line -f -e <bin> <addr> * addr2line -fe <bin> <addr> * addr2line -f e<bin> <addr> * addr2line -fe<bin> <addr> This patch adds the same for llvm-symbolizer. Differential Revision: https://reviews.llvm.org/D60196 llvm-svn: 357676
* [llvm-symbolizer] Add `--output-style` switch.Igor Kudrin2019-04-044-4/+32
| | | | | | | | | | | | | In general, llvm-symbolizer follows the output style of GNU's addr2line. However, there are still some differences; in particular, for a requested address, llvm-symbolizer prints line and column, while addr2line prints only the line number. This patch adds a new switch to select the preferred style. Differential Revision: https://reviews.llvm.org/D60190 llvm-svn: 357675
* [InstCombine] Combine no-wrap sub and icmp w/ constant.Luqman Aden2019-04-042-9/+14
| | | | | | | | | | | | | | | | Teach InstCombine the transformation `(icmp P (sub nuw|nsw C2, Y), C) -> (icmp swap(P) Y, C2-C)` Reviewers: majnemer, apilipenko, sanjoy, spatel, lebedev.ri Reviewed By: lebedev.ri Subscribers: dmgreen, lebedev.ri, nikic, hiraditya, JDevlieghere, jfb, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59916 llvm-svn: 357674
OpenPOWER on IntegriCloud