Commit Graph

167172 Commits

Author SHA1 Message Date
Daniel Sanders abe212a3b8 Revert r201237+r201238: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call
It introduced multiple test failures in the buildbots.

llvm-svn: 201241
2014-02-12 15:39:20 +00:00
Evgeniy Stepanov 8ab205fb74 [asan] Handle OpenFile errors in CovDump.
llvm-svn: 201240
2014-02-12 15:29:22 +00:00
Tom Stellard 55d3746dbe Revert "Enforce python2 for systems that use python3 as their default."
This reverts commit r200413.

This was breaking the build on systems where the python 2.x executable
was called python.

llvm-svn: 201239
2014-02-12 14:54:17 +00:00
Daniel Sanders 2f235aebdb Arcanist failed to commit the two clang test corrections that should have been in r201237.
llvm-svn: 201238
2014-02-12 14:46:15 +00:00
Daniel Sanders a7d504cf58 Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call
Summary:
AsmPrinter::EmitInlineAsm() will no longer use the EmitRawText() call for targets with mature MC support. Such targets will always parse the inline assembly (even when emitting assembly). Targets without mature MC support continue to use EmitRawText() for assembly output.

The hasRawTextSupport() check in AsmPrinter::EmitInlineAsm() has been replaced with MCAsmInfo::UseIntegratedAs which when true, causes the integrated assembler to parse inline assembly (even when emitting assembly output). UseIntegratedAs is set to true for targets that consider any failure to parse valid assembly to be a bug. Target specific subclasses generally enable the integrated assembler in their constructor. The default value can be overridden with -no-integrated-as.

All tests that rely on inline assembly supporting invalid assembly (for example, those that use mnemonics such as 'foo' or 'hello world') have been updated to disable the integrated assembler.

Reviewers: rafael

Reviewed By: rafael

CC: llvm-commits

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

llvm-svn: 201237
2014-02-12 14:44:54 +00:00
Dmitri Gribenko 371c217b3f libclang: fix a crash in clang_disposeDiagnosticSet when it is passed a NULL argument
llvm-svn: 201236
2014-02-12 14:17:58 +00:00
Evgeniy Stepanov 254c7636cf [sanitizer] Fix wait4 interceptor on Android.
It's called __wait4 there.

llvm-svn: 201235
2014-02-12 13:05:17 +00:00
Tim Northover 26562486ad Whitespace cleanup (mostly stray tabs, a few not-quite-empty lines).
llvm-svn: 201234
2014-02-12 12:56:48 +00:00
Tim Northover 4b76291991 ARM & NEON: add test for r101232
rdar://problem/16035743

llvm-svn: 201233
2014-02-12 12:08:06 +00:00
Tim Northover 3402dc7d52 ARM NEON: fix range checking on immediates.
Previously, range checking on the __builtin_neon_XYZ_v Clang intrinsics didn't
take account of the type actually passed to the call, which meant a request
like "vext_s16(a, b, 7)" was allowed through (TableGen was conservative and
allowed 0-7 for all types). This caused an assert in the backend because the
lane doesn't make sense.

llvm-svn: 201232
2014-02-12 12:04:59 +00:00
Dmitri Gribenko e7f8cba892 Don't use find | xargs in test/Modules/fmodules-validate-once-per-build-session.c
With -fdisable-module-hash, we can implement this with a simple 'cp'.

llvm-svn: 201231
2014-02-12 11:50:37 +00:00
NAKAMURA Takumi 04d39d7a2d Windows/Path.inc: Move <shlobj.h> after "Windows.h" for some API available.
I found that swapping the order of some header files helped fix a
  build issue that we're seeing on mingw32. Without the swap, windows.h
  was being included before _WIN32_WINNT was being defined and the
  CreateHardLinkW function was #ifdef'd out.

  It looks like the header is mainly used to get the SHGetFolderPathW
  function, so I don't think that there'll be much fallout from the
  switch.

Suggested by Alex Crichton. Thanks!

llvm-svn: 201230
2014-02-12 11:50:22 +00:00
NAKAMURA Takumi 04817e49bc Teach tablegen() macro to check needed variables
This macro depends on several variables to be set in the calling
context.  Check them and report an error if they are not set.
Without this, custom commands may be silently specified that
will fail at build time.

Patch by Brad King.

llvm-svn: 201229
2014-02-12 11:50:11 +00:00
NAKAMURA Takumi 9218e94714 clang/test/Modules/fmodules-validate-once-per-build-session.c: Tweak for gnuwin32 with %/t (instead of %t).
xargs didn't handle dosish paths, while find foo\bar\ emits dosish paths.

llvm-svn: 201228
2014-02-12 11:42:12 +00:00
NAKAMURA Takumi 691e6ef461 clang/lib/Driver/Multilib.cpp: Rewrite normalizePathSegment() to be tolerant dosish pathsep.
FIXME: It could be more simple...
llvm-svn: 201227
2014-02-12 11:42:02 +00:00
Kostya Serebryany be1d22b631 [sanitizer] added class BVGraph, to be used in a deadlock detector; added more methods to the bit vectors
llvm-svn: 201226
2014-02-12 11:28:09 +00:00
Dmitri Gribenko fdd4f30f0e 'svn add' files I forgot for r201224 (Add an option to allow Clang verify
source files for a module only once during)

llvm-svn: 201225
2014-02-12 10:40:07 +00:00
Dmitri Gribenko f430da4de6 Add an option to allow Clang verify source files for a module only once during
the build

When Clang loads the module, it verifies the user source files that the module
was built from.  If any file was changed, the module is rebuilt.  There are two
problems with this:
1. correctness: we don't verify system files (there are too many of them, and
   stat'ing all of them would take a lot of time);
2. performance: the same module file is verified again and again during a
   single build.

This change allows the build system to optimize source file verification.  The
idea is based on the fact that while the project is being built, the source
files don't change.  This allows us to verify the module only once during a
single build session.  The build system passes a flag,
-fbuild-session-timestamp=, to inform Clang of the time when the build started.
The build system also requests to enable this feature by passing
-fmodules-validate-once-per-build-session.  If these flags are not passed, the
behavior is not changed.  When Clang verifies the module the first time, it
writes out a timestamp file.  Then, when Clang loads the module the second
time, it finds a timestamp file, so it can compare the verification timestamp
of the module with the time when the build started.  If the verification
timestamp is too old, the module is verified again, and the timestamp file is
updated.

llvm-svn: 201224
2014-02-12 10:33:14 +00:00
Amara Emerson ecbe18e01d [ARM] Fix NEON wrongly being enabled with soft-float when targeting armv8/Cortex-A53/A57.
This was caused by r200708 which enabled the crypto feature for these cores.

llvm-svn: 201223
2014-02-12 10:22:35 +00:00
Benjamin Kramer 53f9df4c93 R600: Always implement both versions of isTruncateFree and add a sanity check.
llvm-svn: 201222
2014-02-12 10:17:54 +00:00
Alexander Kornienko d1afc70795 Consume checker names from clang static analyzer.
Summary: This patch depends on patches D2556 and D2557.

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits, jordan_rose, krememek

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

llvm-svn: 201221
2014-02-12 09:52:07 +00:00
Daniel Jasper d90ec5717a Fix memory leak introduced by r201010.
llvm-svn: 201220
2014-02-12 08:45:05 +00:00
Alexey Samsonov ce9c449a4d [TSan] Kill tsan_symbolize_addr2line_linux.cc
llvm-svn: 201219
2014-02-12 08:37:09 +00:00
Alexey Samsonov 7304b4201f [Sanitizer] Teach external symbolizer to work with addr2line if llvm-symbolizer is unavailable. Allow this mode in TSan.
llvm-svn: 201218
2014-02-12 08:29:42 +00:00
Alexey Samsonov c34a997669 [UBSan] Parse common runtime flags before using a symbolizer
llvm-svn: 201217
2014-02-12 08:21:44 +00:00
Craig Topper 5b3a6bd370 Remove special case filtering for instructions with lock prefix as they are all marked with isCodeGenOnly already.
llvm-svn: 201216
2014-02-12 08:09:20 +00:00
Craig Topper ea91f02762 Mark XACQUIRE_PREFIX/XRELEASE_PREFIX as isAsmParserOnly so they'll disappear from the disassembler table build without custom filtering code.
llvm-svn: 201215
2014-02-12 08:02:29 +00:00
Todd Fiala 729c001ec3 Fix elf core file VMA-contiguous region collapsing.
Elf core files were collapsing core segments when the virtual memory
addresses were contiguous without checking if the core-file-backed
memory region was the same size as the segment's VMA region. Without
this extra check, any time regions were collapsed but the core-backed
region was smaller (and thus had a zero-filled hole at the end), the
collapse operation would break VMA to core file lookups for subsequent
collapsed regions.

This change fixes the following bug:
http://llvm.org/bugs/show_bug.cgi?id=18769

llvm-svn: 201214
2014-02-12 07:29:44 +00:00
Alexey Samsonov 167c15a98f [Sanitizer] Build sanitizer_common with -Wframe-larger-than=512 flag
llvm-svn: 201213
2014-02-12 07:26:40 +00:00
Alexey Samsonov 7e97768f2f [Sanitizer] Reduce stack frame size of SlowUnwindStackWithContext
llvm-svn: 201212
2014-02-12 07:24:11 +00:00
NAKAMURA Takumi 2dfe92e010 [PR18809] Mark DebugInfo/empty.ll as XFAIL:cygming.
llvm-svn: 201211
2014-02-12 07:15:05 +00:00
Kostya Serebryany 083d657845 [sanitizer] added a bit vector class to be used in a deadlock detector
llvm-svn: 201210
2014-02-12 07:05:24 +00:00
Jonathan Roelofs 4c991ef3ef Fix r201205's use-after-free bug caught by sanitizer bot
llvm-svn: 201209
2014-02-12 06:37:27 +00:00
Jonathan Roelofs c5f7e6fe67 [libcxxabi] Fix broken codesourcery.com links in comments
review: http://llvm-reviews.chandlerc.com/D2718
llvm-svn: 201208
2014-02-12 04:49:09 +00:00
Craig Topper 522af29465 Test case I forgot to 'add' for r201126.
llvm-svn: 201207
2014-02-12 03:58:47 +00:00
Enrico Granata 67530b694c Avoid leaking namebuf in case of an early exit
llvm-svn: 201206
2014-02-12 03:37:33 +00:00
Jonathan Roelofs 2cea1bea87 Add Multilib selection machinery
This patch improves the support for picking Multilibs from gcc installations.
It also provides a better approximation for the flags '-print-multi-directory'
and '-print-multi-lib'.

This reverts r201203 (i.e. re-applying r201202 with small fixes in
unittests/CMakeLists.txtto make the build bots happy).

review: http://llvm-reviews.chandlerc.com/D2538
llvm-svn: 201205
2014-02-12 03:21:20 +00:00
Tobias Grosser 5ea6b58e4a Fix formatting
llvm-svn: 201204
2014-02-12 01:55:28 +00:00
Jonathan Roelofs 3fa96d8378 Revert 201202
Breaks cmake configure of new unit tests directory

llvm-svn: 201203
2014-02-12 01:36:51 +00:00
Jonathan Roelofs 0e7ec60b74 Add Multilib selection machinery
This patch improves the support for picking Multilibs from gcc installations.
It also provides a better approximation for the flags '-print-multi-directory'
and '-print-multi-lib'.

review: http://llvm-reviews.chandlerc.com/D2538
llvm-svn: 201202
2014-02-12 01:29:25 +00:00
Matt Arsenault 2767b6df10 Remove unneeded include
llvm-svn: 201201
2014-02-12 01:00:24 +00:00
Filipe Cabecinhas 89372e99ba Fix cmake compilation on Mac OS X.
llvm-svn: 201200
2014-02-12 00:57:20 +00:00
David Majnemer 79a1c89066 MS ABI: vptr injection should obey alignment requirements
vptr injection must inject padding equivalent to the alignment of the
most aligned non-virtual subobject, not the alignment of the enclosing
record.

To fascilitate this change, don't let record layout observe the
alignment of the record until we've injected our vptrs. Also, do not
allow the alignment of vbases to affect required alignment until just
before we insert the vtordisp field.

llvm-svn: 201199
2014-02-12 00:43:02 +00:00
David Blaikie 5b85858b77 DwarfUnit: Include type unit's file strings in the defining compile unit's file_names table
There's still one piece missing here, which is adding the
DW_AT_stmt_list to the type unit that refer's to the compile unit's line
table. Working on that.

llvm-svn: 201198
2014-02-12 00:40:47 +00:00
David Blaikie d696fac175 Fix some formatting in my last commit (r201196)
llvm-svn: 201197
2014-02-12 00:32:05 +00:00
David Blaikie 15632ae11a DwarfUnit: Provide a reference to a defining DwarfCompileUnit from DwarfTypeUnit.
Type units need to insert their file strings into the compile unit's
line/file table. This is preliminary work to that end.

llvm-svn: 201196
2014-02-12 00:31:30 +00:00
David Blaikie 101613e903 DwarfUnit: Refactor DW_AT_file creation into a common function.
This is preliminary work to fix type unit file strings so they appear in
their originating CU's line table - but it's also just good/simple
cleanup, so I'm committing it ahead of time.

llvm-svn: 201195
2014-02-12 00:11:25 +00:00
David Blaikie 5201930762 DwarfUnit: Replace unnecessary conditionals with asserts.
We used to be pretty vague about what debug entities were what, with
many conditionals to silently drop/skip/accept things. These don't seem
to be relevant anymore.

llvm-svn: 201194
2014-02-11 23:57:03 +00:00
Evan Cheng 57add3e4ee Tweak ARM fastcc by adopting these two AAPCS rules:
* CPRCs may be allocated to co-processor registers or the stack – they may never be allocated to core registers
* When a CPRC is allocated to the stack, all other VFP registers should be marked as unavailable

The difference is only noticeable in rare cases where there are a large number of floating point arguments (e.g.
7 doubles + additional float, double arguments). Although it's probably still better to avoid vmov as it can cause
stalls in some older ARM cores. The other, more subtle benefit, is to minimize difference between the various
calling conventions.

rdar://16039676

llvm-svn: 201193
2014-02-11 23:49:31 +00:00
Tobias Grosser f07361d19a Add link to polyhedral.info
This website provides general information about polyhedral compilation.

llvm-svn: 201192
2014-02-11 23:34:43 +00:00