1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

66 Commits

Author SHA1 Message Date
Chris Bieneman
1b8d4f74aa Remove autoconf support
Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html

"I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened."
- Obi Wan Kenobi

Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark

Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits

Differential Revision: http://reviews.llvm.org/D16471

llvm-svn: 258861
2016-01-26 21:29:08 +00:00
Adrian Prantl
3787e623ca llvm-dwarfdump: Add support for dumping .dSYM bundles.
This replicates the logic of Darwin dwarfdump for manually opening up
.dSYM bundles without introducing any new dependencies.
<rdar://problem/20491670>

llvm-svn: 256350
2015-12-23 21:51:13 +00:00
Amjad Aboud
e2bb8d73ce dwarfdump: Added macro support to llvm-dwarfdump tool.
Added "macro" option to "-debug-dump" flag, which trigger parsing and dumping of the ".debug_macinfo" section.

Differential Revision: http://reviews.llvm.org/D14294

llvm-svn: 252866
2015-11-12 09:38:54 +00:00
David Blaikie
6440357f11 dwarfdump: Use the right enum for the tu_index section
llvm-svn: 252835
2015-11-12 00:44:35 +00:00
David Blaikie
d205c1ca24 dwarfdump: add command line support for dumping the tu_index section
llvm-svn: 252830
2015-11-12 00:42:49 +00:00
David Blaikie
098297dbf3 Format my previous commit
llvm-svn: 252782
2015-11-11 19:30:47 +00:00
David Blaikie
cc1f2e9afd dwarfdump: First piece of support for DWP dumping
Just a tiny piece of index dumping - the header in this instance.

llvm-svn: 252781
2015-11-11 19:28:21 +00:00
Frederic Riss
dca9bc0f6e [dwarfdump] Add support for dumping mach-o universal objectfiles
llvm-svn: 243862
2015-08-03 00:10:31 +00:00
Frederic Riss
69fcb9b38c [dwarfdump] Move dumping to a helper function NFC
llvm-svn: 243861
2015-08-03 00:10:25 +00:00
Davide Italiano
5ccfedafe6 [llvm-dwarfump] Don't rely on global state, part 3.
Some tools used to rely on a global static variable to keep track of the 
return value for main(). I changed llvm-cxxdump to use exit(1)
and Rafael shortly after did the same with llvm-readobj. This is
(yet) another step towards the goal.

llvm-svn: 243240
2015-07-26 05:35:59 +00:00
Alexey Samsonov
c200b66742 Make llvm-dwarfdump exit with non-zero exit code if error was occured.
llvm-svn: 240729
2015-06-25 23:40:15 +00:00
Alexey Samsonov
e17631f909 Add llvm-dwarfdump-fuzzer that uses LibFuzzer to fuzz llvm-dwarfdump tool.
The fuzzer is very simple, but not quite useful at the moment: it's unable
to discover "interesting" examples, as LLVMObject library is terrible at
error recovery, calling "report_fatal_error()" far too often.

llvm-svn: 238451
2015-05-28 18:35:18 +00:00
Zachary Turner
c307249d18 Move DIContext.h to common DebugInfo location.
This will enable us to create a PDBContext so as to expose some
amount of debug info functionality through a common interace.

Differential Revision: http://reviews.llvm.org/D9205
Reviewed by: Alexey Samsonov

llvm-svn: 235612
2015-04-23 17:37:47 +00:00
Zachary Turner
9a7f59f9ea Move DebugInfo to DebugInfo/DWARF.
In preparation for adding PDB support to LLVM, this moves the
DWARF parsing code to its own subdirectory under DebugInfo, and
renames LLVMDebugInfo to LLVMDebugInfoDWARF.

This is purely a mechanical / build system change.

Differential Revision: http://reviews.llvm.org/D7269
Reviewed by: Eric Christopher

llvm-svn: 227586
2015-01-30 18:07:45 +00:00
Rafael Espindola
5193b71e57 Remove unused includes and out of date comment. NFC.
llvm-svn: 224413
2014-12-17 03:07:20 +00:00
Frederic Riss
3ebefbe21f Reapply "[dwarfdump] Add support for dumping accelerator tables."
This reverts commit r221842 which was a revert of r221836 and of the
test parts of r221837.

This new version fixes an UB bug pointed out by David (along with
addressing some other review comments), makes some dumping more
resilient to broken input data and forces the accelerator tables
to be dumped in the tests where we use them (this decision is
platform specific otherwise).

llvm-svn: 222003
2014-11-14 16:15:53 +00:00
Frederic Riss
db6bf0d9d2 Revert "[dwarfdump] Add support for dumping accelerator tables."
This reverts commit r221836.

The tests are asserting on some buildbots. This also reverts the
test part of r221837 as it relies on dwarfdump dumping the
accelerator tables.

llvm-svn: 221842
2014-11-13 00:15:15 +00:00
Frederic Riss
040ceb7848 [dwarfdump] Add support for dumping accelerator tables.
The class used for the dump only allows to dump for the moment, but
it can (and will) be easily extended to support search also.

llvm-svn: 221836
2014-11-12 23:48:10 +00:00
Craig Topper
7332ae0502 Fix some cases where StringRef was being passed by const reference. Remove const from some other StringRefs since its implicitly const already.
llvm-svn: 216820
2014-08-30 16:48:02 +00:00
Rafael Espindola
08aa78de63 Don't own the buffer in object::Binary.
Owning the buffer is somewhat inflexible. Some Binaries have sub Binaries
(like Archive) and we had to create dummy buffers just to handle that. It is
also a bad fit for IRObjectFile where the Module wants to own the buffer too.

Keeping this ownership would make supporting IR inside native objects
particularly painful.

This patch focuses in lib/Object. If something elsewhere used to own an Binary,
now it also owns a MemoryBuffer.

This patch introduces a few new types.

* MemoryBufferRef. This is just a pair of StringRefs for the data and name.
  This is to MemoryBuffer as StringRef is to std::string.
* OwningBinary. A combination of Binary and a MemoryBuffer. This is needed
  for convenience functions that take a filename and return both the
  buffer and the Binary using that buffer.

The C api now uses OwningBinary to avoid any change in semantics. I will start
a new thread to see if we want to change it and how.

llvm-svn: 216002
2014-08-19 18:44:46 +00:00
Rafael Espindola
19e7ab14ac Remove some calls to std::move.
Instead of moving out the data in a ErrorOr<std::unique_ptr<Foo>>, get
a reference to it.

Thanks to David Blaikie for the suggestion.

llvm-svn: 214516
2014-08-01 14:31:55 +00:00
Rafael Espindola
3127847c8f Use a reference instead of a pointer.
This makes using a std::unique_ptr in the caller more convenient.

llvm-svn: 214433
2014-07-31 20:19:36 +00:00
Rafael Espindola
191faa331e Use std::unique_ptr to make the ownership explicit.
llvm-svn: 214377
2014-07-31 03:12:45 +00:00
Rafael Espindola
858b9e1423 Update the MemoryBuffer API to use ErrorOr.
llvm-svn: 212405
2014-07-06 17:43:13 +00:00
Rafael Espindola
86b258f3cd Pass a std::unique_ptr& to the create??? methods is lib/Object.
This makes the buffer ownership on error conditions very natural. The buffer
is only moved out of the argument if an object is constructed that now
owns the buffer.

llvm-svn: 211546
2014-06-23 22:00:37 +00:00
Rafael Espindola
5c15b3d369 Remove 'using std::error_code' from tools.
llvm-svn: 210876
2014-06-13 03:07:50 +00:00
Rafael Espindola
e0e308ff6d Don't use 'using std::error_code' in include/llvm.
This should make sure that most new uses use the std prefix.

llvm-svn: 210835
2014-06-12 21:46:39 +00:00
Rafael Espindola
38dc624425 Remove system_error.h.
This is a minimal change to remove the header. I will remove the occurrences
of "using std::error_code" in a followup patch.

llvm-svn: 210803
2014-06-12 17:38:55 +00:00
Alexey Samsonov
4b745d2c7c Kill symbolization functionality in llvm-dwarfdump. We have llvm-symbolizer for that.
llvm-svn: 209152
2014-05-19 18:45:32 +00:00
Alexey Samsonov
19e01d8ebe [DWARF parser] Use enums instead of bitfields in DILineInfoSpecifier.
It is more appropriate than the current situation, when one flag
(AbsoluteFilePath) is relevant only if another flag is set.

This refactoring would also simplify fetching the short function name
(stored in DW_AT_name) instead of a linkage name returned currently.

No functionality change.

llvm-svn: 208921
2014-05-15 21:24:32 +00:00
Alexey Samsonov
5a3863a395 [DWARF parser] Turn DILineInfo into a struct.
Immutable DILineInfo doesn't bring any benefits and complicates
code. Also, use std::string instead of SmallString<16> for file
and function names - their length can vary significantly.

No functionality change.

llvm-svn: 206654
2014-04-18 21:36:39 +00:00
David Blaikie
c5322af8c2 DebugInfo: Support debug_loc under fission
Implement debug_loc.dwo, as well as llvm-dwarfdump support for dumping
this section.

Outlined in the DWARF5 spec and http://gcc.gnu.org/wiki/DebugFission the
debug_loc.dwo section has more variation than the standard debug_loc,
allowing 3 different forms of entry (plus the end of list entry). GCC
seems to, and Clang certainly, only use one form, so I've just
implemented dumping support for that for now.

It wasn't immediately obvious that there was a good refactoring to share
the implementation of dumping support between debug_loc and
debug_loc.dwo, so they're separate for now - ideas welcome or I may come
back to it at some point.

As per a comment in the code, we could choose different forms that may
reduce the number of debug_addr entries we emit, but that will require
further study.

llvm-svn: 204697
2014-03-25 01:44:02 +00:00
Ahmed Charles
52ce0c101e Replace OwningPtr<T> with std::unique_ptr<T>.
This compiles with no changes to clang/lld/lldb with MSVC and includes
overloads to various functions which are used by those projects and llvm
which have OwningPtr's as parameters. This should allow out of tree
projects some time to move. There are also no changes to libs/Target,
which should help out of tree targets have time to move, if necessary.

llvm-svn: 203083
2014-03-06 05:51:42 +00:00
Ahmed Charles
4a96a15754 [C++11] Replace OwningPtr::take() with OwningPtr::release().
llvm-svn: 202957
2014-03-05 10:19:29 +00:00
David Blaikie
5c7418b2ee llvm-dwarfdump: Support for debug_line.dwo section for file names for type units under fission.
llvm-svn: 202091
2014-02-24 23:58:54 +00:00
Rafael Espindola
a7de95d3e7 Change createObjectFile to return an ErrorOr.
llvm-svn: 199776
2014-01-22 00:14:49 +00:00
David Blaikie
d9fe95178b llvm-dwarfdump: type unit dwo support
llvm-svn: 198850
2014-01-09 05:08:24 +00:00
NAKAMURA Takumi
955efe24ce [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.
llvm-svn: 196908
2013-12-10 11:13:32 +00:00
David Blaikie
97d9c49ba1 llvm-dwarfdump: support for emitting only the debug_types section using -debug-dump
llvm-svn: 195063
2013-11-19 00:29:42 +00:00
Eric Christopher
7f9a74f73f Add gnu pubsections as options to llvm-dwarfdump.
Argument spelling feedback welcome.

llvm-svn: 191409
2013-09-25 23:02:44 +00:00
Eric Christopher
02158bcbd4 Dump the normal dwarf pubtypes section as well.
llvm-svn: 191408
2013-09-25 23:02:41 +00:00
David Blaikie
7637c0313e llvm-dwarfdump: Add support for dumping the .debug_loc section
This is a basic implementation - we still don't have any support (that I
know of) for dumping DWARF expressions in a meaningful way, so the
location information itself is just printed as a sequence of bytes as we
do elsewhere.

llvm-svn: 184361
2013-06-19 21:37:13 +00:00
Krzysztof Parzyszek
de39fad3d2 Add support for the pubnames section to llvm-dwarfdump.
llvm-svn: 174976
2013-02-12 16:20:28 +00:00
Eli Bendersky
0802d28eff Initial support for DWARF CFI parsing and dumping in LLVM
llvm-svn: 174463
2013-02-05 23:30:58 +00:00
Eli Bendersky
87e2fa1583 When encountering an unknown file format, ObjectFile::createObjectFile should
politely report it instead of running into llvm_unreachable.

Also patch llvm-dwarfdump to actually check whether the file it's attempting to
dump is a valid object file.

llvm-svn: 173489
2013-01-25 20:53:41 +00:00
Eli Bendersky
1b58747212 Add command-line flags for DWARF dumping.
Flags for dumping specific DWARF sections added in lib/DebugInfo and
llvm-dwarfdump.

llvm-svn: 173480
2013-01-25 20:26:43 +00:00
Eli Bendersky
a3c71c2965 Rename variable to be more comprehensible and follow naming convention
llvm-svn: 173460
2013-01-25 17:06:42 +00:00
Chandler Carruth
800daa7d3d Sort the #include lines for tools/...
Again, tools are trickier to pick the main module header for than
library source files. I've started to follow the pattern of using
LLVMContext.h when it is included as a stub for program source files.

llvm-svn: 169252
2012-12-04 10:44:52 +00:00
Eric Christopher
9df7c1b185 Rewrite DIContext interface to take an object. Update all callers.
llvm-svn: 167757
2012-11-12 21:40:38 +00:00
Alexey Samsonov
8fee8dc998 Fixup for r167558: Store raw pointer (instead of reference) to RelocMap in DIContext. This is needed to prevent crashes because of dangling reference if the clients don't provide RelocMap to DIContext constructor.
llvm-svn: 167728
2012-11-12 14:25:36 +00:00