hanchenye-llvm-project/lld
Nico Weber cf1a11ded2 Make joined instances of JoinedOrSeparate flags point to the unaliased args, like all other arg types do
This fixes an 8-year-old regression. r105763 made it so that aliases
always refer to the unaliased option – but it missed the "joined" branch
of JoinedOrSeparate flags. (r162231 then made the Args classes
non-virtual, and r169344 moved them from clang to llvm.)

Back then, there was no JoinedOrSeparate flag that was an alias, so it
wasn't observable. Now /U in CLCompatOptions is a JoinedOrSeparate alias
in clang, and warn_slash_u_filename incorrectly used the aliased arg id
(using the unaliased one isn't really a regression since that warning
checks if the undefined macro contains slash or backslash and only then
emits the warning – and no valid use will pass "-Ufoo/bar" or similar).

Also, lld has many JoinedOrSeparate aliases, and due to this bug it had
to explicitly call `getUnaliasedOption()` in a bunch of places, even
though that shouldn't be necessary by design. After this fix in Option,
these calls really don't have an effect any more, so remove them.

No intended behavior change.

(I accidentally fixed this bug while working on PR29106 but then
wondered why the warn_slash_u_filename broke. When I figured it out, I
thought it would make sense to land this in a separate commit.)

Differential Revision: https://reviews.llvm.org/D64156

llvm-svn: 365186
2019-07-05 11:45:24 +00:00
..
COFF Make joined instances of JoinedOrSeparate flags point to the unaliased args, like all other arg types do 2019-07-05 11:45:24 +00:00
Common [lld] Allow args::getInterger to parse args larger than 2^31-1 2019-06-07 06:05:26 +00:00
ELF Make joined instances of JoinedOrSeparate flags point to the unaliased args, like all other arg types do 2019-07-05 11:45:24 +00:00
MinGW Make joined instances of JoinedOrSeparate flags point to the unaliased args, like all other arg types do 2019-07-05 11:45:24 +00:00
cmake/modules
docs Add --undefined-glob which is an --undefined with wildcard pattern match 2019-06-14 14:00:59 +00:00
include/lld [lld] Allow args::getInterger to parse args larger than 2^31-1 2019-06-07 06:05:26 +00:00
lib Use llvm::stable_sort 2019-04-23 02:42:06 +00:00
test [LLD][ELF] - Update a test after LLVM change. 2019-07-05 11:29:04 +00:00
tools/lld Fix -DBUILD_SHARED_LIBS=on build after r362977 2019-06-11 01:50:58 +00:00
unittests Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
utils Python 2/3 compatibility 2019-03-20 07:42:13 +00:00
wasm Make joined instances of JoinedOrSeparate flags point to the unaliased args, like all other arg types do 2019-07-05 11:45:24 +00:00
.arcconfig
.clang-format
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
README.md

README.md

LLVM Linker (lld)

This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.

lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.

Benchmarking

In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.

It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz

The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f.