Commit Graph

4810 Commits

Author SHA1 Message Date
Duncan P. N. Exon Smith 4680f40d28 Revert "Reapply "LTO: add API to set strategy for -internalize""
This reverts commit r199244.

Conflicts:
	include/llvm-c/lto.h
	include/llvm/LTO/LTOCodeGenerator.h
	lib/LTO/LTOCodeGenerator.cpp

llvm-svn: 205471
2014-04-02 22:05:57 +00:00
Simon Atanasyan 3ee21b014b [yaml2obj][ELF] Convert some static functions into class members to
reduce number of arguments.

No functional changes.

llvm-svn: 205434
2014-04-02 16:34:54 +00:00
Simon Atanasyan ee7776d681 [yaml2obj][ELF] Remove unused typedef.
No functional changes.

llvm-svn: 205433
2014-04-02 16:34:48 +00:00
Simon Atanasyan 220c54a0e3 [yaml2obj][ELF] Move section index to the ELFState class.
No functional changes.

llvm-svn: 205432
2014-04-02 16:34:40 +00:00
Simon Atanasyan ee882239cb [yaml2obj][ELF] Remove relationship between ELFState
and ContiguousBlobAccumulator classes. Pass ContiguousBlobAccumulator to
the handleSymtabSectionHeader function directly.

No functional changes.

llvm-svn: 205431
2014-04-02 16:34:34 +00:00
Daniel Sanders 9cf3d3b764 [yaml2obj] Add support for ELF e_flags.
Summary:
The FileHeader mapping now accepts an optional Flags sequence that accepts
the EF_<arch>_<flag> constants. When not given, Flags defaults to zero.

Reviewers: atanasyan

Reviewed By: atanasyan

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3213

llvm-svn: 205173
2014-03-31 09:44:05 +00:00
Saleem Abdulrasool 37511ecea8 Windows: canonicalise the default windows triple
Canonicalise the default triple that is used on Windows.  This should hopefully
fix the MSVC buildbots.

llvm-svn: 205070
2014-03-29 01:08:53 +00:00
David Blaikie 9c3857cb5e Add missing include (for r205050)
llvm-svn: 205053
2014-03-28 21:00:25 +00:00
David Blaikie 9b620b451a llvm-mc: error when -compress-debug-sections is requested and zlib is not linked
This is a bit of a stab in the dark, since I have zlib on my machine.
Just going to bounce it off the bots & see if it sticks.

Do we have some convention for negative REQUIRES: checks? Or do I just
need to add a feature like I've done here?

llvm-svn: 205050
2014-03-28 20:45:24 +00:00
David Blaikie 7400a97952 DebugInfo: Support for compressed debug info sections
1) When creating a .debug_* section and instead create a .zdebug_
   section.
2) When creating a fragment in a .zdebug_* section, make it a compressed
   fragment.
3) When computing the size of a compressed section, compress the data
   and use the size of the compressed data.
4) Emit the compressed bytes.

Also, check that only if a section has a compressed fragment, then that
is the only fragment in the section.

Assert-fail if the fragment's data is modified after it is compressed.

Initial review on llvm-commits by Eric Christopher and Rafael Espindola.

llvm-svn: 204958
2014-03-27 20:45:58 +00:00
Lang Hames eb37092342 Update MCSymbolizer and its subclasses' constructors to reflect the fact that
they take ownership of the RelocationInfo they're constructed with.

llvm-svn: 204891
2014-03-27 02:39:01 +00:00
Rafael Espindola 10be0837ac Create .symtab_shndxr only when needed.
We need .symtab_shndxr if and only if a symbol references a section with an
index >= 0xff00.

The old code was trying to figure out if the section was needed ahead of time,
making it a fairly dependent on the code actually writing the table. It was
also somewhat conservative and would create the section in cases where it was
not needed.

If I remember correctly, the old structure was there so that the sections were
created in the same order gas creates them. That was valuable when MC's support
for ELF was new and we tested with elf-dump.py.

This patch refactors the symbol table creation to another class and makes it
obvious that .symtab_shndxr is really only created when we are about to output
a reference to a section index >= 0xff00.

While here, also improve the tests to use macros. One file is one section
short of needing .symtab_shndxr, the second one has just the right number.

llvm-svn: 204769
2014-03-25 23:44:25 +00:00
David Blaikie 9c550ac4e7 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
Hans Wennborg 9c8f1a7b11 VS integration installer: set SUCCESS=1 if we find VS 2013
Previously we would print an error message on machines where the only VS
version we find is 2013, even though we successfully install the integration
files for it.

Also, we shouldn't have two END labels.

llvm-svn: 204629
2014-03-24 17:33:22 +00:00
Rafael Espindola cfee7efde9 Teach llvm-readobj to print human friendly description of reserved sections.
llvm-svn: 204584
2014-03-24 05:00:34 +00:00
Justin Bogner db1225d061 llvm-profdata: Check for bad data in the show command
llvm-svn: 204573
2014-03-23 20:55:53 +00:00
Justin Bogner 423380f9a2 llvm-profdata: Use Format.h instead of handrolling a formatter
llvm-svn: 204571
2014-03-23 20:43:50 +00:00
NAKAMURA Takumi 8971fcae25 llvm-profdata doesn't require LLVMCore.
llvm-svn: 204552
2014-03-23 01:23:26 +00:00
NAKAMURA Takumi 4baaa6a599 llvm-profdata: Avoid F_Text in "merge" for now, since "llvm-profdata show" is confused with CRLF.
FIXME: line_iterator should be tolerant of CR.
llvm-svn: 204540
2014-03-22 05:38:22 +00:00
Justin Bogner b9bd7f85a7 ProfileData: Introduce InstrProfWriter using the naive text format
This isn't a format we'll want to write out in practice, but moving it
to the writer library simplifies llvm-profdata and isolates it from
further changes to the format.

This also allows us to update the tests to not rely on the text output
format.

llvm-svn: 204489
2014-03-21 17:46:22 +00:00
Justin Bogner 9af28ef921 llvm-profdata: Implement show command
The `llvm-profdata show` command summarizes a profdata file's contents
in a human readable format.

llvm-svn: 204485
2014-03-21 17:29:44 +00:00
Justin Bogner f8d791983c ProfileData: Introduce the InstrProfReader interface and a text reader
This introduces the ProfileData library and updates llvm-profdata to
use this library for reading profiles. InstrProfReader is an abstract
base class that will be subclassed for both the raw instrprof data
from compiler-rt and the efficient instrprof format that will be used
for PGO.

llvm-svn: 204482
2014-03-21 17:24:48 +00:00
Greg Fitzgerald 1843227551 llvm-objdump output hex to match binutils' objdump
Patch by Ted Woodward

llvm-svn: 204409
2014-03-20 22:55:15 +00:00
Rafael Espindola 52845cfd16 Remove llvm-mc's disable-cfi option.
It was dead.

llvm-svn: 204404
2014-03-20 21:48:20 +00:00
Justin Bogner f208d32355 llvm-profdata: Remove an empty comment
llvm-svn: 204370
2014-03-20 18:37:27 +00:00
David Majnemer 798e548955 Object: Output .file symbols properly
obj2yaml would emit the NUL bytes padding the auxiliary file symbol
records.  Trimming them looks nicer.

llvm-svn: 204314
2014-03-20 06:29:02 +00:00
David Majnemer ed98b68ed8 Object: Abstract out the determination of function line symbols
No functionality change.

llvm-svn: 204313
2014-03-20 06:28:55 +00:00
David Majnemer ddf28f2b79 Object: Provide a richer means of describing auxiliary symbols
The current state of affairs has auxiliary symbols described as a big
bag of bytes. This is less than satisfying, it detracts from the YAML
file as being human readable.

Instead, allow for symbols to optionally contain their auxiliary data.
This allows us to have a much higher level way of describing things like
weak symbols, function definitions and section definitions.

This depends on D3105.

Differential Revision: http://llvm-reviews.chandlerc.com/D3092

llvm-svn: 204214
2014-03-19 04:47:47 +00:00
David Majnemer f3a2af5371 Object: Move auxiliary symbol definitions from llvm-readobj
Summary: These definitions are useful to other aspects of LLVM, move them out.

Reviewers: rafael, nrieck, ruiu

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3105

llvm-svn: 204213
2014-03-19 04:33:27 +00:00
Justin Bogner 618bcea714 llvm-profdata: Make "merge" into a subcommand.
We'll be adding a few more subcommands in the near future.

llvm-svn: 204211
2014-03-19 02:20:46 +00:00
Justin Bogner 38fff8682b llvm-profdata: Update to use the naive text format with function hash
This also uses line_iterator to simplify the parsing logic.

llvm-svn: 204210
2014-03-19 02:20:42 +00:00
Rui Ueyama f078eff39c Object/COFF: Add function to check if section number is reserved one.
Differential Revision: http://llvm-reviews.chandlerc.com/D3103

llvm-svn: 204199
2014-03-18 23:37:53 +00:00
Jim Grosbach 448334a738 Darwin: Add assembler directives to create version-min load commands.
Allow object files to be tagged with a version-min load command for iOS
or MacOSX.

Teach macho-dump to understand the version-min load commands for
testcases.

rdar://11337778

llvm-svn: 204190
2014-03-18 22:09:05 +00:00
Rui Ueyama 4e39f717ff Use early returns to reduce nesting.
llvm-svn: 204171
2014-03-18 18:58:51 +00:00
Alexey Samsonov 27dc839406 [C++11] Change the interface of getCOFF{Section,Relocation,Symbol} to make it work with range-based for loops.
Reviewers: ruiu

Reviewed By: ruiu

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3097

llvm-svn: 204120
2014-03-18 06:53:02 +00:00
Alexey Samsonov 464d2e448b [C++11] Introduce ObjectFile::symbols() to use range-based loops.
Reviewers: rafael

Reviewed By: rafael

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3081

llvm-svn: 204031
2014-03-17 07:28:19 +00:00
Nico Rieck 8678acd5ed llvm-readobj: Print referred symbol name for CLR token definition
llvm-svn: 204024
2014-03-17 01:46:52 +00:00
Nico Rieck effcd4ba7a llvm-readobj: Add test for COFF auxiliary symbols as used by C++/CLI
llvm-svn: 204023
2014-03-17 01:46:28 +00:00
Justin Bogner e3bfdc4e14 Support: Make error_category's constructor public
Since our error_category is based on the std one, we should have the
same visibility for the constructor.  This also allows us to avoid
using the _do_message implementation detail in our own categories.

llvm-svn: 203998
2014-03-15 04:05:59 +00:00
Rui Ueyama cec949af13 Object/COFF: change data type of SymbolNumber from int16 to uint16.
Microsoft PE/COFF Spec clearly states that the field is of signed interger
type. However, in reality, it's unsigned. If cl.exe needs to create a large
number of sections for COMDAT sections, it will just create more than 32768
sections. Handling large section number as negative number is not correct.
I think this is a spec bug.

Differential Revision: http://llvm-reviews.chandlerc.com/D3088

llvm-svn: 203986
2014-03-15 00:04:08 +00:00
Rafael Espindola c32573b2d4 Fix a bug introduced during the transition to PathV2.
sys::fs::createUniqueFile returns an absolute path, so MakeSharedObject does
too and we don't need to add a './' prefix.

Patch by Jon McLachlan.

llvm-svn: 203931
2014-03-14 15:13:35 +00:00
Alexey Samsonov aa4d29571c [C++11] Introduce SectionRef::relocations() to use range-based loops
Reviewers: rafael

Reviewed By: rafael

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3077

llvm-svn: 203927
2014-03-14 14:22:49 +00:00
Simon Atanasyan 048baca082 [yaml2obj][ELF] Use range-based for loops.
llvm-svn: 203900
2014-03-14 06:53:30 +00:00
Simon Atanasyan 4d70d2a54a [yaml2obj][ELF] Refer to a section in the error message by its name not
index.

llvm-svn: 203899
2014-03-14 06:53:25 +00:00
Simon Atanasyan 64dadc8981 [yaml2obj][ELF] Remove unused ELFState class field.
llvm-svn: 203898
2014-03-14 06:53:21 +00:00
Simon Atanasyan a3130a4bad [yaml2obj][ELF] Assign name (.shstrtab) to the section holds sections names.
llvm-svn: 203897
2014-03-14 06:53:16 +00:00
Sebastian Pop a59005be81 static link polly into tools
llvm-svn: 203886
2014-03-14 04:04:14 +00:00
Alexey Samsonov 48803e5ca9 [C++11] Use ObjectFile::sections() in commandline llvm tools
llvm-svn: 203802
2014-03-13 14:37:36 +00:00
Justin Bogner ec49f9820c Back out Profile library and dependent commits
Chandler voiced some concern with checking this in without some
discussion first. Reverting for now.

This reverts r203703, r203704, r203708, and 203709.

llvm-svn: 203723
2014-03-12 22:00:57 +00:00
Justin Bogner a1f278f96c Profile: Remove an inefficient and unnecessary API function
This was leftover from an approach I abandoned, but I forgot to update
it before committing.

llvm-svn: 203708
2014-03-12 20:26:37 +00:00
Justin Bogner bfee8d49c4 llvm-profdata: Use the Profile library, implement show and generate
This replaces the llvm-profdata tool with a version that uses the
recently introduced Profile library. The new tool has the ability to
generate and summarize profdata files as well as merging them.

llvm-svn: 203704
2014-03-12 20:14:17 +00:00
Eli Bendersky 49f6565267 Move duplicated code into a helper function (exposed through overload).
There's a bit of duplicated "magic" code in opt.cpp and Clang's CodeGen that
computes the inliner threshold from opt level and size opt level.

This patch moves the code to a function that lives alongside the inliner itself,
providing a convenient overload to the inliner creation.

A separate patch can be committed to Clang to use this once it's committed to
LLVM. Standalone tools that use the inlining pass can also avoid duplicating
this code and fearing it will go out of sync.

Note: this patch also restructures the conditinal logic of the computation to
be cleaner.

llvm-svn: 203669
2014-03-12 16:12:36 +00:00
Saleem Abdulrasool 5e1780e228 Object: rename ARMV7 to ARMNT
The official specifications state the name to be ARMNT (as per the Microsoft
Portable Executable and Common Object Format Specification v8.3).

llvm-svn: 203530
2014-03-11 03:08:37 +00:00
Sebastian Pop 02a0dd8dd1 fix polly buildbot
llvm-svn: 203492
2014-03-10 21:27:04 +00:00
Sebastian Pop e3cd1429e5 fix PR13550: add a cmake WITH_POLLY option
llvm-svn: 203486
2014-03-10 20:47:39 +00:00
Chandler Carruth c3f3da3d21 [PM] Switch new pass manager from polymorphic_ptr to unique_ptr now that
it is available. Also make the move semantics sufficiently correct to
tolerate move-only passes, as the PassManagers *are* move-only passes.

llvm-svn: 203391
2014-03-09 11:49:53 +00:00
Chandler Carruth cdf4788401 [C++11] Add range based accessors for the Use-Def chain of a Value.
This requires a number of steps.
1) Move value_use_iterator into the Value class as an implementation
   detail
2) Change it to actually be a *Use* iterator rather than a *User*
   iterator.
3) Add an adaptor which is a User iterator that always looks through the
   Use to the User.
4) Wrap these in Value::use_iterator and Value::user_iterator typedefs.
5) Add the range adaptors as Value::uses() and Value::users().
6) Update *all* of the callers to correctly distinguish between whether
   they wanted a use_iterator (and to explicitly dig out the User when
   needed), or a user_iterator which makes the Use itself totally
   opaque.

Because #6 requires churning essentially everything that walked the
Use-Def chains, I went ahead and added all of the range adaptors and
switched them to range-based loops where appropriate. Also because the
renaming requires at least churning every line of code, it didn't make
any sense to split these up into multiple commits -- all of which would
touch all of the same lies of code.

The result is still not quite optimal. The Value::use_iterator is a nice
regular iterator, but Value::user_iterator is an iterator over User*s
rather than over the User objects themselves. As a consequence, it fits
a bit awkwardly into the range-based world and it has the weird
extra-dereferencing 'operator->' that so many of our iterators have.
I think this could be fixed by providing something which transforms
a range of T&s into a range of T*s, but that *can* be separated into
another patch, and it isn't yet 100% clear whether this is the right
move.

However, this change gets us most of the benefit and cleans up
a substantial amount of code around Use and User. =]

llvm-svn: 203364
2014-03-09 03:16:01 +00:00
Craig Topper e56917c0ca [C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203345
2014-03-08 08:27:28 +00:00
Adam Nemet 5f9eb0af72 [bugpoint] Don't ignore arg in -compile-commad="tool arg"
Args is an output parameter of the function lexCommand but the reference
operator was missed.

llvm-svn: 203343
2014-03-08 07:48:19 +00:00
Dmitri Gribenko 376bf57648 Add missing std:: qualifiers
llvm-svn: 203246
2014-03-07 14:55:30 +00:00
Ahmed Charles df17c83fa8 Change MCDisassembler::setSymbolizer to take unique_ptr by value.
This changes the interface to be more explicit that ownership is being
transferred.

llvm-svn: 203223
2014-03-07 09:38:02 +00:00
Saleem Abdulrasool 35476334e9 Support: split object format out of environment
This is a preliminary setup change to support a renaming of Windows target
triples.  Split the object file format information out of the environment into a
separate entity.  Unfortunately, file format was previously treated as an
environment with an unknown OS.  This is most obvious in the ARM subtarget where
the handling for macho on an arbitrary platform switches to AAPCS rather than
APCS (as per Apple's needs).

llvm-svn: 203160
2014-03-06 20:47:11 +00:00
Rafael Espindola 39a0965a3c Fix warning about mismatched signs in comparison.
llvm-svn: 203155
2014-03-06 20:16:24 +00:00
Rafael Espindola 1194e69fe6 Fix the printing of n_type.
Despite the name, n_type contains the type of the symbol, but also if it is
extern or private extern.

llvm-svn: 203154
2014-03-06 20:13:41 +00:00
Rafael Espindola c68b0f7797 Use the existing N_STAB from the MachO namespace.
llvm-svn: 203152
2014-03-06 19:58:56 +00:00
Ahmed Charles 56440fd820 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
Chandler Carruth 6cc07df4ec [Layering] Sink Linker.h into a Linker subdirectory to make it
consistent with every other sub-library header in LLVM.

llvm-svn: 203065
2014-03-06 03:42:23 +00:00
Chandler Carruth 7da14f1ab9 [Layering] Move InstVisitor.h into the IR library as it is pretty
obviously coupled to the IR.

llvm-svn: 203064
2014-03-06 03:23:41 +00:00
Chandler Carruth 9a4c9e597b [Layering] Move DebugInfo.h into the IR library where its implementation
already lives.

llvm-svn: 203046
2014-03-06 00:46:21 +00:00
Rui Ueyama ad807658ea Attempt to unbreak little-endian buildbots.
llvm-svn: 203023
2014-03-05 23:03:37 +00:00
Ahmed Charles 96c9d95f51 [C++11] Replace OwningPtr::take() with OwningPtr::release().
llvm-svn: 202957
2014-03-05 10:19:29 +00:00
Rui Ueyama 595932f1b0 llvm-objdump: Indent unwind info contents.
Unwind info contents were indented at the same level as function table
contents. That's a bit confusing because the unwind info is pointed by
function table. In other places we usually increment indentation depth
by one when dereferncing a pointer.

This patch also removes extraneous newlines between function tables.

llvm-svn: 202879
2014-03-04 19:23:56 +00:00
Rui Ueyama 5aa88fe1e7 llvm-objdump: Fix typo in output.
llvm-svn: 202875
2014-03-04 19:03:42 +00:00
NAKAMURA Takumi c886295343 Remove out-of-date comment in llvm/tools/CMakeLists.txt.
llvm-svn: 202857
2014-03-04 16:13:21 +00:00
Chandler Carruth 1b69ed8f6a [Modules] Move the PassNameParser to the IR library as it deals in the
PassInfo structures of the legacy pass manager. Also give it the Legacy
prefix as it is not a particularly widely used header.

llvm-svn: 202839
2014-03-04 12:32:42 +00:00
Chandler Carruth 1305dc3351 [Modules] Move CFG.h to the IR library as it defines graph traits over
IR types.

llvm-svn: 202827
2014-03-04 11:45:46 +00:00
Chandler Carruth a4ea269f15 [Modules] Move ValueMap to the IR library. While this class does not
directly care about the Value class (it is templated so that the key can
be any arbitrary Value subclass), it is in fact concretely tied to the
Value class through the ValueHandle's CallbackVH interface which relies
on the key type being some Value subclass to establish the value handle
chain.

Ironically, the unittest is already in the right library.

llvm-svn: 202824
2014-03-04 11:26:31 +00:00
Chandler Carruth 219b89b987 [Modules] Move CallSite into the IR library where it belogs. It is
abstracting between a CallInst and an InvokeInst, both of which are IR
concepts.

llvm-svn: 202816
2014-03-04 11:01:28 +00:00
Chandler Carruth 442f784814 [cleanup] Re-sort all the includes with utils/sort_includes.py.
llvm-svn: 202811
2014-03-04 10:07:28 +00:00
Rui Ueyama fd3cb9e37f Fix typo.
llvm-svn: 202787
2014-03-04 04:22:41 +00:00
Rui Ueyama 8c1d4c948a Use auto for readability.
llvm-svn: 202786
2014-03-04 04:15:59 +00:00
Rui Ueyama 9c674e6851 llvm-objdump: Print x64 unwind info in executable.
The original code does not work correctly on executable files because the
code is written in such a way that only object files are assumed to be given
to llvm-objdump.

Contents of RuntimeFunction are different between executables and objects. In
executables, fields in RuntimeFunction have actual addresses to unwind info
structures. On the other hand, in object files, the fields have zero value,
but instead there are relocations pointing to the fields, so that Linker will
fill them at link-time.

So, when we are reading an object file, we need to use relocation info to
find the location of unwind info. When executable, we should just look at the
values in RuntimeFunction.

llvm-svn: 202785
2014-03-04 04:00:55 +00:00
Rui Ueyama 6dfd4e156b llvm-objdump: Split printRuntimeFunction to two small functions.
No functionality change.

llvm-svn: 202781
2014-03-04 03:08:45 +00:00
Rui Ueyama 39f1b9767a llvm-objdump: Split printCOFFUnwindInfo into small functions.
llvm-svn: 202772
2014-03-04 00:31:48 +00:00
Rui Ueyama f3fda79df0 llvm-objdump: Use range-based-for loop and fix format.
This is a small cleanup before making a bit larger change to this function.

llvm-svn: 202770
2014-03-04 00:03:09 +00:00
Tom Stellard e6ba81dae9 Add patch level to llvm version in CMake and Autoconf
The shared library generated by autoconf will now be called
libLLVM-$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)$(VERSION_SUFFIX).so
and a symlink named
libLLVM-$(VERSION_MAJOR).$(VERSION_MINOR)$(VERSION_SUFFIX).so will
also be created in the install directory.

llvm-svn: 202720
2014-03-03 15:22:00 +00:00
Richard Osborne 49ae117757 Don't emit a blank line when running llvm-config --system-libs.
Summary:
Previously llvm-config --system-libs would print something like:

$ llvm-config --system-libs

-lz -ltinfo -lrt -ldl -lm

Now we don't emit blank line. Functionality is unchanged otherwise, in
particular llvm-config --libs --system-libs still emits the LLVM libraries
and the system libraries on different lines.

Reviewers: chapuni

Reviewed By: chapuni

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2901

llvm-svn: 202719
2014-03-03 15:06:14 +00:00
Craig Topper 73156025e0 Switch all uses of LLVM_OVERRIDE to just use 'override' directly.
llvm-svn: 202621
2014-03-02 09:09:27 +00:00
Benjamin Kramer 3a377bce4e Now that we have C++11, turn simple functors into lambdas and remove a ton of boilerplate.
No intended functionality change.

llvm-svn: 202588
2014-03-01 11:47:00 +00:00
Rafael Espindola c80968e954 Centralize the handling of install_name and rpath.
This centralizes the Makefile handling of -install_name and -rpath. It also
moves the cmake build to using @rpath. The reason being that libclang needs it,
and it works for everything else.

A followup patch will move clang to using this and then there will be a single
point to edit to support other systems.

llvm-svn: 202499
2014-02-28 13:48:03 +00:00
Rui Ueyama cf39784b3a llvm-objdump: Fix crash bug with printing unwind info on stripped file.
The current COFF unwind printer tries to print SEH handler function names,
assuming that it can always find function names in string table. It crashes
if file being read has no symbol table (i.e. executable).

With this patch, llvm-objdump prints SEH handler's RVA if there's no symbol
table entry for that RVA.

llvm-svn: 202466
2014-02-28 05:21:29 +00:00
Rui Ueyama 1618fe25d1 Style fix.
llvm-svn: 202465
2014-02-28 05:21:26 +00:00
Rui Ueyama eaaf5908d9 Remove unnecessary temporary variable.
llvm-svn: 202445
2014-02-28 00:06:20 +00:00
Rafael Espindola b3d4821ae5 Don't mix the plain and keyword signatures of target_link_libraries.
llvm-svn: 202299
2014-02-26 20:39:28 +00:00
Alexey Samsonov a5f0768f5e llvm-symbolizer: use dynamic symbol table if the regular one is stripped.
llvm-svn: 202265
2014-02-26 13:10:01 +00:00
Alexey Samsonov 65056a39f3 Move getELFDynamicSymbolIterators to a public header.
llvm-svn: 202264
2014-02-26 12:51:19 +00:00
Rafael Espindola 339430f993 Use DataLayout from the module when easily available.
Eventually DataLayoutPass should go away, but for now that is the only easy
way to get a DataLayout in some APIs. This patch only changes the ones that
have easy access to a Module.

One interesting issue with sometimes using DataLayoutPass and sometimes
fetching it from the Module is that we have to make sure they are equivalent.
We can get most of the way there by always constructing the pass with a Module.
In fact, the pass could be changed to point to an external DataLayout instead
of owning one to make this stricter.

Unfortunately, the C api passes a DataLayout, so it has to be up to the caller
to make sure the pass and the module are in sync.

llvm-svn: 202204
2014-02-25 23:25:17 +00:00
Rafael Espindola f863ee2949 Store a DataLayout in Module.
Now that DataLayout is not a pass, store one in Module.

Since the C API expects to be able to get a char* to the datalayout description,
we have to keep a std::string somewhere. This patch keeps it in Module and also
uses it to represent modules without a DataLayout.

Once DataLayout is mandatory, we should probably move the string to DataLayout
itself since it won't be necessary anymore to represent the special case of a
module without a DataLayout.

llvm-svn: 202190
2014-02-25 20:01:08 +00:00
Rafael Espindola 935125126c Make DataLayout a plain object, not a pass.
Instead, have a DataLayoutPass that holds one. This will allow parts of LLVM
don't don't handle passes to also use DataLayout.

llvm-svn: 202168
2014-02-25 17:30:31 +00:00
David Blaikie 1d4736e0b1 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