summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [libc++] Fix memory leaks when throwing inside std::vector constructorsllvmorg-15.0.7release/15.xNikolas Klauser2023-01-113-36/+453
| | | | | | | | | | Fixes #58392 Reviewed By: ldionne, #libc Spies: alexfh, hans, joanahalili, dblaikie, libcxx-commits Differential Revision: https://reviews.llvm.org/D138601
* libc++: bring back the unsigned in the return type in wcstoull_lSylvestre Ledru2023-01-111-1/+1
| | | | | | | | | got remove here: https://github.com/llvm/llvm-project/commit/67b0b02ec9f2bbc57bf8f0550828d97f460ac11f#diff-e41832b8aa26da45585a57c5111531f2e1d07e91a67c4f8bf1cd6d566ae45a2bR42 Differential Revision: https://reviews.llvm.org/D141208 (cherry picked from commit fc87452916c0d8759625aad65e9335778ce9cc68)
* [RegAllocFast] Handle new debug values for spillsJosh Stone2023-01-112-0/+253
| | | | | | | | | | | | | | | | These new debug values get inserted after the place where the spill happens, which means they won't be reached by the reverse traversal of basic block instructions. This would crash or fail assertions if they contained any virtual registers to be replaced. We can manually handle the new debug values right away to resolve this. Fixes https://github.com/llvm/llvm-project/issues/59172 Reviewed By: StephenTozer Differential Revision: https://reviews.llvm.org/D139590 (cherry picked from commit 87f57f459e7acbb00a6ca4ee6dec6014c5a97e07)
* [wasm-ld] Define a `__heap_end` symbol marking the end of allocated memory.Dan Gohman2023-01-106-11/+32
| | | | | | | | | Define a `__heap_end` symbol that marks the end of the memory region that starts at `__heap_base`. This will allow malloc implementations to know how much memory they can use at `__heap_base` even if someone has done a `memory.grow` before they can initialize their state. Differential Revision: https://reviews.llvm.org/D136110
* [TypePromotion] Add truncate in ConvertTruncs when the original truncate ↵chenglin.bi2023-01-103-26/+38
| | | | | | | | | | | | | | | | type is not extend type If the src type is not extend type, after convert the truncate to and we need to truncate the and also to make sure the all user is legal. The old fix D137613 doesn't work when the truncate convert to and have the other users. So this time I try to add the truncate after and to avoid all these potential issues. Fix: #59554 Reviewed By: samparker Differential Revision: https://reviews.llvm.org/D140869 (cherry picked from commit a0b470c9848c638e86f97eca53063642e07cea67)
* [X86] Don't zero out %eax if both %al and %ah are usedBill Wendling2023-01-092-1/+119
| | | | | | | | | | | | | The iterator over super and sub registers doesn't include both 8-bit registers in its list. So if both registers are used and only one of them is live on return, then we need to make sure that the other 8-bit register is also marked as live and not zeroed out. Reviewed By: nickdesaulniers Differential Revision: https://reviews.llvm.org/D139679 (cherry picked from commit 14d4cddc5506fb0fd3c4ac556b4edd970aa151eb)
* Bump version to 15.0.7Tom Stellard2023-01-068-11/+11
|
* [CodeGen][ARM] Fix ARMABIInfo::EmitVAAarg crash with empty record type ↵llvmorg-15.0.6yronglin2022-11-292-4/+27
| | | | | | | | | | | | | | variadic arg Fix ARMABIInfo::EmitVAAarg crash with empty record type variadic arg Open issue: https://github.com/llvm/llvm-project/issues/58794 Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D138137 (cherry picked from commit 80f444646c62ccc8b2399d60ac91e62e6e576da6)
* [ELF] Handle GCC collect2 -plugin-opt= on WindowsBrett Werling2022-11-292-3/+8
| | | | | | | | | | | | Follows up on commit cd5d5ce235081005173566c99c592550021de058 by additionally ignoring relative paths ending in "lto-wrapper.exe" as can be the case for GCC cross-compiled for Windows. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D138065 (cherry picked from commit cf4f35b78871aecc21e663067c57e60595bd7197)
* Revert "Reapply: Add an error message to the default SIGPIPE handler"Bill Wendling2022-11-232-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | This patch is spamming compiles with unhelpful and confusing messages. E.g. the Linux kernel uses "grep -q" in several places. It's meant to quit with a return code of zero when the first match is found. This can cause a SIGPIPE signal, but that's expected, and there's no way to turn this error message off to avoid spurious error messages. UNIX03 apparently doesn't require printing an error message on SIGPIPE, but specifically when there's an error on the stdout stream in a normal program flow, e.g. when SIGPIPE trap is disabled. A separate patch is planned to address the specific case we care most about (involving llvm-nm). This reverts commit b89bcefa6202e310eb3167dd1c37f1807377ec8d. Link: https://github.com/llvm/llvm-project/issues/59037 Link: https://github.com/ClangBuiltLinux/linux/issues/1651 Differential Revision: https://reviews.llvm.org/D138244 (cherry picked from commit 4787efa38066adb51e2c049499d25b3610c0877b)
* Bump version to 15.0.6Tom Stellard2022-11-218-11/+11
|
* Bump version to 15.0.5llvmorg-15.0.5Tom Stellard2022-11-158-11/+11
|
* [VectorUtils] Skip interleave members with diff type and alloca sizes.Florian Hahn2022-11-152-1/+147
| | | | | | | | | Currently, codegen doesn't support cases where the type size doesn't match the alloc size. Skip them for now. Fixes #58722. (cherry picked from commit 758699c39984296f20a4dac44c6892065601c4cd)
* [lldb] Get rid of __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROSserge-sans-paille2022-11-152-5/+0
| | | | | | | | | | C++11 made the use of these macro obsolete, see https://sourceware.org/bugzilla/show_bug.cgi?id=15366 As a side effect this prevents https://github.com/swig/swig/issues/2193. Differential Revision: https://reviews.llvm.org/D134877 (cherry picked from commit 81fc5f7909a4ef5a8d4b5da2a10f77f7cb01ba63)
* [lldb] Fix 'error: non-const lvalue...' caused by SWIG 4.1.0Jitka Plesnikova2022-11-151-1/+1
| | | | | | | | Fix the failure caused by change in SwigValueWraper for C++11 and later for improved move semantics in SWIG commit. https://github.com/swig/swig/commit/d1055f4b3d51cb8060893f8036846ac743302dab (cherry picked from commit f0a25fe0b746f56295d5c02116ba28d2f965c175)
* [GlobalOpt] Don't remove inalloca from varargs functionsArthur Eubanks2022-11-152-1/+39
| | | | | | | | | | | | | | Varargs and inalloca have a weird interaction where varargs are actually passed via the inalloca alloca. Removing inalloca breaks the varargs because they're still not passed as separate arguments. Fixes #58718 Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D137182 (cherry picked from commit 8c49b01a1ee051ab2c09be4cffc83656ccc0fbe6)
* [analyzer] Workaround crash on encountering Class non-type template parametersBalazs Benics2022-11-152-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Clang Static Analyzer will crash on this code: ```lang=C++ struct Box { int value; }; template <Box V> int get() { return V.value; } template int get<Box{-1}>(); ``` https://godbolt.org/z/5Yb1sMMMb The problem is that we don't account for encountering `TemplateParamObjectDecl`s within the `DeclRefExpr` handler in the `ExprEngine`. IMO we should create a new memregion for representing such template param objects, to model their language semantics. Such as: - it should have global static storage - for two identical values, their addresses should be identical as well http://eel.is/c%2B%2Bdraft/temp.param#8 I was thinking of introducing a `TemplateParamObjectRegion` under `DeclRegion` for this purpose. It could have `TemplateParamObjectDecl` as a field. The `TemplateParamObjectDecl::getValue()` returns `APValue`, which might represent multiple levels of structures, unions and other goodies - making the transformation from `APValue` to `SVal` a bit complicated. That being said, for now, I think having `Unknowns` for such cases is definitely an improvement to crashing, hence I'm proposing this patch. Reviewed By: xazax.hun Differential Revision: https://reviews.llvm.org/D135763 (cherry picked from commit b062ee7dc4515b0a42157717105839627d5542bb)
* Link libclangBasic against libatomic when necessary.Sam James2022-11-102-0/+5
| | | | | | | | | | | | | | This is necessary at least on PPC32. Depends on D136280. Bug: https://bugs.gentoo.org/874024 Thanks-to: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Tested-by: erhard_f@mailbox.org <erhard_f@mailbox.org> Differential Revision: https://reviews.llvm.org/D136282 (cherry picked from commit 20132d8eaa68a6c53e152718beda1dc0f4c9ff6c)
* Link liblldCOFF against libatomic when necessarySam James2022-11-102-7/+3
| | | | | | | | | | | | | | Also simplify code for liblldCommon using the new LLVM_ATOMIC_LIB variable. Depends on D136280. Bug: https://bugs.gentoo.org/832675 Thanks-to: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Tested-by: erhard_f@mailbox.org <erhard_f@mailbox.org> Differential Revision: https://reviews.llvm.org/D136281 (cherry picked from commit f0b451c77f14947e3e7d314f048679fa2f5c6298)
* Set LLVM_ATOMIC_LIB variable for convenient linking against libatomicSam James2022-11-104-6/+16
| | | | | | | | | | | | | | | * Set LLVM_ATOMIC_LIB to keep track of when we need to link against libatomic. * Add detection of mold linker which is required for this. * Use --as-needed when linking against libatomic as a bonus. On some platforms, libatomic may be required only sometimes. Bug: https://bugs.gentoo.org/832675 Thanks-to: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Tested-by: erhard_f@mailbox.org <erhard_f@mailbox.org> Differential Revision: https://reviews.llvm.org/D136280 (cherry picked from commit fa981b541365190ae646d2dce575706cd0626cf7)
* [TypePromotion] Replace Zext to Truncate for the case src bitwidth is largerchenglin.bi2022-11-102-1/+27
| | | | | | | | | | Fix: https://github.com/llvm/llvm-project/issues/58843 Reviewed By: samtebbs Differential Revision: https://reviews.llvm.org/D137613 (cherry picked from commit 597f44409236bf7fa933a4ce18af23772e28fb43)
* [cmake] Add missing CMakePushCheckState include to FindLibEdit.cmakeMichał Górny2022-11-101-0/+1
| | | | | | | | | | | | | | | | | | | Add the missing include to fix an error when `cmake_push_check_state()` is called and incidentally the CMakePushCheckState module is not loaded by any other check running prior to `FindLibEdit.cmake`: CMake Error at /var/no-tmpfs/portage/dev-util/lldb-15.0.4/work/cmake/Modules/FindLibEdit.cmake:24 (cmake_push_check_state): Unknown CMake command "cmake_push_check_state". Call Stack (most recent call first): cmake/modules/LLDBConfig.cmake:52 (find_package) cmake/modules/LLDBConfig.cmake:59 (add_optional_dependency) CMakeLists.txt:28 (include) Gentoo Bug: https://bugs.gentoo.org/880065 Differential Revision: https://reviews.llvm.org/D137555 (cherry picked from commit 3676a86a4322e8c2b9c541f057b5d3704146b8f3)
* Reenable POSIX builtin library functions in gnu2x modeAaron Ballman2022-11-103-5/+20
| | | | | | | | | | | gnu17 and earlier modes automatically expose several POSIX C APIs, and this was accidentally disabled for gnu2x in 7d644e1215b376ec5e915df9ea2eeb56e2d94626. This restores the behavior for gnu2x mode (without changing the behavior in C standards modes instead of GNU modes). Fixes #56607
* [CMake] Fix -Wstrict-prototypesSam James2022-11-1014-25/+26
| | | | | | | | | | | | | | | | | | Fixes warnings (or errors, if someone injects -Werror in their build system, which happens in fact with some folks vendoring LLVM too) with Clang 16: ``` +/var/tmp/portage.notmp/portage/sys-devel/llvm-15.0.4/work/llvm_build-abi_x86_64.amd64/CMakeFiles/CMakeTmp/src.c:3:9: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] -/var/tmp/portage.notmp/portage/sys-devel/llvm-14.0.4/work/llvm_build-abi_x86_64.amd64/CMakeFiles/CMakeTmp/src.c:3:9: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] int main() {return 0;} ^ void ``` Differential Revision: https://reviews.llvm.org/D137503 (cherry picked from commit 32a2af44e1e882f13d1cc2817f0a8d4d8b375d4d)
* AMDGPU: Make various vector undefs legalllvmorg-15.0.4Matt Arsenault2022-11-0111-458/+306
| | | | | | | | | | | | | | | Surprisingly these were getting legalized to something zero initialized. This fixes an infinite loop when combining some vector types. Also fixes zero initializing some undef values. SimplifyDemandedVectorElts / SimplifyDemandedBits are not checking for the legality of the output undefs they are replacing unused operations with. This resulted in turning vectors into undefs that were later re-legalized back into zero vectors. (cherry picked from commit 7a84624079a2656c684bed6100708544500c5a32)
* [clang][Sema] Fix a clang crash with btf_type_tagYonghong Song2022-11-013-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the following program, $ cat t.c struct t { int (__attribute__((btf_type_tag("rcu"))) *f)(); int a; }; int foo(struct t *arg) { return arg->a; } Compiling with 'clang -g -O2 -S t.c' will cause a failure like below: clang: /home/yhs/work/llvm-project/clang/lib/Sema/SemaType.cpp:6391: void {anonymous}::DeclaratorLocFiller::VisitParenTypeLoc(clang::ParenTypeLoc): Assertion `Chunk.Kind == DeclaratorChunk::Paren' failed. PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: ...... #5 0x00007f89e4280ea5 abort (/lib64/libc.so.6+0x21ea5) #6 0x00007f89e4280d79 _nl_load_domain.cold.0 (/lib64/libc.so.6+0x21d79) #7 0x00007f89e42a6456 (/lib64/libc.so.6+0x47456) #8 0x00000000045c2596 GetTypeSourceInfoForDeclarator((anonymous namespace)::TypeProcessingState&, clang::QualType, clang::TypeSourceInfo*) SemaType.cpp:0:0 #9 0x00000000045ccfa5 GetFullTypeForDeclarator((anonymous namespace)::TypeProcessingState&, clang::QualType, clang::TypeSourceInfo*) SemaType.cpp:0:0 ...... The reason of the failure is due to the mismatch of TypeLoc and D.getTypeObject().Kind. For example, the TypeLoc is BTFTagAttributedType 0x88614e0 'int btf_type_tag(rcu)()' sugar |-ParenType 0x8861480 'int ()' sugar | `-FunctionNoProtoType 0x8861450 'int ()' cdecl | `-BuiltinType 0x87fd500 'int' while corresponding D.getTypeObject().Kind points to DeclaratorChunk::Paren, and this will cause later assertion. To fix the issue, similar to AttributedTypeLoc, let us skip BTFTagAttributedTypeLoc in GetTypeSourceInfoForDeclarator(). Differential Revision: https://reviews.llvm.org/D136807
* [SPARC] Make calls to function with big return values workKoakuma2022-10-286-36/+322
| | | | | | | | | | | | | | | Implement CanLowerReturn and associated CallingConv changes for SPARC/SPARC64. In particular, for SPARC64 there's new `RetCC_Sparc64_*` functions that handles the return case of the calling convention. It uses the same analysis as `CC_Sparc64_*` family of funtions, but fails if the return value doesn't fit into the return registers. This makes calls to functions with big return values converted to an sret function as expected, instead of crashing LLVM. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D132465 (cherry picked from commit d3fcbee10d893b9e01e563c3840414ba89283484)
* Take memset_inline into account in analyzeLoadFromClobberingMemInstGuillaume Chatelet2022-10-281-2/+2
| | | | | | | | This appeared in https://reviews.llvm.org/D126903#3884061 Differential Revision: https://reviews.llvm.org/D136752 (cherry picked from commit 1a726cfa83667585dd87a9955ed5e331cad45d18)
* [lld-macho] Canonicalize personality pointers in EH framesJez Ng2022-10-284-7/+75
| | | | | | | | | | | | | | | | | | | | We already do this for personality pointers referenced from compact unwind entries; this patch extends that behavior to personalities referenced via EH frames as well. This reduces the number of distinct personalities we need in the final binary, and helps us avoid hitting the "too many personalities" error. I renamed `UnwindInfoSection::prepareRelocations()` to simply `prepare` since we now do some non-reloc-specific stuff within. Fixes #58277. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D135728 (cherry picked from commit 7b45dfc6811a52ff4e9a6054dc276d70d77fddaf)
* [clang][driver] Remove dynamic gcc-toolset/devtoolset logicTimm Bäder2022-10-272-117/+15
| | | | | | | | | | | | | | | This breaks when the newest available devtoolset directory is not a complete toolset: https://github.com/llvm/llvm-project/issues/57843 Remove this again in favor or just adding the two new directories for devtoolset/gcc-toolset 12. This reverts commit 35aaf548237a4f213ba9d95de53b33c5ce1eadce. This reverts commit 9f97720268911abae2ad9d90e270358db234a1c1. Fixes https://github.com/llvm/llvm-project/issues/57843 Differential Revision: https://reviews.llvm.org/D136435
* [clangd] Return earlier when snippet is emptyTom Praschan2022-10-252-2/+20
| | | | | | | | | | | | Fixes github.com/clangd/clangd/issues/1216 If the Snippet string is empty, Snippet.front() would trigger a crash. Move the Snippet->empty() check up a few lines to avoid this. Should not break any existing behavior. Differential Revision: https://reviews.llvm.org/D134137 (cherry picked from commit 60528c690a4c334d2a3a2c22eb97af9e67d7a91d)
* [lldb] Automatically unwrap parameter packs in template argument accessorsJonas Devlieghere2022-10-2511-68/+190
| | | | | | | | | | | | | | | | | | | | | | | | When looking at template arguments in LLDB, we usually care about what the user passed in his code, not whether some of those arguments where passed as a variadic parameter pack. This patch extends all the C++ APIs to look at template parameters to take an additional 'expand_pack' boolean that automatically unwraps the potential argument packs. The equivalent SBAPI calls have been changed to pass true for this parameter. A byproduct of the patch is to also fix the support for template type that have only a parameter pack as argument (like the OnlyPack type in the test). Those were not recognized as template instanciations before. The added test verifies that the SBAPI is able to iterate over the arguments of a variadic template. The original patch was written by Fred Riss almost 4 years ago. Differential revision: https://reviews.llvm.org/D51387 (cherry picked from commit b706f56133a77f9d7c55270ac24ff59e6fce3fa4)
* [SystemZ] Relase notes for LLVM 15Tom Stellard2022-10-241-0/+14
| | | | | | | | | | Unfortunately these notes were compiled until now, but these are the release notes for SystemZ. (Did not find anything under clang) @tstellar Should I push this patch onto release/15.x once approved, or will you apply it? Differential Revision: https://reviews.llvm.org/D134430
* [ELF] Suppress "duplicate symbol" when resolving STB_WEAK and STB_GNU_UNIQUE ↵Fangrui Song2022-10-242-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in different COMDATs ``` template <typename T> struct A { A() {} int value = 0; }; template <typename Value> struct B { static A<int> a; }; template <typename Value> A<int> B<Value>::a; inline int foo() { return B<int>::a.value; } ``` ``` clang++ -c -fno-pic a.cc -o weak.o g++ -c -fno-pic a.cc -o unique.o # --enable-gnu-unique-object # Duplicate symbol error. In postParse, we do not check `sym.binding` ld.lld -e 0 weak.o unique.o ``` Mixing GCC and Clang object files in this case is not ideal. .bss._ZGVN1BIiE1aE has different COMDAT groups. It appears to work in practice because the guard variable prevents harm due to double initialization. For the linker, we just stick with the rule that a weak binding does not cause "duplicate symbol" errors. Close https://github.com/llvm/llvm-project/issues/58232 Differential Revision: https://reviews.llvm.org/D136381 (cherry picked from commit 0051b6bb78772b0658f28e5f31ddf91c1589aab5)
* [AutoUpgrade] Fix remangling when upgrading struct return typeNikita Popov2022-10-242-1/+20
| | | | | | | | This was remangling the old function rather than the new one, and could result in failures when we were performing both a struct return upgrade and an opaque pointer upgrade. (cherry picked from commit c8938809d155682ef5eec170897b8c26b8cbf3ea)
* Bump version to 15.0.4Tobias Hieta2022-10-248-11/+11
|
* [InstCombine] Bail out of casting calls when a conversion from/to byval is ↵Mike Hommey2022-10-243-2/+36
| | | | | | | | | | | | involved. Fixes #58307 Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D135738 (cherry picked from commit 86e57e66da9380eaa90a9d0830d7f2c5fe87af99)
* [SROA] Don't speculate phis with different load user typesArthur Eubanks2022-10-242-7/+53
| | | | | | | | | | | | Fixes an SROA crash. Fallout from opaque pointers since with typed pointers we'd bail out at the bitcast. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D136119 (cherry picked from commit 6219ec07c6f8d1ead51beca7cf21fbf2323c51d7)
* [test] Make Linux/sem_init_glibc.cpp robustFangrui Song2022-10-242-24/+21
| | | | | | | | | | | | and fix it for 32-bit ports defining sem_init@GLIBC_2.0 (i386, mips32, powerpc32) for glibc>=2.36. Fix https://github.com/llvm/llvm-project/issues/58079 Reviewed By: mgorny Differential Revision: https://reviews.llvm.org/D135023 (cherry picked from commit 6f46ff3765dcdc178b9cf52ebd8c03437806798a)
* [ARM] Fix for MVE i128 vector icmp costs.llvmorg-15.0.3David Green2022-10-182-1/+6
| | | | | | | | We were hitting an assert as the legalied type needn't be a vector. Fixes #58364 (cherry picked from commit de6dfbbb300e552efa1cd86a023063a39d408b06)
* [clangd] Block clang-tidy misc-const-correctness checkSam McCall2022-10-181-2/+8
| | | | | | | | | | | | | This check performs an extremely large amount of work (for each variable, it runs very many full matcher-driven traversals of the whole scope the variable is defined in). When (inadvertently) enabled for Fuchsia, it regressed BuildAST times by >10x (400ms -> 7s on my machine). Differential Revision: https://reviews.llvm.org/D135829 (cherry picked from commit e78165f0ba1e2fbf72b36a36c8560645b69a168a)
* [libc++] Fix std::function's handling of blocks under Objc ARCLouis Dionne2022-10-183-4/+102
| | | | | | | | | | Previously, some uses of std::function with blocks would crash when ARC was enabled. rdar://100907096 Differential Revision: https://reviews.llvm.org/D135706 (cherry picked from commit 0e4802bf45952b1120c52d4d1bf6bfa2800fd102)
* [CMake] Provide Findzstd modulePetr Hosek2022-10-181-0/+49
| | | | | | | | | | This module is used to find the system zstd library. The imported targets intentionally use the same name as the generate zstd config CMake file so these can be used interchangeably. Differential Revision: https://reviews.llvm.org/D134990 (cherry picked from commit 2d4fd0b6d5d5582ebb8b521d807104235d67aee4)
* [llvm] [test] Add missing canonicalization of LLVM_ENABLE_ZSTDMichał Górny2022-10-181-0/+1
| | | | | | | | | | Add LLVM_ENABLE_ZSTD to llvm_canonicalize_cmake_booleans(). This is needed to ensure that the substitutions in lit.site.cfg.py resolve to correct Python booleans. Differential Revision: https://reviews.llvm.org/D135357 (cherry picked from commit bc4bcbcfc820b324f680e8f260691c38052eedc9)
* [llvm] [lit] Fix use_lld() to respect llvm_shlib_dirMichał Górny2022-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the use_lld() to use llvm_shlib_dir similarly to how use_clang() does it. This fixes use_lld() wrongly prepending llvm_libs_dir, i.e. the directory with system-installed LLVM libraries before the build directory of standalone build. As a result, the shared libraries from an earlier version of clang end up being used instead of the newly built version when running the test suite prior to installing. To reproduce the problem, build and install LLVM with dylibs first, e.g.: cmake ../llvm -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel \ -DCMAKE_INSTALL_PREFIX="${HOME}"/llvm-test \ -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON \ -DLLVM_INSTALL_UTILS=ON ninja install Then build clang against that installation and run tests: export LD_LIBRARY_PATH=~/llvm-test/lib export PATh=~/llvm-test/bin:"${PATH}" cmake ../clang -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel \ -DCMAKE_INSTALL_PREFIX="${HOME}"/llvm-test \ -DCLANG_LINK_CLANG_DYLIB=ON -DLLVM_BUILD_TESTS=ON \ -DLLVM_EXTERNAL_LIT="${PWD}"/bin/llvm-lit ninja check-clang The tests will be run with LD_LIBRARY_PATH of: /home/${USER}/llvm-test/lib:/home/${USER}/llvm-project/build-clang/lib As a result, installed libclang-cpp will take precedence over the one from build dir. With the patch, the correct path is used, i.e.: /home/${USER}/llvm-project/build-clang/lib:/home/${USER}/llvm-test/lib Differential Revision: https://reviews.llvm.org/D135368 (cherry picked from commit a64ea173d7b152678780d5443407d1071277642b)
* [clang-tidy] Fix a false positive in readability-simplify-boolean-exprNathan James2022-10-182-2/+13
| | | | | | | | Reviewed By: LegalizeAdulthood Differential Revision: https://reviews.llvm.org/D134590 (cherry picked from commit 8c783b8ec78ec857e446a89a35463baed8026f40)
* [AArch64][SVE] Fix AArch64_SVE_VectorCall calling conventionMatt Devereau2022-10-173-36/+330
| | | | | This fixes the case where callees with SVE arguments outside of the z0-z7 range were incorrectly deduced as SVE calling convention functions
* Revert "Recommit "[SCEV] Look through single value PHIs." (take 3)"Martin Storsjö2022-10-1310-71/+75
| | | | | | | | | | | | | | This reverts commit 20d798bd47ec5191de1b2a8a031da06a04e612e1. This commit caused crashes in some cases, see github issue #58152. This is fixed on main, but backporting it requires multiple nontrivial cherrypicks. Updating llvm/test/Transforms/LoopVectorize/create-induction-resume.ll with update_test_checks.py, so this isn't an exact automatic revert, as that test case was added after the reverted commit. This fixes #58152 for the release branch.
* Fix LLDB build on old Linux kernels (pre-4.1)David Spickett2022-10-131-2/+29
| | | | | | | | | | These fields are guarded elsewhere, but were missing here. Reviewed By: wallace Differential Revision: https://reviews.llvm.org/D133778 (chery picked from a9ffb473453519bae158e5d9c72431aa0f6aac2b)
* [Syntax] avoid using c++17 features on 15.x branchSam McCall2022-10-101-2/+4
|