Commit Graph

209394 Commits

Author SHA1 Message Date
Enrico Granata df7e79e646 Move the functions that FormatManager uses to actually load formatters into their own file
These are useful helpers over the low-level API of the FormattersContainer, and since we're actually going to start moving formatters into plugins, it makes sense to simplify things

llvm-svn: 246612
2015-09-02 01:21:31 +00:00
Jim Ingham 0e0984eebb Move things from the LanguageRuntime that obviously belong in the new Language plugin instead.
llvm-svn: 246611
2015-09-02 01:06:46 +00:00
Eric Christopher bb0cef6e9c Migrate the target attribute parsing code into an extension off of
the main attribute and cache the results so we don't have to parse
a single attribute more than once.

This reapplies r246596 with a fix for an uninitialized class member,
and a couple of cleanups and formatting changes.

llvm-svn: 246610
2015-09-02 00:12:02 +00:00
Bruce Mitchener e8433cc179 Simplify find_first_of & find_last_of on single char.
Summary:
When calling find_first_of and find_last_of on a single character,
we can instead just call find / rfind and make our intent more
clear.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 246609
2015-09-01 23:57:17 +00:00
Bruce Mitchener 11deaae8a1 Remove ABIMacOSX_i386::PrepareNormalCall().
Summary:
This was removed from the other ABI plugins long ago. This removes
a warning that was happening in this unused code as a result of
adding 2 new types to Scalar.h (e_uint128 and e_sint128).

Reviewers: clayborg

Subscribers: llvm-commits

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

llvm-svn: 246608
2015-09-01 23:51:30 +00:00
David Majnemer 088ba020dd [MC] Generate a timestamp for COFF object files
The MS incremental linker seems to inspect the timestamp written into
the object file to determine whether or not it's contents need to be
considered.  Failing to set the timestamp to a date newer than the
executable will result in the object file not participating in
subsequent links.  To ameliorate this, write the current time into the
object file's TimeDateStamp field.

llvm-svn: 246607
2015-09-01 23:46:11 +00:00
Bruce Mitchener dcad05b4eb [debugserver] Fix sign comparison warning.
Summary:
Comparing m_page_size against kInvalidPageSize was resulting in
a warning about comparing integers with different signs. Since
kInvalidPageSize isn't used anywhere outside of MachVMMemory.cpp,
we can readily transform it into a static const vm_size_t with
the correct value to avoid the sign comparison warnings.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 246606
2015-09-01 23:45:14 +00:00
Bruce Mitchener 4aed72571a Use -Wno-vla-extension globally.
Summary:
This was previously only established within debugserver, but
there is a use of the VLA extension in source/Host/macosx/Symbols.cpp,
so ignore this warning globally.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 246605
2015-09-01 23:43:51 +00:00
David Majnemer 83c862ad52 [MC] Remove MCAssembler's copy of OS
We can just ask the ObjectWriter for it's stream instead of caching
around our own reference to it.  No functionality change is intended.

llvm-svn: 246604
2015-09-01 23:19:38 +00:00
Rafael Espindola 78471f0ec1 Merge visibility from all symbols with the same name.
The ELF spec says:

... if any reference to or definition of a name is a symbol with a
non-default visibility attribute, the visibility attribute must be
propagated to the resolving symbol in the linked object. If different
visibility attributes are specified for distinct references to or
definitions of a symbol, the most constraining visibility attribute
must be propagated to the resolving symbol in the linked object. The
attributes, ordered from least to most constraining, are:
STV_PROTECTED, STV_HIDDEN and STV_INTERNAL.

llvm-svn: 246603
2015-09-01 23:12:52 +00:00
Peter Collingbourne 4c5b0a3d58 CFI: Add blacklist entries for various standard library functions.
llvm-svn: 246602
2015-09-01 23:00:56 +00:00
Jim Ingham 5a3bb64fca Fix ProcessKDP.cpp for the change in r246578.
llvm-svn: 246601
2015-09-01 22:56:59 +00:00
Hubert Tong 2cded44d82 Fix assertion failure in TransformOpaqueValueExpr
Summary:
`OpaqueValueExpr`s may not have a source expression (as in the case when
they are created due to a default argument error).
This can cause an assertion failure in `TransformOpaqueValueExpr` during
template instantiation.

This patch fixes the assertion failure.

Reviewers: hfinkel, rsmith

Subscribers: fraggamuffin, cfe-commits

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

Patch by Rachel Craik!

llvm-svn: 246600
2015-09-01 22:50:31 +00:00
Chris Bieneman 9772c6342e [autoconf] Add ___udivti3 to iOS builtins
llvm-svn: 246599
2015-09-01 22:39:04 +00:00
Eric Christopher bf91fbab3a Revert "Migrate the target attribute parsing code into an extension off of"
This is failing in release mode. Revert while I figure out what's happening.

This reverts commit r246596.

llvm-svn: 246598
2015-09-01 22:37:03 +00:00
Enrico Granata b6f8ca152a std::initializer_list is not safe to return from a function, as copies are not guaranteed to extend the lifetime of the underlying storage
llvm-svn: 246597
2015-09-01 22:24:35 +00:00
Eric Christopher 21213a7040 Migrate the target attribute parsing code into an extension off of
the main attribute and cache the results so we don't have to parse
a single attribute more than once.

llvm-svn: 246596
2015-09-01 22:03:58 +00:00
Eric Christopher b57804a134 Use hasAttr, not getAttr if we're just checking for presence.
llvm-svn: 246595
2015-09-01 22:03:56 +00:00
Ahmed Bougacha 699a9dd7c3 [ARM] Don't abort on variable-idx extractelt in ReconstructShuffle.
The code introduced in r244314 assumed that EXTRACT_VECTOR_ELT only
takes constant indices, but it does accept variables.
Bail out for those: we can't use them, as the shuffles we want to
reconstruct do require constant masks.

llvm-svn: 246594
2015-09-01 21:56:00 +00:00
Rafael Espindola ee1364f7f6 Don't leave unused strings in the string table.
llvm-svn: 246593
2015-09-01 21:47:21 +00:00
Kostya Serebryany 94dd76aefa [tsan] workaround for a crash in deadlock detector, bug https://github.com/google/sanitizers/issues/594
llvm-svn: 246592
2015-09-01 21:36:18 +00:00
David Majnemer b8ed364d8a [MS ABI] Switch to the CRC implementation in LLVM
We now have an implementation of the CRC in LLVM's libSupport.  Let's
consolidate around that one.

llvm-svn: 246591
2015-09-01 21:24:07 +00:00
David Majnemer 6ddc636862 [MC] Add support for generating COFF CRCs
COFF sections are accompanied with an auxiliary symbol which includes a
checksum.  This checksum used to be filled with just zero but this seems
to upset LINK.exe when it is processing a /INCREMENTAL link job.
Instead, fill the CheckSum field with the JamCRC of the section
contents.  This matches MSVC's behavior.

This fixes PR19666.

N.B.  A rather simple implementation of JamCRC is given.  It implements
a byte-wise calculation using the method given by Sarwate.  There are
implementations with higher throughput like slice-by-eight and making
use of PCLMULQDQ.  We can switch to one of those techniques if it turns
out to be a significant use of time.

llvm-svn: 246590
2015-09-01 21:23:58 +00:00
Nico Weber ee1cff5fab Make trunk release notes point to 3.7, not 3.6
llvm-svn: 246589
2015-09-01 21:13:14 +00:00
Nico Weber a16bc78680 Make trunk release notes point to 3.7, not 3.6
llvm-svn: 246588
2015-09-01 21:10:56 +00:00
Sanjay Patel 30145677a8 rename "slow-unaligned-mem-under-32" to slow-unaligned-mem-16" (NFCI)
This is a follow-on suggested by:
http://reviews.llvm.org/D12154 ( http://reviews.llvm.org/rL245729 )
http://reviews.llvm.org/D10662 ( http://reviews.llvm.org/rL245075 )

This makes the attribute name match most of the existing lowering logic
and regression test expectations.

But the current use of this attribute is inconsistent; see the FIXME
comment for "allowsMisalignedMemoryAccesses()". That change will
result in functional changes and should be coming soon.

llvm-svn: 246585
2015-09-01 20:51:51 +00:00
Peter Collingbourne 87202a4aac gold-plugin: Implement parallel LTO code generation using llvm::splitCodeGen.
Parallelism can be enabled using a new plugin option, jobs=N, where N is
the number of code generation threads.

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

llvm-svn: 246584
2015-09-01 20:40:22 +00:00
Rafael Espindola 5b3942f54a Don't include hidden or internal symbols in the symbol table.
llvm-svn: 246583
2015-09-01 20:36:51 +00:00
Richard Smith d88a7f1a92 Re-commit r246497 (and dependent changes r246524 and r246521), reverted in
r246546, with a workaround for an MSVC 2013 miscompile and an MSVC 2015
rejects-valid.

Original commit message:

[modules] Rework serialized DeclContext lookup table management. Instead of
walking the loaded ModuleFiles looking for lookup tables for the context, store
them all in one place, and merge them together if we find we have too many
(currently, more than 4). If we do merge, include the merged form in our
serialized lookup table, so that downstream readers never need to look at our
imports' tables.

This gives a huge performance improvement to builds with very large numbers of
modules (in some cases, more than a 2x speedup was observed).

llvm-svn: 246582
2015-09-01 20:35:42 +00:00
Rafael Espindola 7f37775e56 Every symbol now has an Elf_Sym. Simplify. NFC.
llvm-svn: 246581
2015-09-01 20:30:52 +00:00
Enrico Granata 45a98fffa5 Add logging to a couple of regions of code
llvm-svn: 246580
2015-09-01 20:11:13 +00:00
Zachary Turner 1d397bfe40 Make ProcessWindows not create a strong reference to itself.
llvm-svn: 246579
2015-09-01 20:02:44 +00:00
Zachary Turner 7529df9abd Have the Process hold a weak_ptr to the Target.
llvm-svn: 246578
2015-09-01 20:02:29 +00:00
Rafael Espindola 06c3a6d676 Start recording st_other (i.e. visibility).
llvm-svn: 246577
2015-09-01 19:42:38 +00:00
Yaron Keren 95e6d9ebbd Add \n to the regex in clang-tidy-diff.py in order to fix http://llvm.org/PR24637,
git usecase for multiple files diff.

llvm-svn: 246575
2015-09-01 19:08:17 +00:00
Oleksiy Vyalov e7eabbb550 Make remote-android platform to use dynamic local tcp ports when forwarding device ports.
http://reviews.llvm.org/D12510

llvm-svn: 246574
2015-09-01 19:02:14 +00:00
Eli Bendersky 8ea8b343c4 Fix typo in test
llvm-svn: 246573
2015-09-01 18:56:19 +00:00
Benjamin Kramer cbf9bc35d2 Remove OutputBuffer.
This was last used by the pre-MC object emitter and has been dead for
quite a while. We have better ways to emit endian-dependent stuff now.

llvm-svn: 246571
2015-09-01 18:25:34 +00:00
Zachary Turner 81ab77d424 Un-XFAIL a couple tests that are now passing.
llvm-svn: 246570
2015-09-01 18:25:05 +00:00
Zachary Turner bc556d382b XFAIL TestHelloWorld on Windows.
https://llvm.org/pr24600

llvm-svn: 246569
2015-09-01 18:24:49 +00:00
Enrico Granata 980c0484c5 Add support for language plugins to provide data formatters (second attempt)
Historically, data formatters all exist in a global repository (the category map)
On top of that, some formatters can be "hardcoded" when the conditions under which they apply are not expressible as a typename (or typename regex)

This change paves the way to move formatters into per-language buckets such that the C++ plugin is responsible for ownership of the C++ formatters, and so on
The advantages of this are:
a) language formatters only get created when they might apply
b) formatters for a language are clearly owned by the matching language plugin

The current model is one of static instantiation, that is a language knows the full set of formatters it vends and that is only asked-for once, and then handed off to the FormatManager
In a future revision it might be interesting to add similar ability to the language runtimes, and monitor for certain shared library events to add even more library-specific formatters

No formatters are moved as part of this change, so practically speaking this is NFC

llvm-svn: 246568
2015-09-01 18:22:39 +00:00
Tobias Grosser 2df884f95a ScopInfo: use project_out instead of remove_dims
By just removing dimensions (and the constraints they are involved in) we
may loose information about the dimensions we do not remove. By instead
using project_out, we are sure all constraints on the outer dimensions are
preserved.

No test case, as this error condition is very unlikely to be triggered by
isl's current code. We still 'fix' this, as isl gives little guarantees
regarding the behavior of remove_divs.

llvm-svn: 246567
2015-09-01 18:17:41 +00:00
Reid Kleckner a71dabd591 Mark the log_path ubsan test as requiring a shell. It uses globs.
llvm-svn: 246566
2015-09-01 18:17:21 +00:00
Eric Christopher e9cdcaee7b Pull initFeatureMap out of line now that it's used in multiple places.
llvm-svn: 246565
2015-09-01 18:13:20 +00:00
Hans Wennborg dada1d20ba DeadArgElim: don't eliminate arguments from naked functions
Differential Revision: http://reviews.llvm.org/D12534

llvm-svn: 246564
2015-09-01 18:06:46 +00:00
Sean Callanan 761844be66 When looking up types, find the first type we can import rather than just taking
the first type we find and failing if it can't be imported.

llvm-svn: 246563
2015-09-01 18:00:35 +00:00
Sean Callanan 77bc4d12c7 Add a predicate to allow a ClangASTContext to identify Clang types.
llvm-svn: 246562
2015-09-01 17:58:03 +00:00
Artem Belevich 020d4fb17f New bitcode linker flags:
-only-needed -- link in only symbols needed by destination module
-internalize -- internalize linked symbols

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

llvm-svn: 246561
2015-09-01 17:55:55 +00:00
Ed Maste 6194363b31 Exclude COFF/export-exe.test on non-Windows
llvm-svn: 246559
2015-09-01 17:26:33 +00:00
Adrian McCarthy 6c3d03c468 Implement DoReadMemory for Windows mini dumps.
Differential Revision: http://reviews.llvm.org/D12507

llvm-svn: 246558
2015-09-01 16:59:31 +00:00