- May 24, 2023
-
-
Keith Smiley authored
While not the recommended extension on macOS .so is supported by ld64. This mirrors that behavior. Related report: https://github.com/bazelbuild/bazel/issues/18464 Differential Revision: https://reviews.llvm.org/D151147
-
Leonard Chan authored
Much of NOLOAD's intended use is to explicitly change the type of an output section, so we shouldn't flag these as warnings. Differential Revision: https://reviews.llvm.org/D151144
-
Nikolas Klauser authored
[libc++] Apply _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION only in classes that we have instantiated externally To make sure all member functions that require it are marked `_LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION` I compared the output of `objdump --syms lib/libc++.1.0.dylib` before and after, ignoring addresses. Reviewed By: #libc, ldionne Spies: Mordante, libcxx-commits, ldionne, arichardson, mstorsjo Differential Revision: https://reviews.llvm.org/D150896
-
Craig Topper authored
Recent changes to RISC-V cause the same predicate to appear in the predicate list multiple times in some cases. This patch filters the duplicates to reduce the number of predicate string variations.
-
Kyle Huey authored
Without frame pointers, the locations of variables on the stack are emitted relative to the stack pointer (via the stack pointer being the value of DW_AT_frame_base on the subprogram). If a call modifies the stack pointer this results in the locations being wrong and the debugger displaying the wrong values for variables. By using DW_OP_call_frame_cfa in these situations the emitted location for the variable will automatically handle changes in the stack pointer (provided LLVM is emitting the correct CFI directives elsewhere, of course). The CFA needs to be adjusted for the size of the stack frame (including the return address) to allow the variable locations themselves to remain unchanged by this patch. Certain LLDB features cannot cope with DW_OP_call_frame_cfa, so this change is heuristically limited to the cases where it's necessary for correctness to minimize the fallout there. Reviewed By: #debug-info, scott.linder, jryans, jmorse Differential Revision: https://reviews.llvm.org/D143463
-
Congcong Cai authored
Fixed: https://github.com/llvm/llvm-project/issues/62408 `setInvalidDecl` for invalid `CXXDeductionGuideDecl` to avoid crashes during semantic analysis. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D149516
-
Eugene Burmako authored
This file has been removed in https://reviews.llvm.org/D151167. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D151242
-
Florian Hahn authored
Now that IR flags are modeled as part of VPRecipeWithIRFlags, include the flags when printing recipes. Depends on D150027. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D150029
-
Piotr Zegar authored
Implicit code like, template instances, compiler generated code are not excluded in this check by using TK_IgnoreUnlessSpelledInSource. Fixes #62693 Reviewed By: donat.nagy Differential Revision: https://reviews.llvm.org/D151133
-
Piotr Zegar authored
Ignore duplicated switch cases with [[fallthrough]] attribute to reduce false positives. Fixes: #47588 Reviewed By: donat.nagy Differential Revision: https://reviews.llvm.org/D147889
-
Craig Topper authored
Reviewed By: fakepaper56 Differential Revision: https://reviews.llvm.org/D151132
-
Joshua Cranmer authored
Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D151141
-
Noah Goldstein authored
In `select c, x, y` the condition `c` dominates the resulting `x` or `y` chosen by the `select`. This adds logic to `isKnownNonZero` to try and use the `icmp` for the `c` condition to see if it implies the select `x` or `y` are known non-zero. For example in: ``` %c = icmp ugt i8 %x, %C %r = select i1 %c, i8 %x, i8 %y ``` The true arm of select `%x` is non-zero (when "returned" by the `select`) because `%c` being true implies `%x` is non-zero. Alive2 Links (with `x {pred} C`): - EQ iff `C != 0`: - https://alive2.llvm.org/ce/z/umLabn - NE iff `C == 0`: - https://alive2.llvm.org/ce/z/DQvy8Y - UGT [always]: - https://alive2.llvm.org/ce/z/HBkjgQ - UGE iff `C != 0`: - https://alive2.llvm.org/ce/z/LDNifB - SGT iff `C s>= 0`: - https://alive2.llvm.org/ce/z/QzWDj3 - SGE iff `C s> 0`: - https://alive2.llvm.org/ce/z/rR4g3D - SLT iff `C s<= 0`: - https://alive2.llvm.org/ce/z/uysayx - SLE iff `C s< 0`: - https://alive2.llvm.org/ce/z/2jYc7e Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D147900 -
Noah Goldstein authored
Differential Revision: https://reviews.llvm.org/D147899
-
Noah Goldstein authored
The knownbits implementation covers all the cases previously handled by `uadd.sat`/`usub.sat` as well some additional ones. We previously were not handling the `ssub.sat`/`sadd.sat` cases at all. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D150103
-
Noah Goldstein authored
These where previously missing. Even in the case where overflow is indeterminate we can still deduce some of the low/high bits. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D150102
-
Noah Goldstein authored
Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D150101
-
Noah Goldstein authored
`abs` preserves the lowest set bit, so if we know the lowest set bit, set it in the output. As well, implement the case where the operand is known negative. Reviewed By: foad, RKSimon Differential Revision: https://reviews.llvm.org/D150100
-
Manna, Soumi authored
Reported by Coverity static analyzer tool: Inside "ItaniumCXXABI.cpp" file, in <unnamed>::ItaniumCXXABI::EmitLoadOfMemberFunctionPointer(clang::CodeGen::CodeGenFunction &, clang::Expr const *, clang::CodeGen::Address, llvm::Value *&, llvm::Value *, clang::MemberPointerType const *): Return value of function which returns null is dereferenced without checking. //returned_null: getAs returns nullptr (checked 130 out of 156 times). //var_assigned: Assigning: FPT = nullptr return value from getAs. const FunctionProtoType *FPT = MPT->getPointeeType()->getAs<FunctionProtoType>(); auto *RD = cast<CXXRecordDecl>(MPT->getClass()->castAs<RecordType>()->getDecl()); // Dereference null return value (NULL_RETURNS) //dereference: Dereferencing a pointer that might be nullptr FPT when calling arrangeCXXMethodType. llvm::FunctionType *FTy = CGM.getTypes().GetFunctionType( CGM.getTypes().arrangeCXXMethodType(RD, FPT, /*FD=*/nullptr)); This patch uses castAs instead of getAs which will assert if the type doesn't match. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D151054 -
LLVM GN Syncbot authored
-
walter erquinigo authored
This simple diff declares some enum values needed to create a REPL for the mojo language. Differential Revision: https://reviews.llvm.org/D150303
-
Nitin John Raj authored
Add minimal support to lower return, and introduce an OutgoingValueHandler and an OutgoingValueAssigner for returns. Supports return values with integer, pointer and aggregate types. (Update of D69808 - avoiding commandeering that revision) Co-authored By: lewis-revill Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D117318
-
Thurston Dang authored
This patch does the bare minimum to import sanitizer_common_interceptors, but without actually enabling any interceptors or meaningfully defining the COMMON_INTERCEPT macros. This will allow selectively enabling sanitizer_common interceptors (if the appropriate macros are defined), as suggested by Vitaly in D149701. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D150708
-
Tue Ly authored
This fixes an issue with missing `unsigned long` conversion on macOS. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D151234
-
Vitaly Buka authored
https://reviews.llvm.org/D150742 is the fix. This reverts commit edd0981e.
-
Vlad Serebrennikov authored
Now with support for MSVC-specific triples. CWG977 focus on point of /completeness/ of enums. Wording provided in CWG1482. CWG1482 and CWG2516 focus on locus (point) of /declaration/. Wording provided in CWG2516. Reviewed By: clang-language-wg, shafik Differential Revision: https://reviews.llvm.org/D151042
-
Rahul Kayaith authored
2.9.0 was released on December 28, 2021, and some following changes require at least this version. Reviewed By: stellaraccident Differential Revision: https://reviews.llvm.org/D150247
-
Aaron Ballman authored
-
Markus Böck authored
C++s iterator concept requires operator* to return the same type as is specified by the iterators reference type. This functionality is especially important for older generic code that did not yet make use of auto. An example from within LLVM is iterator_adaptor_base which uses the reference type of the iterator it is wrapping as its return type for operator* (this class is used as base for a lot of other functionality like filter iterators and so on). Using any of the graph traversal iterators listed above with it would previously fail to compile due to reference being non-const while operator* returned a const reference. This patch fixes that by correctly specifying reference and using it as the return type of operator* explicitly to prevent further issues in the future. Differential Revision: https://reviews.llvm.org/D151198
-
Azat Khuzhin authored
This will avoid hardcoding all unsupported targets, since even after one more follow up fix [1], there is one more failure. [1]: https://reviews.llvm.org/D150886 Plus, if you want to run it locally on some target that CI does not covers, it could also false-positively fail, which is not good. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D151046
-
Alex Langford authored
[lldb][NFCI] Merge implementations of ObjectFileMachO::GetMinimumOSVersion and ObjectFileMachO::GetSDKVersion These functions do the exact same thing (even if they look slightly different). I yanked the common implementation, cleaned it up, and shoved it into its own function. Differential Revision: https://reviews.llvm.org/D151120
-
Diego Caballero authored
This patch adds support to shape cast a vector<1x1x1...1xElemenType> to a vector<ElementType> and the other way around. Differential Revision: https://reviews.llvm.org/D151169
-
Joseph Huber authored
Summry: This was accidentally dropped from a previous patch following a rebase. Fix it to where it's consistent. Differential Revision: https://reviews.llvm.org/D151232
-
Aaron Ballman authored
We documented -fmsc-version as defaulting to 1300 and -fms-compatibility-version as defaulting to 1800, neither of which were accurate. We currently default to 1920. See MSVCToolChain::computeMSVCVersion() for details.
-
Jin Xin Ng authored
Ensures a subsequent call (via an external caller) to __sanitizer_get_allocated_size via hooks will return a valid size. This allows a faster version of __sanitizer_get_allocated_size to be implemented, which can skip checks. Test to ensure RunFreeHooks' call order will come with __sanitizer_get_allocated_size_fast Differential Revision: https://reviews.llvm.org/D151151
-
Mark de Wever authored
This is a followup of the review comments in D144499. Reviewed By: ldionne, philnik, #libc Differential Revision: https://reviews.llvm.org/D150585
-
Mark de Wever authored
This member has been added in D148641 so it can be used in the formatter to avoid creating a "temporary" string. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D150791
-
Mark de Wever authored
This adds the cppm files of D144994. These files by themselves will do nothing. The goal is to reduce the size of D144994 and making it easier to review the real changes of the patch. Implements parts of - P2465R3 Standard Library Modules std and std.compat Reviewed By: ldionne, ChuanqiXu, aaronmondal, #libc Differential Revision: https://reviews.llvm.org/D151030
-
Fangrui Song authored
There are two motivations. `-fno-pic -fstack-protector -mstack-protector-guard=global` created `__stack_chk_guard` is referenced directly on all ELF OSes except FreeBSD. This patch allows referencing the symbol indirectly with -fno-direct-access-external-data. Some Linux kernel folks want `-fno-pic -fstack-protector -mstack-protector-guard-reg=gs -mstack-protector-guard-symbol=__stack_chk_guard` created `__stack_chk_guard` to be referenced directly, avoiding R_X86_64_REX_GOTPCRELX (even if the relocation may be optimized out by the linker). https://github.com/llvm/llvm-project/issues/60116 Why they need this isn't so clear to me. --- Add module flag "direct-access-external-data" and set the dso_local property of the stack protector symbol. The module flag can benefit other LLVMCodeGen synthesized symbols that are not represented in LLVM IR. Nowadays, with `-fno-pic` being uncommon, ideally we should set "direct-access-external-data" when it is true. However, doing so would require ~90 clang/test tests to be updated, which are too much. As a compromise, we set "direct-access-external-data" only when it's different from the implied default value. Reviewed By: nickdesaulniers Differential Revision: https://reviews.llvm.org/D150841
-
Mark de Wever authored
During the ISO C++ Committee meeting plenary session the C++23 Standard has been voted as technical complete. This updates the reference to c++2b to c++23 and updates the __cplusplus macro. Note since we use clang-tidy 16 a small work-around is needed. Clang knows -std=c++23 but clang-tidy not so for now force the lit compiler flag to use -std=c++2b instead of -std=c++23. Reviewed By: #libc, philnik, jloser, ldionne Differential Revision: https://reviews.llvm.org/D150795
-