| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This affects other tools so the previous C++ API has been retained as a
deprecated function for the moment. Clang has been updated with a trivial
patch (not covered by the pre-commit review) to avoid breaking -Werror builds.
Other in-tree tools will be fixed with similar trivial patches.
This continues the patch series to eliminate StringRef forms of GNU triples
from the internals of LLVM that began in r239036.
Reviewers: rengolin
Reviewed By: rengolin
Subscribers: llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D10366
llvm-svn: 239721
|
| |
|
|
|
|
| |
NFC.
llvm-svn: 239645
|
| |
|
|
|
|
|
|
|
|
|
| |
into partitions. Also, add an option to clone stub definitions (not just decls)
into partitions: these definitions could be inlined in some places to avoid the
overhead of calling via the stub.
Found by inspection - no test case yet, although I plan to add a unit test for
this once the CompileOnDemand layer refactoring settles down.
llvm-svn: 239640
|
| |
|
|
|
|
|
| |
As suggested by jroelofs in a prior review (D9752),
it makes sense to generally prefer multi-line format.
llvm-svn: 239632
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The underlaying issues is that this code can't really know if an OS specific or
processor specific section number should return true or false.
One option would be to assert or return an error, but that looks like over
engineering since extensions are not that common.
It seems better to have these be direct implementation of the ELF spec so that
they are natural for someone familiar with ELF reading the code.
Code that does have to handle OS/Architecture specific values can do it at
a higher level.
llvm-svn: 239618
|
| |
|
|
|
|
| |
NFC.
llvm-svn: 239564
|
| |
|
|
|
|
| |
This also breaks out the logical dylib symbol resolution logic.
llvm-svn: 239561
|
| |
|
|
|
|
|
|
|
|
| |
llvm-lib is intended to be a lib.exe compatible utility that also
understands bitcode. The implementation lives in a library so that
lld can use it to implement /lib.
Differential Revision: http://reviews.llvm.org/D10297
llvm-svn: 239434
|
| |
|
|
|
|
|
|
|
|
|
|
| |
make_error_code(object_error) is slow because object::object_category()
uses a ManagedStatic variable. But the real problem is that the function is
called too frequently. This patch uses std::error_code() instead of
object_error::success. In most cases, we return "success", so this patch
reduces number of function calls to that function.
http://reviews.llvm.org/D10333
llvm-svn: 239409
|
| |
|
|
|
|
| |
No test case - this only affects generated code performance.
llvm-svn: 239383
|
| |
|
|
| |
llvm-svn: 239286
|
| |
|
|
| |
llvm-svn: 239283
|
| |
|
|
|
|
|
|
|
| |
No functional change intended, other than some minor changes to certain
diagnostics.
Differential Revision: http://reviews.llvm.org/D10296
llvm-svn: 239278
|
| |
|
|
|
|
| |
setting instprinter appropriately.
llvm-svn: 239265
|
| |
|
|
|
|
| |
allows integer-constant symbols to be defined on the command line and used during assembly.
llvm-svn: 239240
|
| |
|
|
|
|
|
|
|
|
|
| |
Linking the debug frame section is actually very easy as we just have to
patch the start address in the FDE header and then copy the rest of the
FDE without even looking at it. The only small complexity comes from the
handling of the CIEs that we should unique across object file. This is
also really easy by using a StringMap keyed on the raw contents of the
CIE.
llvm-svn: 239198
|
| |
|
|
|
|
|
| |
Anyway having the type and the name of the member being the same
thing wasn't the wisest of the choices.
llvm-svn: 239190
|
| |
|
|
|
|
|
|
|
|
|
| |
The main use of the YAML debug map format is for testing inside LLVM. If we have IR
files in the tests used to generate object files, then we obviously don't know the
addresses of the symbols inside the object files beforehand.
This change lets the YAML import lookup the addresses in the object files and rewrite
them. This will allow to have test that really don't need any binary input.
llvm-svn: 239189
|
| |
|
|
| |
llvm-svn: 239186
|
| |
|
|
|
|
|
|
|
|
|
| |
It will get a bit bigger in an upcoming commit. No need to have all
of that in the header.
Also move parseYAMLDebugMap() to the same place as the serialization
code. This way it will be able to share a private Context object with
it.
llvm-svn: 239185
|
| |
|
|
|
|
|
|
| |
debug map
All the tests using a YAML debug map will need this.
llvm-svn: 239163
|
| |
|
|
|
|
|
|
| |
* If the input file is missing;
* If the type of input object file can't be recognized;
* If the object file can't be parsed correctly.
llvm-svn: 239065
|
| |
|
|
|
|
|
| |
We already handled a section with no symbols, extend that to also handle a
section with symbols that don't include the section start.
llvm-svn: 239039
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Now users don't have to manually deal with getFirstLoadCommandInfo() /
getNextLoadCommandInfo(), calculate the number of load segments, etc.
No functionality change.
Test Plan: regression test suite
Reviewers: rafael, lhames, loladiro
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10144
llvm-svn: 238983
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
binary.
With a couple more constructors that GCC thinks are necessary.
Original commit message:
[dsymutil] Accept a YAML debug map as input instead of a binary.
To do this, the user needs to pass the new -y flag.
As it wasn't tested before, the debug map YAML deserialization was
completely buggy (mainly because the DebugMapObject has a dual
mapping that allows to search by name and by address, but only the
StringMap got populated). It's fixed and tested in this commit by
augmenting some test with a 2 stage dwarf link: a frist llvm-dsymutil
reads the debug map and pipes it in a second instance that does the
actual link without touching the initial binary.
llvm-svn: 238959
|
| |
|
|
|
|
|
| |
This was exposed by r238842 (which was reverted by r238900)
when doing a CMake build with -DBUILD_SHARED_LIBS=ON.
llvm-svn: 238953
|
| |
|
|
|
|
|
|
|
| |
llvm-rtdyld was relying on the default memory manager's EH frame registration,
which is host-dependent rather than target-dependent. As a result, big-endian
ELF Mips EH frames were being registered on OS X (and elsewhere). This is a
really bad idea.
llvm-svn: 238951
|
| |
|
|
|
|
| |
This reverts commit r238941 while I figure out the bot issues.
llvm-svn: 238943
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
To do this, the user needs to pass the new -y flag.
As it wasn't tested before, the debug map YAML deserialization was
completely buggy (mainly because the DebugMapObject has a dual
mapping that allows to search by name and by address, but only the
StringMap got populated). It's fixed and tested in this commit by
augmenting some test with a 2 stage dwarf link: a frist llvm-dsymutil
reads the debug map and pipes it in a second instance that does the
actual link without touching the initial binary.
llvm-svn: 238941
|
| |
|
|
|
|
|
|
|
|
| |
As the serialized debug map is becoming a first class citizen, a way
to cleanly dump it is required. We used -parse-only combined with
-v for that purpose before, but it dumps a lot of unrelated debug
stuff. Dumping the debug map was the only use of the -parse-only flag
anyway, so replace it with a more useful option.
llvm-svn: 238940
|
| |
|
|
| |
llvm-svn: 238939
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ELF spec is very clear:
-----------------------------------------------------------------------------
If the value is non-zero, it represents a string table index that gives the
symbol name. Otherwise, the symbol table entry has no name.
--------------------------------------------------------------------------
In particular, a st_name of 0 most certainly doesn't mean that the symbol has
the same name as the section.
llvm-svn: 238899
|
| |
|
|
| |
llvm-svn: 238898
|
| |
|
|
|
|
|
|
| |
In r233132 we started requiring a subcommand in llvm-cov, but this
made `llvm-cov --version` invalid, which is kind of silly. Print
version information in this case, as most people would expect.
llvm-svn: 238897
|
| |
|
|
|
|
| |
This saves 123144 bytes out of llvm-nm on powerpc64le.
llvm-svn: 238824
|
| |
|
|
| |
llvm-svn: 238790
|
| |
|
|
| |
llvm-svn: 238783
|
| |
|
|
|
|
|
|
|
|
|
| |
Doing so will allow us to also accept a YAML debug map in input as using
YAMLIO gives us the parsing for free. Being able to have textual debug
maps will in turn allow much more control over the tests, because 1/
no need to check-in a binary containing the debug map and 2/ it will allow
to use the same objects/IR files with made-up debug-maps to test
different scenari.
llvm-svn: 238781
|
| |
|
|
|
|
|
|
|
|
|
| |
Start using C++ types such as StringRef and MemoryBuffer in the C++ LTO
API. In doing so, clarify the ownership of the native object file: the caller
now owns it, not the LTOCodeGenerator. The C libLTO library has been modified
to use a derived class of LTOCodeGenerator that owns the object file.
Differential Revision: http://reviews.llvm.org/D10114
llvm-svn: 238776
|
| |
|
|
| |
llvm-svn: 238703
|
| |
|
|
| |
llvm-svn: 238700
|
| |
|
|
|
|
| |
Before r238028 we used to do this in O(N^2), now we do it in O(N log N).
llvm-svn: 238698
|
| |
|
|
| |
llvm-svn: 238693
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit adds partial support for MachO relocations to RelocVisitor.
A simple test case is added to show that relocations are indeed being
applied and that using llvm-dwarfdump on MachO files no longer errors.
Correctness is not yet tested, due to an unrelated bug in DebugInfo,
which will be fixed with appropriate testcase in a followup commit.
Differential Revision: http://reviews.llvm.org/D8148
llvm-svn: 238663
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the type isn't trivially moveable emplace can skip a potentially
expensive move. It also saves a couple of characters.
Call sites were found with the ASTMatcher + some semi-automated cleanup.
memberCallExpr(
argumentCountIs(1), callee(methodDecl(hasName("push_back"))),
on(hasType(recordDecl(has(namedDecl(hasName("emplace_back")))))),
hasArgument(0, bindTemporaryExpr(
hasType(recordDecl(hasNonTrivialDestructor())),
has(constructExpr()))),
unless(isInTemplateInstantiation()))
No functional change intended.
llvm-svn: 238602
|
| |
|
|
| |
llvm-svn: 238557
|
| |
|
|
|
|
| |
at a time which is the semantic unit for Hexagon. Fixing tests to use the new format. Disabling tests in the direct object emission path for a followup patch.
llvm-svn: 238556
|
| |
|
|
| |
llvm-svn: 238552
|
| |
|
|
| |
llvm-svn: 238494
|
| |
|
|
|
|
|
|
| |
triple.
Differential Revision: http://reviews.llvm.org/D8427
llvm-svn: 238457
|