| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Reviewed By: ruiu, MaskRay
Differential Revision: https://reviews.llvm.org/D72196
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the lld::enableColors function, as it just obscures which
stream it's affecting, and replace with explicit calls to the stream's
enable_colors.
Also, assign the stderrOS and stdoutOS globals first in link function,
just to ensure nothing might use them.
(Either change individually fixes the issue of using the old
stream, but both together seems best.)
Follow-up to b11386f9be9b2dc7276a758d64f66833da10bdea.
Differential Revision: https://reviews.llvm.org/D70492
|
|
|
|
|
| |
`stdout` and `stderr` might be defined as macros, so we needed to
avoid using them as variable names.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change is for those who use lld as a library. Context:
https://reviews.llvm.org/D70287
This patch adds a new parmeter to lld::*::link() so that we can pass
an raw_ostream object representing stdout. Previously, lld::*::link()
took only an stderr object.
Justification for making stdoutOS and stderrOS mandatory: I wanted to
make link() functions to take stdout and stderr in that order.
However, if we change the function signature from
bool link(ArrayRef<const char *> args, bool canExitEarly,
raw_ostream &stderrOS = llvm::errs());
to
bool link(ArrayRef<const char *> args, bool canExitEarly,
raw_ostream &stdoutOS = llvm::outs(),
raw_ostream &stderrOS = llvm::errs());
, then the meaning of existing code that passes stderrOS silently
changes (stderrOS would be interpreted as stdoutOS). So, I chose to
make existing code not to compile, so that developers can fix their
code.
Differential Revision: https://reviews.llvm.org/D70292
|
| |
|
| |
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D69197
llvm-svn: 375390
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Works on this dependency chain:
ArrayRef.h ->
Hashing.h -> --CUT--
Host.h ->
StringMap.h / StringRef.h
ArrayRef is very popular, but Host.h is rarely needed. Move the
IsBigEndianHost constant to SwapByteOrder.h. Clients of that header are
more likely to need it.
llvm-svn: 375316
|
|
|
|
|
|
|
|
|
| |
Instead of returning an optional, just return the input string if
demangling fails, as that's what all callers use anyway.
Differential Revision: https://reviews.llvm.org/D68015
llvm-svn: 373077
|
|
|
|
|
|
|
|
| |
Add test cases for some cases where we don't want demangling to happen.
Differential Revision: https://reviews.llvm.org/D67301
llvm-svn: 373075
|
|
|
|
|
|
|
|
|
|
| |
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances across the monorepo.
Differential revision: https://reviews.llvm.org/D66259
llvm-svn: 368936
|
|
|
|
|
|
|
|
|
| |
operator<<
The original patch broke buildbots, perhaps because it changed the
default setting whether colors are enabled or not.
llvm-svn: 368131
|
|
|
|
|
|
|
|
| |
operator<<
This reverts commit r367649 in an attempt to unbreak Windows bots.
llvm-svn: 367658
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. raw_ostream supports ANSI colors so that you can write messages to
the termina with colors. Previously, in order to change and reset
color, you had to call `changeColor` and `resetColor` functions,
respectively.
So, if you print out "error: " in red, for example, you had to do
something like this:
OS.changeColor(raw_ostream::RED);
OS << "error: ";
OS.resetColor();
With this patch, you can write the same code as follows:
OS << raw_ostream::RED << "error: " << raw_ostream::RESET;
2. Add a boolean flag to raw_ostream so that you can disable colored
output. If you disable colors, changeColor, operator<<(Color),
resetColor and other color-related functions have no effect.
Most LLVM tools automatically prints out messages using colors, and
you can disable it by passing a flag such as `--disable-colors`.
This new flag makes it easy to write code that works that way.
Differential Revision: https://reviews.llvm.org/D65564
llvm-svn: 367649
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
duplicate symbol.
We extract and print the source location in the message header so that
Visual Studio is able to parse it and jump there. As duplicate symbols
are defined in several locations, it is more convenient to have separate
error messages, which allows a user to easily access all the locations.
Differential Revision: https://reviews.llvm.org/D65213
llvm-svn: 367536
|
|
|
|
|
|
|
|
| |
lld currently selects the relocation model automatically depending on
the link flags specified, but in some cases it'd be useful to allow
explicitly overriding the relocation model using a flag.
llvm-svn: 366644
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add a --vs-diagnostics flag that alters the format of diagnostic output
to enable source hyperlinks in Visual Studio.
Differential Revision: https://reviews.llvm.org/D58484
Reviewed by: ruiu
llvm-svn: 366333
|
|
|
|
|
|
|
|
|
|
|
| |
This patch does the same thing as r365595 to other subdirectories,
which completes the naming style change for the entire lld directory.
With this, the naming style conversion is complete for lld.
Differential Revision: https://reviews.llvm.org/D64473
llvm-svn: 365730
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D62933
llvm-svn: 362770
|
|
|
|
|
|
|
|
|
|
|
| |
The code for implementing this features is taken almost verbatim
from the ELF backend.
Fixes: https://bugs.llvm.org/show_bug.cgi?id=41681
Differential Revision: https://reviews.llvm.org/D62380
llvm-svn: 361639
|
|
|
|
|
|
|
|
| |
Fixes https://bugs.llvm.org/show_bug.cgi?id=36478
Differential Revision: https://reviews.llvm.org/D43664
llvm-svn: 355834
|
|
|
|
|
|
| |
Differential review: https://reviews.llvm.org/D58594
llvm-svn: 355029
|
|
|
|
| |
llvm-svn: 354703
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D57555
llvm-svn: 352825
|
|
|
|
|
|
|
|
|
| |
Previously we were never setting this which means it was always being
set to Default (-O2/-Os).
Differential Revision: https://reviews.llvm.org/D57422
llvm-svn: 352667
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to reflect the new license.
We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.
llvm-svn: 351636
|
|
|
|
|
|
|
|
|
|
|
| |
- fix minor grammar stuff (I'm not a native speaker either, but it's hopefully a net improvement)
- mention that lld/coff is used in production
- update AArch64, ARM to production quality
- remove lld/include/lld/Core/TODO.txt which looks outdated
Differential Revision: https://reviews.llvm.org/D56600
llvm-svn: 351030
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This adds support for the 'event section' specified in the exception
handling proposal.
Wasm exception handling binary model spec:
https://github.com/WebAssembly/exception-handling/blob/master/proposals/Exceptions.md#changes-to-the-binary-model
Reviewers: sbc100, ruiu
Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D54875
llvm-svn: 348703
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
- LLVM style does not indent inside namespaces
- Alphabetize
Reviewers: ruiu
Subscribers: sbc100, llvm-commits
Differential Revision: https://reviews.llvm.org/D55406
llvm-svn: 348652
|
|
|
|
| |
llvm-svn: 347680
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D54758
llvm-svn: 347621
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The benefits are:
a) Performance (very minor): it removes a heap allocation of the std::function constructor (template<class F> function(F f))
b) Clarity: it suggests that the callable's lifetime should end after the callee returns. Such callback is widely used in llvm. lld also uses it a lot.
Reviewers: ruiu, rnk, pcc
Reviewed By: ruiu
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D54813
llvm-svn: 347620
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Without this patch, MAttrs are not set.
Patch by Yin Ma
Reviewers: espindola, MaskRay, ruiu, pcc
Reviewed By: MaskRay, pcc
Subscribers: pcc, emaste, sbc100, inglorion, arichardson, aheejin, steven_wu, llvm-commits
Differential Revision: https://reviews.llvm.org/D53446
llvm-svn: 345884
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D53432
llvm-svn: 344888
|
|
|
|
| |
llvm-svn: 342673
|
|
|
|
| |
llvm-svn: 340716
|
|
|
|
|
|
|
|
|
|
|
| |
This is a minor follow-up to https://reviews.llvm.org/D49189. On Windows, lld
used to print "lld-link.exe: error: ...". Now it just prints "lld-link: error:
...". This matches what link.exe does (it prints "LINK : ...") and makes lld's
output less dependent on the host system.
https://reviews.llvm.org/D51133
llvm-svn: 340487
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Error handling in liblldCore and the Darwin toolchain prints to an
output stream. A TODO in the project explained that a diagnostics
interface resembling Clang's should be added.
For now, the simple diagnostics interface defined in liblldCommon seems
like an improvement. It prints colors when they're available, uses locks
for thread-safety, and abstracts away the `"error: "` and newline
literal strings that litter the Darwin toolchain code.
To use the liblldCommon error handler, a link dependency is added to
the liblldDriver library.
Test Plan:
1. check-lld
2. Invoke `ld64.lld -r` in a terminal that supports color output.
Confirm that "ld64.lld: error: -arch not specified and could not be inferred"
is output, and that the "error:" is colored red!
Reviewers: ruiu, smeenai
Reviewed By: ruiu
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D47998
llvm-svn: 334466
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D47790
llvm-svn: 334148
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Move some common code into Common/rrorHandler.cpp and
Common/Strings.h.
- Don't use `fatal` when incompatible bitcode files are
encountered.
- Rename NameRef variable to just Name
See D47162
Differential Revision: https://reviews.llvm.org/D47206
llvm-svn: 333021
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This is similar to D46290 D46320.
Reviewers: ruiu, grimar
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D46861
llvm-svn: 332372
|
|
|
|
| |
llvm-svn: 331097
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D46087
llvm-svn: 330879
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this patch:
Symbol 56
Defined 80
Undefined 56
SharedSymbol 88
LazyArchive 72
LazyObject 56
With this patch
Symbol 48
Defined 72
Undefined 48
SharedSymbol 80
LazyArchive 64
LazyObject 48
The result is that peak allocation when linking chromium (according to
heaptrack) goes from 578 to 568 MB.
llvm-svn: 330874
|
|
|
|
|
|
|
|
|
| |
This should resolve the issue that lld build fails in some hosts
that uses case-insensitive file system.
Differential Revision: https://reviews.llvm.org/D43788
llvm-svn: 326339
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch removes the HashString function from StringExtraces and
replaces its uses with calls to djbHash from DJB.h.
This change is *almost* NFC. While the algorithm is identical, the
djbHash implementation in StringExtras used 0 as its default seed while
the implementation in DJB uses 5381. The latter has been shown to result
in less collisions and improved avalanching and is used by the DWARF
accelerator tables.
Because some test were implicitly relying on the hash order, I've
reverted to using zero as a seed for the following two files:
lld/include/lld/Core/SymbolTable.h
llvm/lib/Support/StringMap.cpp
Differential revision: https://reviews.llvm.org/D43615
llvm-svn: 326091
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It looks like some of our tests depend on the ordering of hashed values.
I'm reverting my changes while I try to reproduce and fix this locally.
Failing builds:
lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/18388
lab.llvm.org:8011/builders/clang-cmake-x86_64-sde-avx512-linux/builds/6743
lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/15607
llvm-svn: 326082
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the HashString function from StringExtraces and replaces
its uses with calls to djbHash from DJB.h
This is *almost* NFC. While the algorithm is identical, the djbHash
implementation in StringExtras used 0 as its seed while the
implementation in DJB uses 5381. The latter has been shown to result in
less collisions and improved avalanching.
https://reviews.llvm.org/D43615
(cherry picked from commit 77f7f965bc9499a9ae768a296ca5a1f7347d1d2c)
llvm-svn: 326081
|
|
|
|
|
|
|
|
|
|
| |
Previously an empty CPU string was passed to the LTO engine which
resulted in a generic CPU for which certain features like NOPL were
disabled. This fixes that.
Patch by Pratik Bhatu!
llvm-svn: 323801
|
|
|
|
|
|
|
|
|
| |
The classes used to print and update time information are in
common, so other linkers could use this as well if desired.
Differential Revision: https://reviews.llvm.org/D41915
llvm-svn: 322736
|