Commit Graph

167263 Commits

Author SHA1 Message Date
Evgeniy Stepanov 5cb24b8ca9 [asan] Disable 1 test on Android.
llvm-svn: 201332
2014-02-13 14:37:25 +00:00
Evgeniy Stepanov 4e6096b859 [asan] Remove extra clone() arguments in test.
Android headers define clone() as a 4-argument function without ellipsis.

llvm-svn: 201331
2014-02-13 14:37:04 +00:00
Evgeniy Stepanov f79669a323 [asan] Enable signal and sigaction interceptors on Android.
Fixes AddressSanitizer.SignalTest breakage.

llvm-svn: 201330
2014-02-13 14:33:24 +00:00
Daniel Jasper a238b17e76 Remove assert added in r201249.
This triggers on one of our internal tests.

Dmitri:
I do not understand this part of the codebase well enough to locate the
underlying cause easily. If the correct fix is not obvious, I can try to
debug the problem further or try to come up with reduced test case.

llvm-svn: 201329
2014-02-13 14:24:14 +00:00
Yaron Keren 3ef24c4f9a This solves warning C4005: '_NOEXCEPT' : macro redefinition when compiling
with Visual C++ 2013 by making libcxx definition text-identical to yvals.h.

Persumably this definition is for older Visual C++ versions. 
In such cases it will still be defined so no functionality change.

Other platforms should not be affected as this is inside
#elif defined(_LIBCPP_MSVC)

Patch by G M!

llvm-svn: 201328
2014-02-13 14:02:28 +00:00
Rafael Espindola b32292ddf7 Remove dead code.
llvm-svn: 201327
2014-02-13 13:45:45 +00:00
Evgeniy Stepanov 8978389a32 [asan] Enable SEGV handler on Android by default.
Seems stable enough.
Fixes null_deref.cc test.

llvm-svn: 201326
2014-02-13 13:43:47 +00:00
Evgeniy Stepanov 3bec7a9c77 [sanitizer] Fix off-by-one-line in SEGV reports on Android.
This will be covered by null_deref.cc test (requires one more fix to pass).

llvm-svn: 201325
2014-02-13 13:32:24 +00:00
Evgeniy Stepanov 391f0234eb [asan] Fix null_deref test with zero base shadow.
With zero base shadow, shadow for near-zero access is itself at near-zero
location. As a result, this test crashes on the shadow access, and not on the
app access.

Relax a check to match this behavior.

llvm-svn: 201324
2014-02-13 13:04:39 +00:00
Daniel Jasper ee107adb7d clang-format: Improve documentation of DerivePointerBinding.
For reference: llvm.org/PR18690.

Also updated generated help page and page creation script.

llvm-svn: 201323
2014-02-13 12:51:50 +00:00
Kostya Serebryany 07526fb4a0 [sanitizer] address some of the dvyukov's comments on previous commits
llvm-svn: 201322
2014-02-13 12:39:21 +00:00
Evgeniy Stepanov 788527d9cd Remove a check from strerror_r test.
It's not always true: on Android, strerror_r with invalid errno
prints "Unknown error ..." to the buffer and returns 0.

This test now only checks that strerror_r does not crash.

llvm-svn: 201321
2014-02-13 12:24:10 +00:00
NAKAMURA Takumi 487f387b19 [CMake] Let llvm_add_library(MODULE) check capability of loadable module.
On unsupported platforms, llvm_add_library(MODULE) doesn't create any targets.
Caller may be responsible to check and add extra target properties.

llvm-svn: 201320
2014-02-13 11:25:17 +00:00
NAKAMURA Takumi 8e57597830 [CMake] add_clang_library(MODULE): Create a phony target when llvm_add_library(MODULE) gave up.
llvm-svn: 201319
2014-02-13 11:24:45 +00:00
NAKAMURA Takumi e72e2e9088 [CMake] Move the target property PREFIX from add_llvm_loadable_module() to llvm_add_library().
llvm-svn: 201318
2014-02-13 11:19:21 +00:00
NAKAMURA Takumi 58f6e74874 [CMake] llvm_add_library(MODULE) may use CMAKE_MODULE_LINKER_FLAGS instead of target property LINK_FLAGS.
I mis-dropped Darwin's link flags (in clang side) since r201073.

llvm-svn: 201317
2014-02-13 11:19:11 +00:00
NAKAMURA Takumi 92d65802db [CMake] LLVM_PLUGIN_EXT: Use CMAKE_SHARED_LIBRARY_SUFFIX rather than CMAKE_SHARED_MODULE_SUFFIX in llvm tree.
FIXME: llvm/test may be aware of LLVM_PLUGIN_EXT, like as clang/test does.
FIXME: CMAKE_*_SUFFIX may be set in HandleLLVMOptions if those variables could be writable, rather than to set one as target properties.
llvm-svn: 201316
2014-02-13 11:19:00 +00:00
NAKAMURA Takumi 6fe94621b9 llvm/test/CodeGen/AArch64/cpus.ll: Tweak to use -mtriple=aarch64-unknown-unknown, or this would crash for targeting pecoff like *-mingw32.
llvm-svn: 201315
2014-02-13 11:06:23 +00:00
Tim Northover 914af6273b ARM: remove floating-point patterns for @llvm.arm.neon.vabs
The front-end is now generating the generic @llvm.fabs for this
operation now, so the extra patterns are no longer needed.

llvm-svn: 201314
2014-02-13 10:44:30 +00:00
Tim Northover 1994fa7d3d ARM & AArch64 NEON: share the vabs implementation.
This changes ARM to use @llvm.fabs for floating-point vabs. Patterns
already existed in the backend, and it might help mid-end phases since
it's more likely to be understood than @llvm.arm.neon.vabs.

llvm-svn: 201313
2014-02-13 10:44:17 +00:00
Robert Lytton 9e8c1a4b57 XCore target pass -v flag to assembler & linker
llvm-svn: 201312
2014-02-13 10:40:12 +00:00
Robert Lytton 694f884f35 add comment explaining previous commit
see 'XCore target -fexceptions flag handling'

llvm-svn: 201311
2014-02-13 10:38:56 +00:00
Robert Lytton f7e03c1cff XCore target -fexceptions flag handling
XCore target has -fno-exception as the default option
Pass on "-fexceptions" flag to xcc (linker)

llvm-svn: 201310
2014-02-13 10:34:44 +00:00
Renato Golin 03d671c733 Remove spurious default case to silent sanitizer
llvm-svn: 201309
2014-02-13 10:26:33 +00:00
Alexander Kornienko 32eaa37b15 Fix ExplicitConstructorCheck to warn only on in-class declarations.
Summary:
I'm not absolutely sure this is 100% correct solution, but it seems to
do what I expect.

Reviewers: djasper, klimek

Reviewed By: djasper

CC: cfe-commits

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

llvm-svn: 201308
2014-02-13 10:11:48 +00:00
Renato Golin c4b4924a13 Add EXPERIMENTAL --rtlib=compiler-rt to GNU Clang
This commit is not strictly correct nor accounts for all uses (shared
objects, for example), but it allows one to test the compiler-rt library
on GNU targets.

Using this patch to run the test-suite has already shown me problems
on ARM. Since this is a Darwin-only flag, nobody is using it, so it
shouldn't be a problem.

I will need extension to deal with the shared cases, but since we're
not compiling libclang_rt.so, that's not yet applicable. Many other
problems will have to be fixed first in compiler-rt (such as removing
the 'arch' name from it and making it trully multi-arch, moving it to
the default lib directory, make both .a and .so variants, etc).

llvm-svn: 201307
2014-02-13 10:01:16 +00:00
Kostya Serebryany f6cb35abb4 [sanitizer] findPath for deadlock detector
llvm-svn: 201306
2014-02-13 09:52:15 +00:00
Oliver Stannard 5bbb72f37e Add Cortex-A53 and Cortex-A57 cores to the AArch64 backend
llvm-svn: 201305
2014-02-13 09:46:11 +00:00
Evgeniy Stepanov 14ca0627d5 [asan] Avoid deadlock in CovDump.
llvm-svn: 201304
2014-02-13 08:50:36 +00:00
Kostya Serebryany c98ce28533 [sanitizer] AArch64 sanitizer support; patch by Christophe Lyon and Yvan Roux
llvm-svn: 201303
2014-02-13 07:50:20 +00:00
Kostya Serebryany 5e52d48e3a [sanitizer] more code for deadlock detector, nothing really works yet (except for small unit tests).
llvm-svn: 201302
2014-02-13 07:44:51 +00:00
Craig Topper 7aaa0c2ddb Remove unused method declaration.
llvm-svn: 201301
2014-02-13 07:12:40 +00:00
Jason Molenda 6223db2778 The Platform base class now maintains a list of trap handlers
aka asynchronous signal handlers, which subclasses should fill
in as appropriate.  For most Unix user process environments,
the one entry in this list is _sigtramp.  For bare-board and
kernel environments, there will be different sets of trap 
handlers.

The unwinder needs to know when a frame is a trap handler 
because the rules it enforces for the frame "above" the
trap handler is different from most middle-of-the-stack frames.

<rdar://problem/15835846> 

llvm-svn: 201300
2014-02-13 07:11:08 +00:00
Craig Topper 69e245c01d Remove filtering concept from X86 disassembler table generation. It's no longer necessary.
llvm-svn: 201299
2014-02-13 07:07:16 +00:00
Hao Liu 7b6dfcf06a [AArch64]Fix the problems that can't select mul/add/sub of v1i8/v1i16/v1i32 types.
As this problems are similar to shl/sra/srl, also add patterns for shift nodes.

llvm-svn: 201298
2014-02-13 05:42:33 +00:00
Alexey Bataev aadd52e5cc [OPENMP] 'if' clause support (no CodeGen support)
llvm-svn: 201297
2014-02-13 05:29:23 +00:00
Quentin Colombet 0e3b5e0b20 [RegAlloc] Fix the assertion in the last chance recoloring to match the
condition at the call site.

llvm-svn: 201296
2014-02-13 05:17:37 +00:00
Rafael Espindola 75ec01f3de Copy dll storage in copyAttributes.
llvm-svn: 201295
2014-02-13 05:11:35 +00:00
Aaron Ballman 44d2ed9817 There is no std namespace for standards-based attributes. Removing the scope qualifier and updating the only affected test case.
llvm-svn: 201294
2014-02-13 04:31:04 +00:00
Rafael Espindola 30b8bf7dbf Use simpler version of fs::create_directory.
llvm-svn: 201293
2014-02-13 04:22:54 +00:00
Jason Molenda 9098f1d3d9 Change the ABI CallFrameAddressIsValid methods for i386 and x86_64.
They were enforcing 16-byte alignment on stack frames for Darwin x86 programs.
But we've found that trap handlers typically don't have the stack pointer
aligned correctly when a trap happens and lldb wasn't backtracing all
the way through.  This method is only used as a safety guard to prevent
lldb's unwinder from using a bogus address as a stack frame - we'll still
enforce word-size alignment on stack frames so that should be fine.

Also rolled back akaylor's changes from August 2013 in r188952 which changed
the i386 ABI plugin to relax the CallFrameAddressIsValid offsets for non-Darwin
targets where only 4-byte alignment is enforced.  Now Darwin is the same as
those environments.

<rdar://problem/15982682> 

llvm-svn: 201292
2014-02-13 04:19:32 +00:00
Juergen Ributzka 2b97f9b211 [DAG] Fix the recognition of opaque constants in the SelectionDAGBuilder.
This fix checks the original LLVM IR node to identify opaque constants by
looking for the bitcast-constant pattern. Originally we looked at the generated
SDNode, but this might lead to incorrect results. The SDNode could have been
generated by an constant expression that was folded to a constant.

This fixes <rdar://problem/16050719>

llvm-svn: 201291
2014-02-13 04:19:26 +00:00
Rafael Espindola ea2519c37b Use simpler version of llvm::sys::fs::create_directories.
llvm-svn: 201290
2014-02-13 04:08:44 +00:00
Rafael Espindola 9e7a638be1 Use simpler version of sys::fs::exists when possible.
llvm-svn: 201289
2014-02-13 04:00:35 +00:00
Yunzhong Gao 5fd0c9d032 Fixing a compiler assertion with zero-width bit-fields in packed structs.
According to the GNU docs, zero-sized bitfields should not be affected by the
packed attribute.

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

llvm-svn: 201288
2014-02-13 02:45:10 +00:00
Hao Liu 4f345f3c03 [AArch64]Add support for spilling FPR8/FPR16.
llvm-svn: 201287
2014-02-13 02:36:58 +00:00
Reid Kleckner 22b19da9fc GlobalOpt: Aliases don't have sections, don't copy them when replacing
As defined in LangRef, aliases do not have sections.  However, LLVM's
GlobalAlias class inherits from GlobalValue, which means we can read and
set its section.  We should probably ban that as a separate change,
since it doesn't make much sense for an alias to have a section that
differs from its aliasee.

Fixes PR18757, where the section was being lost on the global in code
from Clang like:

extern "C" {
__attribute__((used, section("CUSTOM"))) static int in_custom_section;
}

Reviewers: rafael.espindola

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

llvm-svn: 201286
2014-02-13 02:18:36 +00:00
Reid Kleckner 6eaf05a4fd Really fix unused variable warnings in CIndex.
llvm-svn: 201285
2014-02-13 01:19:59 +00:00
Ed Maste 2a798d9c05 Remove decorator for fixed test
llvm.org/pr18805 fixed by r201270

llvm-svn: 201284
2014-02-13 01:10:20 +00:00
NAKAMURA Takumi dea00df279 [CMake] llvm_add_library: Add handling of the parameter ADDITIONAL_HEADERS to pass through to process_source.
I was insightless then about unknown optional parameters.
(Consider that LINK_LIBS foo bar ADDITIONAL_HEADERS qux quux)

Suggested by Michael Kruse. Thanks!

llvm-svn: 201283
2014-02-13 01:00:52 +00:00