- Oct 05, 2022
-
-
Keith Smiley authored
This is a requirement from ld64, so this mirrors that expectation. Most of these changes were just offsets from adding the library, or adding dyld_stub_binder which is always added when linking ld64. This also adds `%no-lsystem-lld` for the few cases where we're explicitly testing things without that. Fixes: https://github.com/llvm/llvm-project/issues/54184 Differential Revision: https://reviews.llvm.org/D135193
-
Gulfem Savrun Yeniceri authored
This reverts commit e1dd2cd0 because the original commit b20e34b3 had a dramatic increase in the build time of RTfuzzer, which caused Fuchsia Clang toolchain builders to timeout: https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8801248587754572961/overview
-
Nico Weber authored
For void f(); int main() { f(); } `lld -demangle` now produces ld64.lld: error: undefined symbol: f >>> referenced by path/to/main.o:(symbol main+0x8) instead of ld64.lld: error: undefined symbol: _f >>> referenced by path/to/main.o:(symbol _main+0x8) previously. (Without `-demangle`, it still prints `_f` and `_main`.) This does *not* match ld64's behavior, but it does match e.g. lld/COFF's behaviour. This is arguably easier to understand: clang prepends symbol names with `_` on macOS, so it seems friendly if the linker removes it again in its diagnostics. It also makes the `extern "C"` insertion diagnostics we added recently look more self-consistent. Differential Revision: https://reviews.llvm.org/D135189 -
Daniel Thornburgh authored
Adding a --build-id flag allows handling binaries that are referenced in logs from remote systems, but that aren't necessarily present on the local machine. These are fetched via debuginfod and handled as if they were input filenames. Reviewed By: jhenderson, MaskRay Differential Revision: https://reviews.llvm.org/D133992
-
Nico Weber authored
-
Lang Hames authored
-
Florian Hahn authored
Loop versioning changes the control-flow, which may impact SCEVs cached by for other loops in LoopAccessInfoManager. Clear the manager after making changes. Fixes #57825. Depends on D134609. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D134611
-
Michael Jones authored
This provides the reference implementation of rand and srand. In future this will likely be upgraded to something that supports full ints. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D135187
-
Slava Zakharin authored
This option allows running only CodeGen passes and then translating FIR to LLVM IR. I am using it to fetch optimized FIR after bbc, hand-modify it and then produce LLVM IR that can be fed to clang.
-
David Blaikie authored
Details posted here: https://reviews.llvm.org/D119051#3747201 3 cases that were inconsistent with the MSABI without this patch applied: https://godbolt.org/z/GY48qxh3G - field with protected member https://godbolt.org/z/Mb1PYhjrP - non-static data member initializer https://godbolt.org/z/sGvxcEPjo - defaulted copy constructor I'm not sure what's suitable/sufficient testing for this - I did verify the three cases above. Though if it helps to add them as explicit tests, I can do that too. Also, I was wondering if the other use of isTrivialForAArch64MSVC in isPermittedToBeHomogenousAggregate could be another source of bugs - I tried changing the function to unconditionally call isTrivialFor(AArch64)MSVC without testing AArch64 first, but no tests fail, so it looks like this is undertested in any case. But I had trouble figuring out how to exercise this functionality properly to add test coverage and then compare that to MSVC itself... - I got very confused/turned around trying to test this, so I've given up enough to send what I have out for review, but happy to look further into this with help. Differential Revision: https://reviews.llvm.org/D133817
-
David Green authored
performCONDCombine removes and 0xff in patterns of SUBS (and (add(..), 0xff), C) under certain complex conditions. It doesn't come up often, but in the lowering of usub.sat where the SUBS is both used as a condition and as a value, the And is removed where it would only be valid for the condition. Fixes #58109. Differential Revision: https://reviews.llvm.org/D135043
-
David Blaikie authored
Fixes: Protected members, HFA: https://godbolt.org/z/zqdK7vdKc Private members, HFA: https://godbolt.org/z/zqdK7vdKc Non-empty base, HFA: https://godbolt.org/z/PKTz59Wev User-provided ctor, HFA: https://godbolt.org/z/sfrTddcW6 Existing correct cases: Empty base class, NonHFA: https://godbolt.org/z/4veY9MWP3 - correct by accident of not allowing bases at all (see non-empty base case/fix above for counterexample) Polymorphic: NonHFA: https://godbolt.org/z/4veY9MWP3 Trivial copy assignment, HFA: https://godbolt.org/z/Tdecj836P Non-trivial copy assignment, NonHFA: https://godbolt.org/z/7c4bE9Whq Non-trivial default ctor, NonHFA: https://godbolt.org/z/Tsq1EE7b7 - correct by accident of disallowing all user-provided ctors (see user-provided non-default ctor example above for counterexample) Trivial dtor, HFA: https://godbolt.org/z/nae999aqz Non-trivial dtor, NonHFA: https://godbolt.org/z/69oMcshb1 Empty field, NonHFA: https://godbolt.org/z/8PTxsKKMK - true due to checking for the absence of padding (see comment in code) After a bunch of testing, this fixes a bunch of cases that were incorrect. Some of the tests verify the nuances of the existing behavior/code checks that were already present. This was mostly motivated by cleanup from/in D133817 which itself was motivated by D119051. By removing the incorrect use of isTrivialForAArch64MSVC here & adding more nuance to the homogeneous testing we can more safely/confidently make changes to the isTrivialFor(AArch64)MSVC to more properly align with its usage anyway. Differential Revision: https://reviews.llvm.org/D134688
-
Michał Górny authored
Add llvm_shlib_dir to variables used in clangd test suite, consistently to how it is used in the test suites of clang, clang-tools-extra and a few other components. This is necessary to ensure that the correct shared libraries are used when building clang standalone -- otherwise, use_clang() sets LD_LIBRARY_PATH to the directory containing the earlier system installation of clang rather than the just-built library. Differential Revision: https://reviews.llvm.org/D135062
-
Azat Khuzhin authored
Right now in case of LTO the section is not emited: $ cat test.c void __attribute__((optnone)) bar() { } void __attribute__((optnone)) foo() { bar(); } int main() { foo(); } $ clang -flto=thin -gdwarf-aranges -g -O3 test.c $ eu-readelf -waranges a.out | fgrep -c -e foo -e bar 0 $ clang -gdwarf-aranges -g -O3 test.c $ eu-readelf -waranges a.out | fgrep -c -e foo -e bar 2 Fix this by passing explicitly --plugin-opt=-generate-arange-section. Suggested-by:OCHyams <orlando.hyams@sony.com> Reviewed By: dblaikie, MaskRay Differential Revision: https://reviews.llvm.org/D133092
-
Nick Desaulniers authored
Follow up to D134702; it looks like we were still warning for gnu89 mode. Link: https://reviews.llvm.org/D134702 Link: https://github.com/ClangBuiltLinux/linux/issues/1720#issuecomment-1265738778 Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D135090
-
Benjamin Kramer authored
The actual transformation doesn't support multi-output GenericOps, but if we encounter one without sparse annotations we can just leave it alone. Differential Revision: https://reviews.llvm.org/D135176
-
Jan Svoboda authored
This patch provides `FileManager` with the CWD on construction in the worker, rather than later in the action. Depends on D134976. Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D134977
-
Jan Svoboda authored
This patch removes the ability of a dependency scanning worker to share a `FileManager` instance between individual scans. It's not sound and doesn't provide performance benefits (due to the underlying caching VFS). Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D134976
-
Sam McCall authored
These are usually not interesting when clangd presents results in context, and the file paths are noisy.
-
Valentin Clement authored
This patch lowers `TYPE(*)` correctly to fir.box<none>. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D135141
-
jeff authored
Since SROA chooses promotion based on reaching load / stores of allocas, we may run into scenarios in which we alloca a vector, but promote it to an integer. The result of which is the familiar LoadCombine pattern (i.e. ZEXT, SHL, OR). However, instead of coming directly from distinct loads, the elements to be combined are coming from ExtractVectorElements which stem from a shared load. This patch identifies such a pattern and combines it into a load. Change-Id: I0bc06588f11e88a0a975cde1fd71e9143e6c42dd
-
Siva Chandra Reddy authored
A very simple and minimal implementation of fork is added. Future changes will add more functionality to satisfy POSIX and Linux requirements. An implementation of wait and a few support macros in sys/wait.h have also been added to help with testing the fork function. Reviewed By: lntue, michaelrj Differential Revision: https://reviews.llvm.org/D135131
-
Jakub Kuderski authored
Allow unknown types to pass through without being marked as illegal. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D135123
-
Christian Sigg authored
-
Yuanfang Chen authored
As @mizvekov suggested in D134772. This works great for D128750 when dealing with AutoType's. Reviewed By: mizvekov, erichkeane Differential Revision: https://reviews.llvm.org/D135088
-
Ram-NK authored
isOuterMostDepPositive() The function isOuterMostDepPositive() is checked after negative dependence vectors are normalized to be non-negative, so there will not be any negative dependency ('>' as the outermost non-equal sign) after normalization. And therefore the check in isOuterMostDepPositive() is irrelevent and redundant. Reviewed By: congzhe Differential Revision: https://reviews.llvm.org/D132982 -
Peiming Liu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D135185
-
serge-sans-paille authored
Turn it into a single Expr::isFlexibleArrayMemberLike method, as discussed in https://discourse.llvm.org/t/rfc-harmonize-flexible-array-members-handling Keep different behavior with respect to macro / template substitution, and harmonize sharp edges: ObjC interface now behave as C struct wrt. FAM and -fstrict-flex-arrays. This does not impact __builtin_object_size interactions with FAM. Differential Revision: https://reviews.llvm.org/D134791 -
Eli Friedman authored
AArch64LoadStoreOptimizer has a bunch of different guards to avoid corrupting Windows SEH prologues/epilogues, but apparently we missed the case of merging two instructions where the first instruction isn't part of the epilogue, but the second instruction is. Fixes issue discovered at https://reviews.llvm.org/D130049#3704064 Differential Revision: https://reviews.llvm.org/D134992
-
Daniel Thornburgh authored
When a binary is missing section headers or symbols, objdump can't provide as good of a disassembly. This change makes objdump try to fetch a better verion of the binary by its build ID. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D132887
-
Jim Ingham authored
a test generates. The green dragon bot compiler is treating this warning as an error for some reason, hopefully this will calm its worries.
-
Nathan James authored
Adds a fix to the diagnostic of replacing the `= default` to `= delete` Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D134549
-
Alex Langford authored
When -fmodule-file-home-is-cwd and the path to the PCM is relative, we shouldn't assume that the path to the PCM is relative to the modulemap that produced it. To respect the option -fmodule-file-home-is-cwd, we should assume the path is relative to the current working directory. Reviewed By: rmaz Differential Revision: https://reviews.llvm.org/D134911
-
Jim Radford authored
Add support for auto-detecting or specifying dSYM files/directories to allow interleaving source with disassembly. Differential Revision: https://reviews.llvm.org/D135117 Patch by Jim Radford.
-
Aart Bik authored
Reviewed By: cota Differential Revision: https://reviews.llvm.org/D135184
-
Michał Górny authored
Set CLANG_NO_DEFAULT_CONFIG=1 for clang-tools-extra tests to prevent the system configuration files for clang from affecting the test results. Differential Revision: https://reviews.llvm.org/D135159
-
Erich Keane authored
-
Aart Bik authored
Reviewed By: cota Differential Revision: https://reviews.llvm.org/D135183
-
Michael Buch authored
These tests have begun failing starting with commit `69a64174`, which added a new `import` to `ASTNodeImporter::VisitTypedefType`. This trips an assertion in following way: 1. When creating a persistent variable for the result we call `CopyType` (in `DeportType`) under a `CompleteTagDeclsScope` (which is supposed to complete all decls newly imported in the `CopyType` call). 2. During `CopyType` we call `ASTNodeImporter::VisitTypedefType` 3. This now has a second import call on the desugared type 4. In `ASTImporterDelegate::ImportImpl` we will now try to import a decl that we originally got from the `std` module (which means it has no valid origin). But since we’re doing this under a CompleteTagDeclsScope, the `NewDeclListener::NewDeclImported` adds the decl to the list of decls to complete after the `CopyType` call. But this list shouldn’t contain decls with invalid origins because we assert this in `~CompleteTagDeclsScope`, which is where the tests crash. We suspect that we previously didn’t see this assert trigger because by the time we create the result variable we are using an AST whose decls all have a valid debug-info origin (constructed with the help of the std module). So we never expected decls from modules to be imported under `CompleteTagDeclsScope` without a m_sema available (which is the case by the time we get to `DeportType`). Since there is no `m_sema` available, `CxxModuleHandler::Import` trivially returns and the decls don’t get added to the `m_decls_to_ignore` list and count as "newly imported decls". Skip this test for now until we have a fix or the origin tracking gets refactored (see https://reviews.llvm.org/D101950). Differential Revision: https://reviews.llvm.org/D135178
-
Chris Bieneman authored
This code adds initial support for generating the HLSL resources metadata entries. It has a lot of `FIXMEs` laying around because there is a lot more work to do here, but this lays a solid groundwork and can accurately handle some trivial cases. I've filed a swath of issues covering the deficiencies here and left the issues in comments so that we can easily follow them. One big change to make sooner rather than later is to move some of this code into a new libLLVMFrontendHLSL so that we can share it with the Clang CodeGen layer. Reviewed By: python3kgae Differential Revision: https://reviews.llvm.org/D134682
-