Commit Graph

175599 Commits

Author SHA1 Message Date
Rafael Espindola f145137516 Don't assume an implicit error_code -> bool operator.
llvm-svn: 210070
2014-06-03 04:40:55 +00:00
Greg Fitzgerald 796fba4cd9 Fix Android build after r210053
llvm-svn: 210069
2014-06-03 04:29:46 +00:00
Nick Lewycky 5f53ddd0cc Ignore line numbers on debug intrinsics. Add an assert to ensure that we aren't emitting line number zero, the .gcno format uses this to indicate that the next field is a filename.
llvm-svn: 210068
2014-06-03 04:25:36 +00:00
Jiangning Liu cc4f38bc28 [AArch64] Correctly deal with VPR stack parameter passing.
llvm-svn: 210067
2014-06-03 03:25:09 +00:00
Rui Ueyama 9aee050a0c Remove group-parent references.
Previously section groups are doubly linked to their children.
That is, an atom representing a group has group-child references
to its group contents, and content atoms also have group-parent
references to the group atom. That relationship was invariant;
if X has a group-child edge to Y, Y must have a group-parent
edge to X.

However we were not using group-parent references at all. The
resolver only needs group-child edges.

This patch simplifies the section group by removing the unused
reverse edge. No functionality change intended.

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

llvm-svn: 210066
2014-06-03 03:07:49 +00:00
Alp Toker 552f2f7b96 Process::GetRandomNumber(): fix insecure RNG
This could have generated non-random output under error conditions in release
builds.

llvm-svn: 210065
2014-06-03 03:01:03 +00:00
Nikola Smiljanic b8f8099895 Move DR532 test where it belongs.
llvm-svn: 210064
2014-06-03 02:56:59 +00:00
Rafael Espindola 27c60b512a Update for llvm API change.
Aliases in llvm now hold an arbitrary expression.

llvm-svn: 210063
2014-06-03 02:42:01 +00:00
Rafael Espindola 64c1e18033 Allow alias to point to an arbitrary ConstantExpr.
This  patch changes GlobalAlias to point to an arbitrary ConstantExpr and it is
up to MC (or the system assembler) to decide if that expression is valid or not.

This reduces our ability to diagnose invalid uses and how early we can spot
them, but it also lets us do things like

@test5 = alias inttoptr(i32 sub (i32 ptrtoint (i32* @test2 to i32),
                                 i32 ptrtoint (i32* @bar to i32)) to i32*)

An important implication of this patch is that the notion of aliased global
doesn't exist any more. The alias has to encode the information needed to
access it in its metadata (linkage, visibility, type, etc).

Another consequence to notice is that getSection has to return a "const char *".
It could return a NullTerminatedStringRef if there was such a thing, but when
that was proposed the decision was to just uses "const char*" for that.

llvm-svn: 210062
2014-06-03 02:41:57 +00:00
David Majnemer 2dfdfdf45c [libc++] Don't return uninitialized data from random_device::operator()
Make sure we appropriately retry calls to read if the return result is
less than what we asked for.

Additionally, check and handle IO errors: EINTR results in the read
operation getting restarted; other errors turn into exceptions.

llvm-svn: 210061
2014-06-03 02:40:39 +00:00
David Majnemer 1e9592a9c7 [libc++] random_device fails if open returns zero
random_device::random_device(const string&) wrongly assumes that open
can only validly return a file descriptor greater than zero.

This results in random_device believing that it didn't successfully open
the device causing it to throw in it's constructor, this ends up leaking
a file descriptor.

The fix is simple, don't error on file descriptors which are zero.

llvm-svn: 210060
2014-06-03 02:21:37 +00:00
Alp Toker cf2048bbb3 Fix -emit-codegen-only to not generate binaries
llvm-svn: 210059
2014-06-03 02:14:20 +00:00
Alp Toker 0e64e0d4fd Eliminate redundant MangleBuffer class
The only remaining user didn't actually use the non-dynamic storage facility
this class provides.

The std::string is transitional and likely to be StringRefized shortly.

llvm-svn: 210058
2014-06-03 02:13:57 +00:00
Rui Ueyama 23487e878b Make dead-striping to handle reverse edges.
Layout-before edges are no longer used for layout, but they are
still there for dead-stripping. If we would just remove them
from code, LLD would wrongly remove live atoms that were
referenced by layout-befores.

This patch fixes the issue. Before dead-stripping, it scans all
atoms to construct a reverse map for layout-after edges. Dead-
stripping pass uses the map to traverse the graph.

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

llvm-svn: 210057
2014-06-03 01:59:02 +00:00
Marshall Clow f39d914d33 First cut at a post c++14 status page
llvm-svn: 210056
2014-06-02 23:37:13 +00:00
Hans Wennborg da24e9cee3 Itanium ABI: Update getAddrOfVTable to set the DLL storage class for vtables
This corresponds to the same change for the MS ABI in r209908.

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

llvm-svn: 210054
2014-06-02 23:13:03 +00:00
Greg Fitzgerald 0f7f731966 Cleanup Android build and provide better diagnostics
No longer need to set ANDROID if COMPILER_RT_TEST_TARGET_TRIPLE is
arm-linux-androideabi.

No need to set ANDROID_COMMON_FLAGS.  These flags are already in
CMAKE_CXX_FLAGS which are used in try_compile().

llvm-svn: 210053
2014-06-02 23:11:24 +00:00
Rafael Espindola d1a2c2d905 Add back commit r210029.
The code was actually correct. Sorry for the confusion. I have expanded the
comment saying why the analysis is valid to avoid me misunderstaning it
again in the future.

llvm-svn: 210052
2014-06-02 22:01:04 +00:00
Greg Clayton 4bd024d4e8 Small cleanups for the new enum fixes:
- Fix Xcode project to have source files for SBTypeEnumMember.h/SBTypeEnumMember.cpp in the right place
- Rename a member variable to inluce "_sp" suffix since it is a shared pointer
- Cleanup initialization code for TypeEnumMemberImpl to not warn about out of order initialization

llvm-svn: 210051
2014-06-02 21:58:30 +00:00
Will Schmidt 22b065c748 allow optional signext attribute
Allow the tests to succeed with tne signext (or other) attribute is present.  The attributes
show up for Power, but not for x86*, so need to be appropriately wildcarded.

llvm-svn: 210050
2014-06-02 21:47:14 +00:00
Rafael Espindola 80546be566 Convert test to FileCheck.
llvm-svn: 210049
2014-06-02 21:23:54 +00:00
Rafael Espindola 582c890fbe Revert "Add the nsw flag when we detect that an add will not signed overflow."
This reverts commit r210029.

It was not correctly handling cases where LHS and RHS had multiple but different
sign bits.

llvm-svn: 210048
2014-06-02 21:12:19 +00:00
Alexey Samsonov 3c6b0c078e Delete apparently unused method
llvm-svn: 210047
2014-06-02 21:05:54 +00:00
Todd Fiala 732215f989 Add support for inspecting enum members.
Change by Russell Harmon.

Xcode project updates (and all errors therein)
by Todd Fiala.

llvm-svn: 210046
2014-06-02 20:55:29 +00:00
Eric Christopher d91d605f7f InitLibcallNames can take a Triple instead of a TargetMachine.
llvm-svn: 210045
2014-06-02 20:51:49 +00:00
Alexander Kornienko 348cae8e2b Never filter-out compile errors in clang-tidy, display them as errors.
Summary:
No filters should affect the display of errors. Fixed a few tests,
which had compile errors.

We need to think what we should do with mapped errors (-Werror).

Reviewers: klimek

Reviewed By: klimek

Subscribers: cfe-commits

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

llvm-svn: 210044
2014-06-02 20:44:32 +00:00
Alexander Kornienko fbf9258582 Exit with error when no checks enabled.
Summary:
This seems like a more appropriate reaction to the user specifying a
single check with a wrong name, for example.

Reviewers: klimek

Reviewed By: klimek

Subscribers: cfe-commits

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

llvm-svn: 210043
2014-06-02 20:32:06 +00:00
Michael J. Spencer 5ce26687f2 [CodeGen] Don't use SizeTy for EmitNeonSplat.
llvm-svn: 210042
2014-06-02 19:48:59 +00:00
Alexey Samsonov cfe93d3e54 Remove unused variable
llvm-svn: 210041
2014-06-02 19:45:14 +00:00
Rafael Espindola 6b04ef785e Added support to optimize comparisons with "lshr exact" of a constant.
Patch by Rahul Jain.

llvm-svn: 210040
2014-06-02 19:19:04 +00:00
Hans Wennborg febdcb0a78 Fix comment vs function name mismatch
llvm-svn: 210039
2014-06-02 18:50:54 +00:00
Alexey Samsonov 6d8bab82df Remove sanitizer blacklist from ASan/TSan/MSan function passes.
Instrumentation passes now use attributes
address_safety/thread_safety/memory_safety which are added by Clang frontend.
Clang parses the blacklist file and adds the attributes accordingly.

Currently blacklist is still used in ASan module pass to disable instrumentation
for certain global variables. We should fix this as well by collecting the
set of globals we're going to instrument in Clang and passing it to ASan
in metadata (as we already do for dynamically-initialized globals and init-order
checking).

This change also removes -tsan-blacklist and -msan-blacklist LLVM commandline
flags in favor of -fsanitize-blacklist= Clang flag.

llvm-svn: 210038
2014-06-02 18:08:27 +00:00
Alexey Samsonov 1cf07ea6bb Remove sanitizer blacklist from ASan/TSan/MSan function passes.
Instrumentation passes now use attributes
address_safety/thread_safety/memory_safety which are added by Clang frontend.
Clang parses the blacklist file and adds the attributes accordingly.

Currently blacklist is still used in ASan module pass to disable instrumentation
for certain global variables. We should fix this as well by collecting the
set of globals we're going to instrument in Clang and passing it to ASan
in metadata (as we already do for dynamically-initialized globals and init-order
checking).

This change also removes -tsan-blacklist and -msan-blacklist LLVM commandline
flags in favor of -fsanitize-blacklist= Clang flag.

llvm-svn: 210037
2014-06-02 18:08:08 +00:00
Todd Fiala a4ec2fcff9 Add executable extension to debugger name, run dotest via binary.
See http://reviews.llvm.org/D3904 for details.

Change by Scott Graham.

llvm-svn: 210036
2014-06-02 17:49:35 +00:00
Todd Fiala 4dc625281d Fix most of the remaining Windows build warnings.
See http://reviews.llvm.org/D3944 for more details.

Change by Zachary Turner.

llvm-svn: 210035
2014-06-02 17:30:22 +00:00
Eric Christopher a84189a2e4 Omit else branch after return.
llvm-svn: 210034
2014-06-02 17:29:07 +00:00
David Blaikie f9ea242d4f CGDebugInfo: Simplify/invert createLexicalBlock parameter construction.
llvm-svn: 210033
2014-06-02 16:32:05 +00:00
Andrea Di Biagio 4760813831 [X86] Fix checked arithmetic for i8 on X86.
When lowering a ISD::BRCOND into a test+branch, make sure that we
always use the correct condition code to emit the test operation.

This fixes PR19858: "i8 checked mul is wrong on x86".

Patch by Keno Fisher!

llvm-svn: 210032
2014-06-02 16:00:27 +00:00
Daniel Jasper 88996755cb clang-tidy: Extend the use-override check to understand 'final'.
llvm-svn: 210031
2014-06-02 15:22:22 +00:00
Timur Iskhodzhanov b1415c46fb [ASan Win] Manually call __asan_init early in the DLL initialization process to avoid a null function call in cout/cerr constructors
llvm-svn: 210030
2014-06-02 14:40:07 +00:00
Rafael Espindola 82899febf0 Add the nsw flag when we detect that an add will not signed overflow.
We already had a function for checking this, we were just using it only in
specialized cases.

llvm-svn: 210029
2014-06-02 14:32:58 +00:00
Timur Iskhodzhanov cbee13e04c [Sanitizer/interception Win] Break into the debugger on unknown instructions
llvm-svn: 210028
2014-06-02 13:40:41 +00:00
Timur Iskhodzhanov 51fadc387a [ASan Win] Fix memset interception in DLLs
llvm-svn: 210027
2014-06-02 13:23:42 +00:00
Aaron Ballman 9ef622e5bf The exception-declaration for a function-try-block cannot redeclare a
function parameter. One of our existing test cases was XFAILed because
of this. This fixes the issue and un-XFAILs the test.

llvm-svn: 210026
2014-06-02 13:10:07 +00:00
Alp Toker 1d1c4fb81c CMake: remove duplicated source file from list
Patch by Jack Howarth!

llvm-svn: 210025
2014-06-02 13:09:24 +00:00
Evgeniy Stepanov 96f8edc720 [asan] Default to memory-mapped coverage on Android.
The alternative (writing coverage at process exit) is nearly useless there.

llvm-svn: 210024
2014-06-02 13:06:33 +00:00
Evgeniy Stepanov 74389a951d [msan] Remove an out-of-date comment.
MSan is no longer an "early prototype".

llvm-svn: 210023
2014-06-02 12:58:08 +00:00
Rafael Espindola 4aa6e4c264 Remove path_tclsh.m4.
Looks like it was only used by dejagnu and is now dead.

llvm-svn: 210022
2014-06-02 12:54:32 +00:00
Tilmann Scheller 75fa6e5a23 [AArch64] Add some more regression tests for store pre-index update folding in the load/store optimizer.
Add tests for the following transform:

 add x8, x8, #16
  ...
 str X, [x8]
  ->
 str X, [x8, #16]!

with X being either w0, x0, s0, d0 or q0.

llvm-svn: 210021
2014-06-02 12:33:33 +00:00
Evgeniy Stepanov d425a2b169 [msan] Handle x86 vector pack intrinsics.
llvm-svn: 210020
2014-06-02 12:31:44 +00:00