Commit Graph

182190 Commits

Author SHA1 Message Date
Rafael Espindola d31dc048ca Fix pr20078.
When linking llvm.global_ctors with the optional third element we have to handle
it specially and only copy the elements whose keys were also copied.

llvm-svn: 217281
2014-09-05 21:27:52 +00:00
Todd Fiala 4bce548a6b Add TypeValidator.cpp to cmake build.
llvm-svn: 217280
2014-09-05 21:23:09 +00:00
Bjorn Steinbrink 5a121b2ef5 Restore the ability to check if LLVMCreateObjectFile was successful
Summary:
Until r216870 LLVMCreateObjectFile returned nullptr in case of an error,
so callers could check if the call was successful. Now, it always
returns an OwningBinary wrapped as an LLVMObjectFileRef, so callers
can't check if the call was successul.

This results in a segfault running e.g.

 llvm-c-test --object-list-sections < /dev/null

So the old behaviour should be restored.

Subscribers: llvm-commits

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

llvm-svn: 217279
2014-09-05 21:22:09 +00:00
Sanjay Patel f4b8debc1c clean up; NFC
llvm-svn: 217278
2014-09-05 20:55:46 +00:00
Enrico Granata c582713ce6 Introduce the notion of a "type validator" formatter
Type Validators have the purpose of looking at a ValueObject, and making sure that there is nothing semantically wrong about the object's contents
For instance, if you have a class that represents a speed, the validator might trigger if the speed value is greater than the speed of light

This first patch hooks up the moving parts in the formatters subsystem, but does not link ValueObjects to TypeValidators, nor lets the SB API be exposed to validators
It also lacks the notion of Python validators

llvm-svn: 217277
2014-09-05 20:45:07 +00:00
Jonathan Roelofs afe6794bc2 Address some post-commit review comments on r217261
llvm-svn: 217276
2014-09-05 20:28:44 +00:00
Ben Langmuir bb1c918ec8 Move the initialization of VAListTagName after InitializeSema()
This innocuous statement to get the identifier info for __va_list_tag
was causing an assertion failure:
  NextIsPrevious() && "decl became non-canonical unexpectedly"
if the __va_list_tag identifier was found in a PCH in some
circumstances, because it was looked up before the ASTReader had a Sema
object to use to find existing decls to merge with.

We could possibly move getting the identifier info even later, or make
it lazy if we wanted to, but this seemed like the minimal change.

Now why a PCH would have this identifier in the first place is a bit
mysterious. This seems to be related to the global module index in some
way, because when the test case is built without the global module index
it will not emit an identifier for __va_list_tag into the PCH, but with
the global module index it does.

llvm-svn: 217275
2014-09-05 20:24:27 +00:00
Samuel Benzaquen 7ec2cb2fda Separate the matchers by type and statically dispatch to the right list.
Summary:
Separate the matchers by type and statically dispatch to the right list.
For any node type that we support, it reduces the number of matchers we
run it through.
For node types we do not support, it makes match() a noop.
This change improves our clang-tidy related benchmark by ~30%.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

llvm-svn: 217274
2014-09-05 20:15:31 +00:00
Reid Kleckner e89756f32a Fix CMake configuration
llvm-svn: 217273
2014-09-05 20:11:22 +00:00
Reid Kleckner 3fe67c9fc1 Require an x86 target for ms-inline-asm-return.cpp instead of XFAIL
llvm-svn: 217272
2014-09-05 20:06:06 +00:00
Jonathan Roelofs b3fcc67f8f Allow libc++ to be built on systems without POSIX threads
If you're crazy enough to want this sort of thing, then add
-D_LIBCPP_HAS_NO_THREADS to your CXXFLAGS and
--param=additiona_features=libcpp-has-no-threads to your lit commnad line.

http://reviews.llvm.org/D3969

llvm-svn: 217271
2014-09-05 19:45:05 +00:00
Alexey Samsonov d3e121331b [DWARF parser] Fix nasty memory corruption in .dwo files handling.
Forge a test case where llvm-symbolizer has to use external .dwo
file to produce the inlining information.

llvm-svn: 217270
2014-09-05 19:29:45 +00:00
Kuba Brecka e4d4801c3a [lldb] Abstract a superclass for a generic thread container.
Reviewed at
http://reviews.llvm.org/D5200
and
http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140901/012799.html

llvm-svn: 217269
2014-09-05 19:13:15 +00:00
Jonathan Roelofs b352db7f57 Bugfix: allow additional_features to be empty
llvm-svn: 217268
2014-09-05 19:03:46 +00:00
Rafael Espindola 262b90321a The gold tests also require ppc to be compiled in.
We could create a tools/gold/PowerPC and a tools/gold/X86, but it doesn't seem
worth it.

llvm-svn: 217267
2014-09-05 19:01:12 +00:00
Rafael Espindola b582372e87 Revert "Disable the fix for pr20793 because of a gnu ld bug."
This reverts commit r217211.

Both the bfd ld and gold outputs were valid. They were using a Rela relocation,
so the value present in the relocated location was not used, which caused me
to misread the output.

llvm-svn: 217264
2014-09-05 18:03:38 +00:00
Lang Hames 3e930a3e83 [MCJIT] Const-ify the symbol lookup operations on RuntimeDyld.
llvm-svn: 217263
2014-09-05 18:00:16 +00:00
Jonathan Roelofs 3b7f085db1 s/LIBCXXABI_SINGLE_THREADED/LIBCXXABI_HAS_NO_THREADS/ for consistency with libcxx
Also remove the audotedection part so that if you're crazy enough to want a
single-threaded abi library, you'll say so explicitly in the build.

llvm-svn: 217262
2014-09-05 17:46:40 +00:00
Jonathan Roelofs 3547c5441e Set -D_LIBCPP_HAS_NO_THREADS and -D_LIBCPP_HAS_NO_MONOTONIC_CLOCK based on available_features
http://reviews.llvm.org/D5214

llvm-svn: 217261
2014-09-05 17:21:57 +00:00
Adrian Prantl e5e8ce64de Set the parent pointer of cloned DBG_VALUE instructions correctly.
Fixes PR20523.

When spilling variables onto the stack, spillVirtReg() is setting the
parent pointer of the cloned DBG_VALUE intrinsic for the stack location
to the parent pointer of the original intrinsic. MachineInstr parent
pointers should however always point to the parent basic block.

MBB is shadowing the MBB member variable. The instruction still ends up
being inserted into the right basic block, because it's inserted after MI
which serves as the iterator.

I failed at constructing a reliable testcase for this, see
http://llvm.org/bugs/show_bug.cgi?id=20523 for a large testcases.

llvm-svn: 217260
2014-09-05 17:10:10 +00:00
Reid Kleckner e2793c009e -frewrite-includes: Normalize line endings to match the main source file
It is very common to include headers with DOS-style line endings, such
as windows.h, from source files with Unix-style line endings.
Previously, we would end up with mixed line endings and #endifs that
appeared to be on the same line:

  #if 0 /* expanded by -frewrite-includes */
  #include <windows.h>^M#endif /* expanded by -frewrite-includes */

Clang treats either of \r or \n as a line ending character, so this is
purely a cosmetic issue.

This has no automated test because most Unix tools on Windows will
implictly convert CRLF to LF when reading files, making it very hard to
detect line ending mismatches. FileCheck doesn't understand {{\r}}
either.

Fixes PR20552.

llvm-svn: 217259
2014-09-05 16:49:50 +00:00
Jordan Rose f69e65f75c [analyzer] Don't crash if malloc() has an unexpected function prototype.
Patch by Daniel Fahlgren!

llvm-svn: 217258
2014-09-05 16:33:51 +00:00
Toma Tabacu 901ba6ea2e [mips] Change Feature-related types from unsigned to uint64_t in MipsAsmParser. No functional changes.
Summary: Found a couple of cases where unsigned was still being used. These two should be the last ones in the (entire) Mips backend.

Reviewers: dsanders

Reviewed By: dsanders

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

llvm-svn: 217257
2014-09-05 16:32:09 +00:00
Matt Arsenault 8ae5961065 R600/SI: Use same complex patterns for DS atomics
This fixes hitting the same negative base offset problem
that was already fixed for regular loads and stores.

llvm-svn: 217256
2014-09-05 16:24:58 +00:00
Daniel Sanders 1fcea42e67 [mips] Marked the Trap-on-Condition instructions as Mips II
Patch by Vasileios Kalintiris.

Reviewers: dsanders

Reviewed By: dsanders

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

llvm-svn: 217255
2014-09-05 15:50:13 +00:00
Toma Tabacu 3c24b0483a [mips] Rename data members and member functions in MipsAssemblerOptions.
Summary: Use the naming convention from the LLVM Coding Standards.

Reviewers: dsanders

Reviewed By: dsanders

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

llvm-svn: 217254
2014-09-05 15:43:21 +00:00
Todd Fiala bc5353a83c Properly handle the DYLD attach step for GDB remotes.
Change by Stephane Sezer.

llvm-svn: 217253
2014-09-05 15:06:16 +00:00
Todd Fiala 0cc371c166 Set the process vendor in GDBRemoteCommunicationClient::GetCurrentProcessInfo.
Change by Stephane Sezer.

llvm-svn: 217252
2014-09-05 14:56:13 +00:00
Todd Fiala 0ee56ce640 Add error report when Module::GetObjectFile() fails to find a plugin to open an object file.
Change by Stephane Sezer.

llvm-svn: 217251
2014-09-05 14:48:49 +00:00
Jan Vesely d1d1334064 R600: Fix FROUND
round halfway cases away from zero

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 217250
2014-09-05 14:26:54 +00:00
Tom Stellard 0c93c9ecee R600/SI: Fix bug in SIInstrInfo::legalizeOpWithMove()
We must constrain the destination register class of legalized operands
to a VGPR class or else the illegal operand may be folded back into
the instruction by the register coalescer.

This fixes a bug in add.ll that will be uncovered by future commits.

llvm-svn: 217249
2014-09-05 14:08:01 +00:00
Tom Stellard 80942a1b50 R600/SI: Use S_ADD_U32 and S_SUB_U32 for low half of 64-bit operations
https://bugs.freedesktop.org/show_bug.cgi?id=83416

llvm-svn: 217248
2014-09-05 14:07:59 +00:00
Jan Vesely 05a60b7ac3 add isordered builtin
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 217247
2014-09-05 13:59:15 +00:00
Jan Vesely 63486c1f0e add isunordered builtin
v2: remove trailing newline

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 217246
2014-09-05 13:59:13 +00:00
Jan Vesely 41a0c491de add islessgreater builtin
v2: remove trailing newline

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 217245
2014-09-05 13:59:11 +00:00
Jan Vesely 369e20353c add isnormal builtin
v2: simplify and remove isnan leftovers
    remove trailing newline

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 217244
2014-09-05 13:59:09 +00:00
Jan Vesely a5a3b023b4 add isfinite builtin
v2: simplify and remove isinf leftovers
    remove trailing newline

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 217243
2014-09-05 13:59:06 +00:00
James Molloy 163b1ba471 [ARMv8] Add support for 32-bit MIN/MAXNM and directed rounding.
This patch adds support for the 32bit numeric max/min and directed round-to-integral NEON intrinsics that were added as part of v8, along with unit tests.

Patch by Graham Hunter!

llvm-svn: 217242
2014-09-05 13:50:34 +00:00
Renato Golin 65336d0a82 Mark ms-inline-asm as xfail on ARM
llvm-svn: 217241
2014-09-05 13:29:23 +00:00
Chandler Carruth 19cbf0e2c4 [x86] Factor out the zero vector insertion logic in the new vector
shuffle lowering for integer vectors and share it from v4i32, v8i16, and
v16i8 code paths.

Ironically, the SSE2 v16i8 code for this is now better than the SSSE3!
=] Will have to fix the SSSE3 code next to just using a single pshufb.

llvm-svn: 217240
2014-09-05 10:36:31 +00:00
Daniel Jasper 90ebc98e3d clang-format: [JS] Format embedded function literals more efficently.
Before:
  return {
    a: a,
    link:
        function() {
          f();  //
        },
    link:
        function() {
          f();  //
        }
  };

After:
  return {
    a: a,
    link: function() {
      f();  //
    },
    link: function() {
      f();  //
    }
  };

llvm-svn: 217238
2014-09-05 09:27:38 +00:00
Daniel Jasper 3a038de3c8 clang-format: [JS] JavaScript does not have the */&/&& madness.
Before:
  e&& e.SomeFunction();

After:
  e && e.SomeFunction();

Yeah, this might be useful for C++, too, but it is not such a frequent
pattern there (plus the fix is much harder).

llvm-svn: 217237
2014-09-05 08:53:45 +00:00
Daniel Jasper 3f69ba1075 clang-format: [JS] Better support for empty function literals.
Before:
  SomeFunction(function(){});

After:
  SomeFunction(function() {});

llvm-svn: 217236
2014-09-05 08:42:27 +00:00
Daniel Jasper 97bfb7b1ba clang-format: [JS] Fix indentation in dict literals.
Before:
  return {
    'finish':
        //
        a
        };

After:
  return {
    'finish':
        //
        a
  };

llvm-svn: 217235
2014-09-05 08:29:31 +00:00
NAKAMURA Takumi 634c355e35 clang/test/CXX/drs/dr5xx.cpp: Fix up assumption of thiscall. It affects not x64 but x86.
Note, i686-cygwin doesn't use thiscall.

llvm-svn: 217234
2014-09-05 08:18:53 +00:00
Tim Northover c879d06a85 ARM: cover all sub-architecture enumerators to keep compiler happy.
No change in behaviour (hopefully).

llvm-svn: 217233
2014-09-05 07:56:46 +00:00
Frederic Riss 0982e69fb8 [dwarfdump] Dump DW_AT_(decl|call)_line attribute values as decimal values.
llvm-svn: 217232
2014-09-05 07:21:50 +00:00
Frederic Riss 1a3736f4f6 Reapply "[dwarfdump] Add missing DW_LANG_Mips_Assembler case to LanguageString()"
This commit was reverted in r217183, but is OK to go in again now that its dependency is commited (as of r217186).

llvm-svn: 217231
2014-09-05 07:21:40 +00:00
Matthew Gardiner 9232ea6ac5 Removed white-space
llvm-svn: 217230
2014-09-05 07:17:15 +00:00
Matthew Gardiner 3b15a89a2b Adding kalimba variants as Triple sub-architectures.
Reviewed in:

http://reviews.llvm.org/D5115

llvm-svn: 217229
2014-09-05 06:46:43 +00:00