436 Commits

Author SHA1 Message Date
Guillaume Chatelet
171a74f197 [Alignment] Introduce llvm::Align to MCSection
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet, JDevlieghere

Subscribers: arsenm, sdardis, jvesely, nhaehnle, sbc100, hiraditya, aheejin, jrtc27, atanasyan, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371831 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-13 09:29:59 +00:00
Guillaume Chatelet
fff5baa19a [Alignment] Move OffsetToAlignment to Alignment.h
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet, JDevlieghere, alexshap, rupprecht, jhenderson

Subscribers: sdardis, nemanjai, hiraditya, kbarton, jakehehrlich, jrtc27, MaskRay, atanasyan, jsji, seiya, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371742 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-12 15:20:36 +00:00
Jonas Devlieghere
114087caa6 [llvm] Migrate llvm::make_unique to std::make_unique
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369013 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-15 15:54:37 +00:00
George Rimar
1bfa43df58 Recommit r368812 "[llvm/Object] - Convert SectionRef::getName() to return Expected<>"
Changes: no changes. A fix for the clang code will be landed right on top.

Original commit message:

SectionRef::getName() returns std::error_code now.
Returning Expected<> instead has multiple benefits.

For example, it forces user to check the error returned.
Also Expected<> may keep a valuable string error message,
what is more useful than having a error code.
(Object\invalid.test was updated to show the new messages printed.)

This patch makes a change for all users to switch to Expected<> version.

Note: in a few places the error returned was ignored before my changes.
In such places I left them ignored. My intention was to convert the interface
used, and not to improve and/or the existent users in this patch.
(Though I think this is good idea for a follow-ups to revisit such places
and either remove consumeError calls or comment each of them to clarify why
it is OK to have them).

Differential revision: https://reviews.llvm.org/D66089

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368826 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-14 11:10:11 +00:00
George Rimar
899e01b67d Revert r368812 "[llvm/Object] - Convert SectionRef::getName() to return Expected<>"
It broke clang BB: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/16455



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368813 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-14 08:56:55 +00:00
George Rimar
0d8949846a [llvm/Object] - Convert SectionRef::getName() to return Expected<>
SectionRef::getName() returns std::error_code now.
Returning Expected<> instead has multiple benefits.

For example, it forces user to check the error returned.
Also Expected<> may keep a valuable string error message,
what is more useful than having a error code.
(Object\invalid.test was updated to show the new messages printed.)

This patch makes a change for all users to switch to Expected<> version.

Note: in a few places the error returned was ignored before my changes.
In such places I left them ignored. My intention was to convert the interface
used, and not to improve and/or the existent users in this patch.
(Though I think this is good idea for a follow-ups to revisit such places
and either remove consumeError calls or comment each of them to clarify why
it is OK to have them).

Differential revision: https://reviews.llvm.org/D66089

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368812 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-14 08:46:54 +00:00
David Blaikie
948e657594 DebugInfo/DWARF: Normalize DWARFObject members on the DWARF spec section names
Some of these names were abbreviated, some were not, some pluralised,
some not. Made the API difficult to use - since it's an exact 1:1
mapping to the DWARF sections - use those names (changing underscore
separation for camel casing).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368189 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-07 17:18:11 +00:00
Igor Kudrin
8ee19f8c63 Switch LLVM to use 64-bit offsets (2/5)
This updates all libraries and tools in LLVM Core to use 64-bit offsets
which directly or indirectly come to DataExtractor.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368014 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-06 10:49:40 +00:00
Fangrui Song
2ffd08308b Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC
F_{None,Text,Append} are kept for compatibility since r334221.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367800 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-05 05:43:48 +00:00
Jonas Devlieghere
3c182acee0 [dsymutil] Fix heap-use-after-free related to the LinkOptions.
In r367348, I changed dsymutil to pass the LinkOptions by value isntead
of by const reference. However, the options were still captured by
reference in the LinkLambda. This patch fixes that by passing them in by
value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367635 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-01 23:37:33 +00:00
Jonas Devlieghere
7bbbe57168 [dsymutil] Pass LinkOptions by value instead of const ref.
When looping over the difference architectures in a fat binary, we
modify the link options before dispatching the link step to a different
thread. Passing the options by cont reference is not thread safe, as we
might modify its fields before the whole sturct is copied over.

Given that the link options are already stored in the DwarfLinker, we
can easily fix this by passing a copy of the link options instead of a
reference, which would just get copied later on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367348 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-30 19:34:26 +00:00
Hsiangkai Wang
b6f810717a [DebugInfo] Generate fixups as emitting DWARF .debug_frame/.eh_frame.
It is necessary to generate fixups in .debug_frame or .eh_frame as
relaxation is enabled due to the address delta may be changed after
relaxation.

There is an opcode with 6-bits data in debug frame encoding. So, we
also need 6-bits fixup types.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366524 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-19 02:03:34 +00:00
Hsiangkai Wang
1b3d4c83af Revert "[DebugInfo] Generate fixups as emitting DWARF .debug_frame/.eh_frame."
This reverts commit 17e3cbf5fe656483d9016d0ba9e1d0cd8629379e.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366444 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-18 15:06:50 +00:00
Hsiangkai Wang
17e3cbf5fe [DebugInfo] Generate fixups as emitting DWARF .debug_frame/.eh_frame.
It is necessary to generate fixups in .debug_frame or .eh_frame as
relaxation is enabled due to the address delta may be changed after
relaxation.

There is an opcode with 6-bits data in debug frame encoding. So, we
also need 6-bits fixup types.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366442 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-18 14:47:34 +00:00
Fangrui Song
3228596b4c Cleanup: llvm::bsearch -> llvm::partition_point after r364719
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364720 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-30 11:19:56 +00:00
Fangrui Song
32e092ad46 Simplify std::lower_bound with llvm::{bsearch,lower_bound}. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364006 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-21 05:40:31 +00:00
Jonas Devlieghere
3cf7b4efc6 [dsymutil] Remove stale comment (NFC)
The comment was no longer relevant after r362621.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363008 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-10 23:30:20 +00:00
Jonas Devlieghere
ca54a620a5 [dsymutil] Use the number of threads specified.
Before this patch we used either a single thread, or the number of
hardware threads available, effectively ignoring the number of threads
specified on the command line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362815 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-07 17:35:19 +00:00
Jonas Devlieghere
e2172b40a8 [dsymutil] Support more than 4 architectures
When running dsymutil on a fat binary, we use temporary files in a small
vector of size four. When processing more than 4 architectures, this
resulted in a user-after-move, because the temporary files got moved to
the heap. Instead of storing an optional temp file, we now use a unique
pointer, so the location of the actual temp file doesn't change.

We could test this by checking in 5 binaries for 5 different
architectures, but this seems wasteful, especially since the number of
elements in the small vector is arbitrary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362621 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-05 17:14:32 +00:00
Jonas Devlieghere
1a23ac011d [dwarfdump] Add flag to limit the number of parents DIEs
This adds `-parent-recurse-depth` which limits the number of parent DIEs
being dumped.

Differential revision: https://reviews.llvm.org/D62359

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361671 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-24 21:11:28 +00:00
Daniel Sanders
6519fa1cbe Break false dependencies on target libraries
Summary:
For the most part this consists of replacing ${LLVM_TARGETS_TO_BUILD} with
some combination of AllTargets* so that they depend on specific components
of a target backend rather than all of it. The overall effect of this is
that, for example, tools like opt no longer falsely depend on the
disassembler, while tools like llvm-ar no longer depend on the code
generator.

There's a couple quirks to point out here:
* AllTargetsCodeGens is a bit more prevalent than expected. Tools like dsymutil
  seem to need it which I was surprised by.
* llvm-xray linked to all the backends but doesn't seem to need any of them.
  It builds and passes the tests so that seems to be correct.
* I left gold out as it's not built when binutils is not available so I'm
  unable to test it

Reviewers: bogner, JDevlieghere

Reviewed By: bogner

Subscribers: mehdi_amini, mgorny, steven_wu, dexonsmith, rupprecht, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361567 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-23 23:02:56 +00:00
Jonas Devlieghere
f0b21edf58 [Dsymutil] Remove redundant argument (NFC)
The dwarf streamer already holds a copy of the link options, so there's
no need to pass them as an argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361276 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-21 17:31:51 +00:00
Fangrui Song
7287acf23f Recommit [Object] Change object::SectionRef::getContents() to return Expected<StringRef>
r360876 didn't fix 2 call sites in clang.

Expected<ArrayRef<uint8_t>> may be better but use Expected<StringRef> for now.

Follow-up of D61781.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360892 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-16 13:24:04 +00:00
Hans Wennborg
71eaa4f97d Revert r360876 "[Object] Change object::SectionRef::getContents() to return Expected<StringRef>"
It broke the Clang build, see llvm-commits thread.

> Expected<ArrayRef<uint8_t>> may be better but use Expected<StringRef> for now.
>
> Follow-up of D61781.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360878 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-16 12:08:34 +00:00
Fangrui Song
a4d6bb66d0 [Object] Change object::SectionRef::getContents() to return Expected<StringRef>
Expected<ArrayRef<uint8_t>> may be better but use Expected<StringRef> for now.

Follow-up of D61781.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360876 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-16 11:33:48 +00:00
Adrian Prantl
9a94283566 [dsymutil] Put Swift interface files into a per-arch subdirectory.
This was meant to be part of the original commit r358921, but somehow
got lost.

<rdar://problem/49751748>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359010 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-23 16:42:35 +00:00
Adrian Prantl
7d596b3b3d [dsymutil] Fix use-after-free when sys::path::append grows the buffer.
<rdar://problem/50117620>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359003 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-23 15:44:22 +00:00
Adrian Prantl
2bf9685e96 Revert "[dsymutil] Fix use-after-free when sys::path::append grows the buffer."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359002 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-23 15:44:19 +00:00
Adrian Prantl
17fed035fb [dsymutil] Fix use-after-free when sys::path::append grows the buffer.
<rdar://problem/50117620>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359001 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-23 15:39:13 +00:00
Adrian Prantl
a550ed7e78 Fully qualify llvm::Optional, some compilers complain otherwise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358933 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-22 22:51:34 +00:00
Adrian Prantl
7f65c13ecb Try to work around compile errors with older versions of GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358927 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-22 22:40:37 +00:00
Adrian Prantl
80d580cd44 [dsymutil] Collect parseable Swift interfaces in the .dSYM bundle.
When a Swift module built with debug info imports a library without
debug info from a textual interface, the textual interface is
necessary to reconstruct types defined in the library's interface. By
recording the Swift interface files in DWARF dsymutil can collect them
and LLDB can find them.

This patch teaches dsymutil to look for DW_TAG_imported_modules and
records all references to parseable Swift ingterfrace files and copies
them to

  a.out.dSYM/Contents/Resources/<Arch>/<ModuleName>.swiftinterface

<rdar://problem/49751748>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358921 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-22 21:33:22 +00:00
Fangrui Song
507afa30b9 [dsymutil] DwarfLinker: delete unused parameter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358762 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-19 15:45:25 +00:00
Vlad Tsyrklevich
a5110cb335 Revert "[DWARFFormValue] Cleanup DWARFFormValue interface. (2/2) (NFC)"
This reverts commit r355233, it was causing UBSan failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355255 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-02 01:10:00 +00:00
Jonas Devlieghere
ca58bd27df [DWARFFormValue] Cleanup DWARFFormValue interface. (2/2) (NFC)
Continues the work started in r354941. Changes (all but one) uses of the
extractValue to static createFromData.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355233 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-01 22:14:24 +00:00
Adrian Prantl
8806e3ae9e dsymutil support for DW_OP_convert
Add support for cloning DWARF expressions that contain base type DIE
references in dsymutil.

<rdar://problem/48167812>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355148 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-28 22:12:32 +00:00
Jonas Devlieghere
abce0e8bf5 [dsymutil] Use rfind for paths with parentheses
Dsymutil gets library member information is through the ambiguous
/path/to/archive.a(member.o). The current logic we use would get
confused by additional parentheses. Using rfind mitigates this issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355114 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-28 18:46:04 +00:00
Alexey Lapshin
a15cff122c [DebugInfo] add SectionedAddress to DebugInfo interfaces.
That patch is the fix for https://bugs.llvm.org/show_bug.cgi?id=40703
   "wrong line number info for obj file compiled with -ffunction-sections"
   bug. The problem happened with only .o files. If object file contains
   several .text sections then line number information showed incorrectly.
   The reason for this is that DwarfLineTable could not detect section which
   corresponds to specified address(because address is the local to the
   section). And as the result it could not select proper sequence in the
   line table. The fix is to pass SectionIndex with the address. So that it
   would be possible to differentiate addresses from various sections. With
   this fix llvm-objdump shows correct line numbers for disassembled code.

   Differential review: https://reviews.llvm.org/D58194

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354972 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-27 13:17:36 +00:00
Jonas Devlieghere
a1881f222d [dsymutil] Improve readability of cloneAllCompileUnits (NFC)
Add some newlines and improve consistency between the two loops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353904 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-13 00:32:21 +00:00
Jonas Devlieghere
629efa3c8d [dsymutil] Don't clone empty CUs
The DWARF standard says that an empty compile unit is not valid:

> Each such contribution consists of a compilation unit header (see
> Section 7.5.1.1 on page 200) followed by a single DW_TAG_compile_unit or
> DW_TAG_partial_unit debugging information entry, together with its
> children.

Therefore we shouldn't clone them in dsymutil.

Differential revision: https://reviews.llvm.org/D57979

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353903 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-13 00:32:06 +00:00
Chandler Carruth
6b547686c5 Update the file headers across all of the LLVM projects in the monorepo
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-19 08:50:56 +00:00
Jonas Devlieghere
8ece8d3586 [dsymutil] Fix assertion triggered by empty address range.
An assertion was hit when running dsymutil on a gcc generated binary
that contained an empty address range. Address ranges are stored in an
interval map of half open intervals. Since the interval is empty and
therefore meaningless, we simply don't add it to the map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350591 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 01:08:09 +00:00
Jonas Devlieghere
20767d1ad4 [dsymutil] Upstream unobfuscation logic.
The unobufscation support for BCSymbolMaps was the last piece of code
that hasn't been upstreamed yet. This patch contains a reworked version
of the existing code and relevant tests.

Differential revision: https://reviews.llvm.org/D56346

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350580 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-07 23:27:25 +00:00
Jonas Devlieghere
aefeecffdd [dsymutil] Ensure we're comparing time stamps with the same precision.
After TimePoint's precision was increased in LLVM we started seeing
failures because the modification times didn't match. This adds a time
cast to ensure that we're comparing TimePoints with the same amount of
precision.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348283 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-04 17:15:23 +00:00
Jonas Devlieghere
c7a92ba36c [dsymutil] Gather global and local symbol addresses in the main executable.
Usually local symbols will have their address described in the debug
map. Global symbols have to have their address looked up in the symbol
table of the main executable. By playing with 'ld -r' and export lists,
you can get a symbol described as global by the debug map while actually
being a local symbol as far as the link in concerned. By gathering the
address of local symbols, we fix this issue.

Also, we prefer a global symbol in case of a name collision to preserve
the previous behavior.

Note that using the 'ld -r' tricks, people can actually cause symbol
names collisions that dsymutil has no way to figure out. This fixes the
simple case where there is only one symbol of a given name.

rdar://problem/32826621

Differential revision: https://reviews.llvm.org/D54922

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348021 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-30 18:56:10 +00:00
Adrian Prantl
0ee0dff789 Make dsymutil more robust when parsing load commands.
rdar://problem/45883463

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346815 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-13 23:31:25 +00:00
Adrian Prantl
a3a30c008d [dsymutil] Copy the LC_BUILD_VERSION load command into the companion binary.
LC_BUILD_VERSION contains platform information that is useful for LLDB
to match up dSYM bundles with binaries. This patch copies the load
command over into the dSYM.

rdar://problem/44145175
rdar://problem/45883463

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346412 91177308-0d34-0410-b5e6-96231b3b80d8
2018-11-08 16:54:59 +00:00
Wolfgang Pieb
daecf945cc [DWARF] Revert r345546: Refactor range list extraction and dumping
This patch caused some internal tests to break which are being investigated.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345687 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-31 01:12:58 +00:00
Wolfgang Pieb
3efd3a74af [DWARF][NFC] Refactor range list extraction and dumping
The purpose of this patch is twofold: 
- Fold pre-DWARF v5 functionality into v5 to eliminate the need for 2 different 
  versions of range list handling. We get rid of DWARFDebugRangelist{.cpp,.h}.
- Templatize the handling of range list tables so that location list handling
  can take advantage of it as well. Location list and range list tables have the 
  same basic layout.

A non-NFC version of this patch was previously submitted with r342218, but it caused
errors with some TSan tests. This patch has no functional changes. The difference to
the non-NFC patch is that there are no changes to rangelist dumping in this patch.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345546 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-29 22:16:47 +00:00
Jonas Devlieghere
956dada028 [dsymutil] Improve error reporting when we cannot create output file.
Before this patch we were returning an empty string in case we couldn't
create the output file. Now we return an expected string so we can
return and print the proper issue. We now return errors instead of bools
and defer printing to the call site.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344983 91177308-0d34-0410-b5e6-96231b3b80d8
2018-10-23 00:32:22 +00:00