Commit Graph

7367 Commits

Author SHA1 Message Date
Davide Italiano
fab897dd11 [lib/LTO] Add a way to run a custom pipeline
Differential Revision:  https://reviews.llvm.org/D24095

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280830 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-07 17:46:16 +00:00
Davide Italiano
19c8b5e70c [opt] Remove an unused argument to runPassPipeline().
I have plans to use this API also in libLTO (and maybe lld).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280770 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-07 00:48:47 +00:00
Zachary Turner
8eddc0f657 Re-add "Make FieldList records print as a YAML sequence"
This was originally submitted in r280549, and reverted in r280577
due to breaking one MSVC buildbot.  The issue is that MSVC 2013
doesn't synthesize move constructors.  So even though i was
writing std::move(A) it was copying it, leading to a bogus ArrayRef.
The solution here is to simply remove the std::vector<> from the
type, since it is unused and unnecessary.  This way the ArrayRef
continues to point into the original memory backing the CVType.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280769 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-06 23:45:47 +00:00
Vedant Kumar
423e0ff90b [llvm-cov] Use colors consistently in the summary
Use the same color for counts and percentages. There doesn't seem to be
a reason for them to be different, and the summary looks more consistent
this way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280765 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-06 22:46:00 +00:00
Vedant Kumar
ff7a0df044 [llvm-cov] Clean up the summary class, delete dead code (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280764 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-06 22:45:57 +00:00
Ying Yi
84f34c0155 [llvm-cov] Add the project summary to the text coverage report for each source file.
This patch is a spin-off from https://reviews.llvm.org/D23922. It extends the text view to preserve the same feature as the html view.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280756 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-06 21:41:38 +00:00
Ying Yi
f73cd14f4a [llvm-cov] Add the "Go to first unexecuted line" feature.
This patch provides easy navigation to find the zero count lines, especially useful when the source file is very large.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280739 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-06 19:31:18 +00:00
Rafael Espindola
ec44cfdaf0 Add an c++ itanium demangler to llvm.
This adds a copy of the demangler in libcxxabi.

The code also has no dependencies on anything else in LLVM. To enforce
that I added it as another library. That way a BUILD_SHARED_LIBS will
fail if anyone adds an use of StringRef for example.

The no llvm dependency combined with the fact that this has to build
on linux, OS X and Windows required a few changes to the code. In
particular:

    No constexpr.
    No alignas

On OS X at least this library has only one global symbol:
__ZN4llvm16itanium_demangleEPKcPcPmPi

My current plan is:

    Commit something like this
    Change lld to use it
    Change lldb to use it as the fallback

    Add a few #ifdefs so that exactly the same file can be used in
    libcxxabi to export abi::__cxa_demangle.

Once the fast demangler in lldb can handle any names this
implementation can be replaced with it and we will have the one true
demangler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280732 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-06 19:16:48 +00:00
Justin Bogner
d8090aef78 bugpoint: Return Errors instead of passing around strings
This replaces the threading of `std::string &Error` through all of
these APIs with checked Error returns instead. There are very few
places here that actually emit any errors right now, but threading the
APIs through will allow us to replace a bunch of exit(1)'s that are
scattered through this code with proper error handling.

This is more or less NFC, but does move around where a couple of error
messages are printed out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280720 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-06 17:18:22 +00:00
Justin Bogner
79a93a638f Revert "bugpoint: Stop threading errors through APIs that never fail"
This isn't the right thing to do - it turns out a number of the APIs
that "never fail" just exit(1) if something bad happens. We can and
should thread Error through this instead.

That diff will make more sense with this reverted. Sorry for the
noise.

This reverts r280690

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280691 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-06 04:45:37 +00:00
Justin Bogner
3023eeb500 bugpoint: Stop threading errors through APIs that never fail
This simplifies ListReducer and most of its subclasses by removing the
std::string &Error that was threaded through all of them but almost
never used. If we end up needing error handling in more places here we
can reinstate it using llvm::Error instead of these unwieldy strings.

The 2 cases (out of 12) that actually can hit the error cases are a
little bit awkward now, but those will clean up as I refactor this API
further.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280690 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-06 04:04:13 +00:00
Lang Hames
b80c6300c5 [ORC] Clone module flags metadata into the globals module in the
CompileOnDemandLayer.

Also contains a tweak to the orc-lazy jit in LLI to enable the test case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280632 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-04 17:53:30 +00:00
Nico Weber
b210b2b944 Revert r280549.
The test it added doesn't pass:
http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/15318/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3Apdbdump-yaml-types.test

Command Output (stdout):
--
$ "D:/buildslave/clang-x64-ninja-win7/stage1/./bin\llvm-pdbdump.EXE" "pdb2yaml" "-tpi-stream" "D:\buildslave\clang-x64-ninja-win7\llvm\test\DebugInfo\PDB/Inputs/empty.pdb"
$ "D:/buildslave/clang-x64-ninja-win7/stage1/./bin\FileCheck.EXE" "-check-prefix=YAML" "D:\buildslave\clang-x64-ninja-win7\llvm\test\DebugInfo\PDB\pdbdump-yaml-types.test"
# command stderr:
D:\buildslave\clang-x64-ninja-win7\llvm\test\DebugInfo\PDB\pdbdump-yaml-types.test:36:7: error: expected string not found in input
YAML: Name: apartment
      ^
<stdin>:153:10: note: scanning from here
 Value: 161
         ^


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280577 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-03 03:18:49 +00:00
Zachary Turner
c8582b7e39 [codeview] Make FieldList records print as a yaml sequence.
Before we were kind of imitating the behavior of a Yaml sequence
by outputting each record one after the other.  This makes it a
little cumbersome when we want to go the other direction -- from
Yaml to Pdb.  So this treats FieldList records as no different than
any other list of records, by printing them as a Yaml sequence with
the exact same format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280549 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-02 22:19:01 +00:00
George Rimar
677dd5b404 [llvm-readobj] - Teach readobj to print DT_AUXILIARY dynamic tag in human readable form.
Previously DT_AUXILIARY was unknown, patch fixes that.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280471 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-02 07:35:19 +00:00
Justin Bogner
388e8b9df2 bugpoint: clang-format all of bugpoint. NFC
I'm going to clean up the APIs here a bit and touch many many lines
anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280450 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-02 01:21:37 +00:00
Justin Bogner
1879d5cc54 bugpoint: clang-format and modernize comments in ListReducer. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280414 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-01 21:04:36 +00:00
Hal Finkel
f73c9c11e7 Add a counter-function insertion pass
As discussed in https://reviews.llvm.org/D22666, our current mechanism to
support -pg profiling, where we insert calls to mcount(), or some similar
function, is fundamentally broken. We insert these calls in the frontend, which
means they get duplicated when inlining, and so the accumulated execution
counts for the inlined-into functions are wrong.

Because we don't want the presence of these functions to affect optimizaton,
they should be inserted in the backend. Here's a pass which would do just that.
The knowledge of the name of the counting function lives in the frontend, so
we're passing it here as a function attribute. Clang will be updated to use
this mechanism.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280347 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-01 09:42:39 +00:00
Zachary Turner
0ae82de8f5 [codeview] Have visitTypeBegin return the record type.
Previously we were assuming that any visitation of types would
necessarily be against a type we had binary data for.  Reasonable
assumption when were just reading PDBs and dumping them, but once
we start writing PDBs from Yaml this breaks down, because we have
no binary data yet, only Yaml, and from that we need to read the
record kind and perform the switch based on that.

So this patch does that.  Instead of having the visitor switch
on the kind that is already in the CVType record, we change the
visitTypeBegin() method to return the Kind, and switch on the
returned value.  This way, the default implementation can still
return the value from the CVType, but the implementation which
visits Yaml records and serializes binary PDB type records can
use the field in the Yaml as the source of the switch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280307 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 23:14:31 +00:00
Reid Kleckner
9df3fb3d31 Fix the MSVC 2013 build by using Elf_Word instead of making a local typedef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280304 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 22:45:36 +00:00
Zachary Turner
4d1149db48 [codeview] Add TypeVisitorCallbackPipeline.
We were kind of hacking this together before by embedding the
ability to forward requests into the TypeDeserializer.  When
we want to start adding more different kinds of visitor callback
interfaces though, this doesn't scale well and is very inflexible.

So introduce the notion of a pipeline, which itself implements
the TypeVisitorCallbacks interface, but which contains an internal
list of other callbacks to invoke in sequence.

Also update the existing uses of CVTypeVisitor to use this new
pipeline class for deserializing records before visiting them
with another visitor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280293 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 21:42:26 +00:00
Vedant Kumar
751f50e8f5 [llvm-cov] Drop redundant "No." suffix in a column title
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280181 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-31 00:09:44 +00:00
Saleem Abdulrasool
deb6eadc08 llvm-readobj: speculative fix for MSVC
Use the typedef rather than using to type alias the typename.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280158 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 21:21:07 +00:00
Hemant Kulkarni
911b0b869e Revert "ELFDumper: Unversioned symbols must not have trailing @"
This reverts commit 8df7a877949e8782a3a28e3ecdb0770c1e444056.

Fixing other repositories and adding changes together.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280152 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 20:42:46 +00:00
Hemant Kulkarni
b16d4d3441 ELFDumper: Unversioned symbols must not have trailing @
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280140 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 19:50:02 +00:00
Saleem Abdulrasool
b899d1987d llvm-readobj: add support for printing GNU Notes
Add support for printing the GNU Notes.  This allows an easy way to view the
build id for a binary built with the build id.  Currently, this only handles the
GNU notes, though it would be easy to extend for other note types (default,
FreeBSD, NetBSD, etc).  Only the GNU style is supported currently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280131 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 18:52:02 +00:00
Ying Yi
696fea911d [llvm-cov] Use the native path in the coverage report.
The coverage reports contain the source or binary file paths. On Windows, 
the file path might contain the seperators of both '/' and '\'. This patch 
uses the native path in the coverage reports. For example, on Windows, 
all '/' are converted to '\'.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280061 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 07:01:37 +00:00
Lang Hames
572aa19a18 [Orc] Simplify LogicalDylib and move it back inside CompileOnDemandLayer. Also
switch to using one indirect stub manager per logical dylib rather than one per
input module.

LogicalDylib is a helper class used by the CompileOnDemandLayer to manage
symbol resolution between modules during lazy compilation. In particular, it
ensures that internal symbols resolve correctly even in the case where multiple
input modules contain the same internal symbol name (which must to be promoted
to external hidden linkage so that functions in any given module can be split
out by lazy compilation). LogicalDylib's resolution scheme (before this commit)
required one stub-manager per input module. This made recompilation of functions
(by adding a module containing a new definition) difficult, as the stub manager
for any given symbol was bound to the module that supplied the original
definition. By using one stubs manager for the whole logical dylib symbols can
be more easily replaced, although support for doing this is not included in this
patch (it will be implemented in a follow up).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279952 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-29 00:54:29 +00:00
Teresa Johnson
d80408f437 [ThinLTO] Move loading of cache entry to client
Summary:
Have the cache pass back the path to the cache entry when it
is ready to be loaded, instead of a buffer.

For gold-plugin we can simply pass this file back to gold directly,
which avoids expensive writing of a separate tmp file. Ensure
the cache entry is not deleted on cleanup by adjusting the setting
of the IsTemporary flags.

Moved the loading of the buffer into llvm-lto2 to maintain current
behavior.

Reviewers: mehdi_amini

Subscribers: llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279883 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-26 23:29:14 +00:00
Hemant Kulkarni
c76060f385 llvm-objdump: ELF: Handle code and data mix in all scenarios
Differential Revision: https://reviews.llvm.org/D23621

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279770 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-25 19:41:08 +00:00
Teresa Johnson
57b248aeba [ThinLTO/gold] Add caching support to gold-plugin
Summary:
With support now in the new LTO API for caching (r279576), add
optional ThinLTO caching in the gold-plugin.

Reviewers: mehdi_amini

Subscribers: mehdi_amini, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279631 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 15:11:47 +00:00
Ying Yi
1461e992f9 [llvm-cov] Add the project summary to each source file coverage report.
This patch includes the following changes:
- Included header "Code coverage report" and include the date that the report was created.
- Included title (as specified in a command line option, (i.e llvm-cov  -project-title="Simple Test")
- In the summary, list the elf files that the source code file has contributed to.
- Used column heading for "Line No.", "Count No.", Source".

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279628 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 14:27:23 +00:00
Matthias Braun
fa5c5c7db3 CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePasses
Re-apply this patch, hopefully I will get away without any warnings
in the constructor now.

This patch removes the MachineFunctionAnalysis. Instead we keep a
map from IR Function to MachineFunction in the MachineModuleInfo.

This allows the insertion of ModulePasses into the codegen pipeline
without breaking it because the MachineFunctionAnalysis gets dropped
before a module pass.

Peak memory should stay unchanged without a ModulePass in the codegen
pipeline: Previously the MachineFunction was freed at the end of a codegen
function pipeline because the MachineFunctionAnalysis was dropped; With
this patch the MachineFunction is freed after the AsmPrinter has
finished.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279602 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 01:52:46 +00:00
Matthias Braun
43f89c5079 MachineModuleInfo: Avoid dummy constructor, use INITIALIZE_TM_PASS
Change this pass constructor to just accept a const TargetMachine * and
use INITIALIZE_TM_PASS, that way we can get rid of the dummy
constructor. The pass will still fail when calling the default
constructor leading to TM == nullptr, this is no different than before
but is more in line what other codegen passes are doing and avoids the
dummy constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279598 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-24 00:42:05 +00:00
Richard Smith
5a65f77485 Revert r279564. It introduces undefined behavior (binding a reference to a
dereferenced null pointer) in MachineModuleInfo::MachineModuleInfo that causes
-Werror builds (including several buildbots) to fail.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279580 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-23 22:08:27 +00:00
Mehdi Amini
242275b349 [ThinLTO] Add caching to the new LTO API
Add the ability to plug a cache on the LTO API.
I tried to write such that a linker implementation can
control the cache backend. This is intrusive and I'm
not totally happy with it, but I can't figure out a
better design right now.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279576 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-23 21:30:12 +00:00
Matthias Braun
1bb228f703 CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePasses
Re-apply this commit with the deletion of a MachineFunction delegated to
a separate pass to avoid use after free when doing this directly in
AsmPrinter.

This patch removes the MachineFunctionAnalysis. Instead we keep a
map from IR Function to MachineFunction in the MachineModuleInfo.

This allows the insertion of ModulePasses into the codegen pipeline
without breaking it because the MachineFunctionAnalysis gets dropped
before a module pass.

Peak memory should stay unchanged without a ModulePass in the codegen
pipeline: Previously the MachineFunction was freed at the end of a codegen
function pipeline because the MachineFunctionAnalysis was dropped; With
this patch the MachineFunction is freed after the AsmPrinter has
finished.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279564 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-23 20:58:29 +00:00
Matthias Braun
eb3b7392bb Revert "(HEAD -> master, origin/master, origin/HEAD) CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePasses"
Reverting while tracking down a use after free.

This reverts commit r279502.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279503 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-23 05:17:11 +00:00
Matthias Braun
ded269b907 CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePasses
This patch removes the MachineFunctionAnalysis. Instead we keep a
map from IR Function to MachineFunction in the MachineModuleInfo.

This allows the insertion of ModulePasses into the codegen pipeline
without breaking it because the MachineFunctionAnalysis gets dropped
before a module pass.

Peak memory should stay unchanged without a ModulePass in the codegen
pipeline: Previously the MachineFunction was freed at the end of a codegen
function pipeline because the MachineFunctionAnalysis was dropped; With
this patch the MachineFunction is freed after the AsmPrinter has
finished.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279502 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-23 03:20:09 +00:00
Mehdi Amini
b41bec0822 Fix Gold Plugin after API change in the LTO API (constify callback type)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279440 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-22 16:41:58 +00:00
Mehdi Amini
156e0dace9 [LTO] Handles commons in monolithic LTO
The gold-plugin was doing this internally, now the API is handling
commons correctly based on the given resolution.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279417 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-22 06:25:46 +00:00
Teresa Johnson
f4b6540880 [gold/ThinLTO] Restore ThinLTO file management in gold plugin
Summary:
The gold-plugin changes added along with the new LTO API in r278338 had
the effect of removing the management of the PluginInputFile that
ensured the files weren't released back to gold until the backend
threads were complete. Add back the old file handling.

Fixes PR29020.

Reviewers: mehdi_amini

Subscribers: mehdi_amini, llvm-commits, hjl.tools

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279356 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-20 01:24:07 +00:00
Mehdi Amini
cb9042aab4 [LTO] Add the ability to test -thinlto-emit-imports-files through llvm-lto2
Summary:
Start bringing llvm-lto2 to a level where we can test the LTO API
a bit deeper.

Reviewers: tejohnson

Subscribers: llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279349 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-19 23:54:40 +00:00
Hemant Kulkarni
f20ce37e8e llvm-objdump: Add Hexagon printer changes for -S/-l options
Differential Revision: https://reviews.llvm.org/D23521

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279161 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-18 21:50:13 +00:00
Chris Bieneman
3ada6da157 [CMake] Minor fix to regex in r279152
The third version component is optional in Xcode's version spew, so we need to make it optional in the regex.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279153 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-18 21:36:36 +00:00
Chris Bieneman
1282ae48c8 [CMake] Support for generating Xcode 8 compatible toolchains
Xcode 8 requires toolchain compatibility version 2. This allows us to select the correct compatibility version based on the installed version of Xcode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279152 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-18 21:32:48 +00:00
Zachary Turner
3fe902e45f Resubmit "Write the TPI stream from a PDB to Yaml."
The original patch was breaking some buildbots due to an
incorrect ordering of function definitions which caused some
compilers to recognize a definition but others to not.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279089 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-18 16:49:29 +00:00
Saleem Abdulrasool
8a8360251d llvm-objdump: add coff import library symbol listing support
This adds behaviour similar to binutils' objdump which can show symbols in an
import library.  Differences from that stem around the fact that we do not
create section symbols nor the all import import descriptor symbol reference.
However, this does mean that the tool can serve as a possible replacement for
the existing tool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279088 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-18 16:39:19 +00:00
Saleem Abdulrasool
cec5045f78 llvm-readobj: handle import libraries with -coff-exports
`link -dump -exports` lists exported symbols from import libraries as well as
normal dlls.  Ensure that we can handle import libraries as well in
llvm-readobj.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279069 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-18 14:32:11 +00:00
Teresa Johnson
b798b8ca89 [ThinLTO] Keep common symbols in ThinLTO modules
Summary:
Skip the merging of common symbols for ThinLTO modules, they will be
merged by the final native object link. Trying to merge the symbols and
add to a combined module will incorrectly enable the common symbol to be
internalized in the ThinLTO module. Additionally, we will not want to
create a combined module for ThinLTO distributed builds.

This fixes failures in 7 cpu2006 benchmarks from the new LTO API in
ThinLTO mode.

Reviewers: mehdi_amini

Subscribers: pcc, llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279023 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-18 01:08:50 +00:00