Commit Graph

172542 Commits

Author SHA1 Message Date
Matt Arsenault 10e3ef8d2d Bug 18567: Fix constantexpr pointer casts with address spaces.
Getting a pointer into a struct at a non-zero offset would try to
use the default address space.

llvm-svn: 206478
2014-04-17 17:45:37 +00:00
Alexander Potapenko da1c510ea6 [ASan] Change AddressSanitizer.LoadStoreCallbacks to use asan_malloc and asan_free.
Interceptors don't really work on OSX in asan_noinst_test.cc (this is more or less intentional),
so one shouldn't call intercepted functions in this test -- added a comment about this.

llvm-svn: 206477
2014-04-17 17:29:07 +00:00
Greg Clayton c71e7bc415 After updating to Xcode.5.1.1 LLDB framework stopped to support partial (only for STDIN) pseudo terminal usage in the debugging process.
Here is the fix resolving this issue.

Patch from Alexey Ushakov.

llvm-svn: 206476
2014-04-17 17:27:28 +00:00
Matt Arsenault a90d22fad5 R600/SI: f64 frint is legal on CI
llvm-svn: 206475
2014-04-17 17:06:37 +00:00
John Thompson a39baf1ad0 Revised per Dmitri's comments. My first exposure to range-based for loops, thanks!
llvm-svn: 206474
2014-04-17 17:06:13 +00:00
Chad Rosier c4eb4f8827 [AArch64] Implement the getCSRFirstUseCost API, mirroring that in ARM64.
llvm-svn: 206473
2014-04-17 16:19:54 +00:00
Alexander Kornienko 67d9c8c87e Fix alignment of trailing block comments.
Summary:
This patch ensures that the lines of the block comments retain relative
column offsets. In order to do this WhitespaceManager::Changes representing
continuation of block comments keep a pointer on the change representing the
whitespace change before the block comment, and a relative column offset to this
change, so that the correct column can be reconstructed at the end of alignment
process.

Fixes http://llvm.org/PR19325

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

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

llvm-svn: 206472
2014-04-17 16:12:46 +00:00
Aaron Ballman ed5aced64e Since the object is new'ed in the enterCFG function, now deleting in the exitCFG function instead of the destructor to ensure proper pairing. This allows reuse of the builder without creating a memory leak.
llvm-svn: 206471
2014-04-17 15:23:50 +00:00
Kostya Serebryany 664b1e2f9b [asan] fix a bug in outlined asan checks and in the corresponding test (ouch)
llvm-svn: 206470
2014-04-17 14:38:25 +00:00
Ed Maste 94ba368946 elf-core: Add FreeBSD signals
Sponsored by: DARPA, AFRL
Differential Revision: http://reviews.llvm.org/D3401

llvm-svn: 206469
2014-04-17 13:09:29 +00:00
Ed Maste 41736e3c0d elf-core: Strip trailing whitespace
llvm-svn: 206468
2014-04-17 13:06:49 +00:00
Keith Walker 8ff56f6080 Fix Profile:cxx-lambda.cpp test for targets that do not generate zeroext
Change an expected match to allow for the fact that some targets
may not generated the zeroext operation.

llvm-svn: 206467
2014-04-17 13:04:53 +00:00
Ed Maste dbb67c46db Move FreeBSDSignals to Utility
It will shortly be need by FreeBSD elf core support on all hosts.

llvm-svn: 206466
2014-04-17 13:03:10 +00:00
James Molloy dc197ea30d [ARM64] Fix __clear_cache - ensure it is predefined.
llvm-svn: 206465
2014-04-17 12:51:42 +00:00
James Molloy 96061a6db1 [ARM64] Add ARM64 RUN lines to a bunch of tests that had AARCH64 RUN lines.
This covers all tests in tests/Driver and tests/Preprocessor, but there are some
failing tests in test/Sema that need looking into.

llvm-svn: 206464
2014-04-17 12:51:36 +00:00
James Molloy ec78aa46f2 [ARM64] Teach Targets.cpp about Cortex-A53 and Cortex-A57, and enable more tests.
llvm-svn: 206463
2014-04-17 12:51:28 +00:00
James Molloy 2b24fc41fc [ARM64] Plumb in big-endian - add arm64_be to the many switches where it was missing.
llvm-svn: 206462
2014-04-17 12:51:23 +00:00
James Molloy 9b1586b6cc [ARM64] Default to the 'generic' CPU, unless -arch is present for backwards compatibility.
llvm-svn: 206461
2014-04-17 12:51:17 +00:00
Aaron Ballman c11ba5dc9e Preventing future MSVC 2012 surprises with SimpleArray by giving it an explicit move assignment operator.
llvm-svn: 206460
2014-04-17 12:50:54 +00:00
NAKAMURA Takumi cd1fc4bc1b Inliner::OptimizationRemark: Fix crash in clang/test/Frontend/optimization-remark.c on some hosts, including --vg.
DebugLoc in Callsite would not live after Inliner. It should be copied before Inliner.

llvm-svn: 206459
2014-04-17 12:22:14 +00:00
Daniel Jasper ae8e0d8da9 clang-format: Respect BinPackParameters in Cpp11BracedListStyle.
With BinPackParameters=false and Cpp11BracedListStyle=true (i.e. mostly
for Chromium):

Before:
  const Aaaaaa aaaaa = {aaaaa, bbbbb,  ccccc,  ddddd,  eeeee, ffffff,
                        ggggg, hhhhhh, iiiiii, jjjjjj, kkkkkk};

After:
  const Aaaaaa aaaaa = {aaaaa,
                        bbbbb,
                        ccccc,
                        ddddd,
                        eeeee,
                        ffffff,
                        ggggg,
                        hhhhhh,
                        iiiiii,
                        jjjjjj,
                        kkkkkk};

This fixes llvm.org/PR19359. I am not sure we'll want this in all cases
in the long run, but I'll guess we'll get feedback on that.

llvm-svn: 206458
2014-04-17 11:32:02 +00:00
Timur Iskhodzhanov 057fa3a5a5 Fix PR19408 - Missing static this adjustment in a vtordisp thunk
Also fix a few other vtordisp-related bugs.

Reviewed at http://reviews.llvm.org/D3400

llvm-svn: 206457
2014-04-17 11:01:41 +00:00
Tim Northover 5ffc092700 ARM64: remove holes from *all* HFAs on the stack.
My first attempt to make sure HFAs were contiguous was in the block dealing
with padding registers, which meant it only triggered on the first stack-based
HFA. This should extend it to the rest as well.

Another part of PR19432.

llvm-svn: 206456
2014-04-17 10:20:38 +00:00
Chandler Carruth 7e107dabd6 [LCG] Remove a dead declaration. This stopped being used when I switched
to a more normal move operation on the graph itself. The definition
already got removed, but I missed the declaration.

llvm-svn: 206455
2014-04-17 09:41:54 +00:00
Chandler Carruth b5f938dc00 [LCG] Move the call graph node class into the graph class's definition.
This will become necessary to build up the SCC iterators and SCC
definitions. Moving it now so that subsequent diffs are incremental.

llvm-svn: 206454
2014-04-17 09:40:13 +00:00
Chandler Carruth 4c1b05f822 Make the User::value_op_iterator a random access iterator. I had written
this code ages ago and lost track of it. Seems worth doing though --
this thing can get called from places that would benefit from knowing
that std::distance is O(1). Also add a very fledgeling unittest for
Users and make sure various aspects of this seem to work reasonably.

llvm-svn: 206453
2014-04-17 09:07:50 +00:00
NAKAMURA Takumi de4077a5d3 SemaTemplate.cpp: Rework r206451. Removing an argument was really bad idea.
llvm-svn: 206452
2014-04-17 08:57:09 +00:00
NAKAMURA Takumi 518210e264 SemaTemplate.cpp: Appease msvc to get rid of default argument in lambda definition.
clang\lib\Sema\SemaTemplate.cpp(1826) : error C2064: term does not evaluate to a function taking 1 arguments

llvm-svn: 206451
2014-04-17 08:42:31 +00:00
Chandler Carruth b60cb315bc [LCG] Just move the allocator (now that we can) when moving a call
graph. This simplifies the custom move constructor operation to one of
walking the graph and updating the 'up' pointers to point to the new
location of the graph. Switch the nodes from a reference to a pointer
for the 'up' edge to facilitate this.

llvm-svn: 206450
2014-04-17 07:25:59 +00:00
Chandler Carruth 81f497d176 [LCG] Remove the Module reference member which we weren't using for
anything and doesn't make sense if assigning.

llvm-svn: 206449
2014-04-17 07:22:19 +00:00
Chandler Carruth 75f2ca4787 [Allocator] Make SpecificBumpPtrAllocator also movable and move
assignable.

llvm-svn: 206448
2014-04-17 07:08:56 +00:00
Craig Topper 0a9bf4c0c5 [X86] Add disassembler support for the 0x0f 0x7f form of movq %mm, %mm.
llvm-svn: 206447
2014-04-17 06:33:45 +00:00
Saleem Abdulrasool 98938f1e0a objdump: identify WoA WinCOFF/ARM correctly
Since LLVM currently only supports WinCOFF, assume that the input is WinCOFF
rather than another type of COFF file (ECOFF/XCOFF).  If the architecture is
detected as thumb (e.g. the file has a IMAGE_FILE_MACHINE_ARMNT magic) then use
a triple of thumbv7-windows.

This allows for objdump to properly handle WoA object files without having to
specify the target triple manually.

llvm-svn: 206446
2014-04-17 06:17:23 +00:00
Saleem Abdulrasool 1614b26886 MC: rework static_assert to be MSVC compatible
Visual Studio does not permit referencing a structure member as a static field
for sizeof calculations.  Resort to a pointer cast which is compatible across
Visual Studio and other compilers.

llvm-svn: 206445
2014-04-17 06:17:20 +00:00
Richard Smith 11a80dcb42 PR19340: If we see a declaration of a member of an unspecialized class template
that looks like it might be an explicit specialization, don't recover as an
explicit specialization (bypassing the check that would reject that).

llvm-svn: 206444
2014-04-17 03:52:20 +00:00
Ben Langmuir a56071c5fb When writing YAML in libclang, use yaml::escape instead of write_escaped
The YAMLParser has its own escaped string representation, and does not
handle octal escape sequences. When writing the virtual file system to a
YAML file, use yaml::escape().

llvm-svn: 206443
2014-04-17 03:31:02 +00:00
Richard Smith 4b55a9c841 Refactor all the checking for missing 'template<>'s when a declaration has a
template-id after its scope specifier into a single place.

llvm-svn: 206442
2014-04-17 03:29:33 +00:00
Richard Smith 0d963d6c49 Don't emit an ExtWarn on declarations of variable template specializations;
we'll already have issued the relevant diagnostic when we saw the declaration
of the primary template.

llvm-svn: 206441
2014-04-17 02:56:49 +00:00
Argyrios Kyrtzidis ec328b8e6f [Parser] Remove "add -fmodules" from the "use of '@import' when modules are disabled, add -fmodules" error.
We disable modules for C++, at which point this is confusing.
rdar://16641918

llvm-svn: 206440
2014-04-17 02:32:52 +00:00
Yunzhong Gao 06770f9381 Adding type info for f16c floating-point type. This is consistent with the
Itanium ABI in 2.9.2 Place of Emission.

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

llvm-svn: 206439
2014-04-17 02:26:26 +00:00
Justin Bogner 033135c5eb Support: Move OnDiskHashTable from clang to llvm
This introduces clang's Basic/OnDiskHashTable.h into llvm as
Support/OnDiskHashTable.h. I've taken the opportunity to add doxygen
comments and run the file through clang-format, but other than the
namespace changing from clang:: to llvm:: the API is identical.

llvm-svn: 206438
2014-04-17 02:16:53 +00:00
Matt Arsenault 51df0c1965 R600/SI: Fix zext from i1 to i64
llvm-svn: 206437
2014-04-17 02:03:08 +00:00
Richard Smith 100b24abc5 Implement [over.match.oper]p3 properly, by filtering the non-candidates out
when building the candidate set, rather than trying to contort name lookup into
handling this.

llvm-svn: 206436
2014-04-17 01:52:14 +00:00
Richard Smith 688866ba3e PR19452: Implement more of [over.match.oper]p3's restrictions on which non-member overloaded operators can be found when no operand is of class type. We used to fail to implement this rule if there was an operand of dependent type.
llvm-svn: 206435
2014-04-17 01:12:17 +00:00
Adrian Prantl 649f030819 Further simplify r206430.
rdar://problem/16636569.

llvm-svn: 206434
2014-04-17 01:04:01 +00:00
Adam Nemet 287f989dde [ARM64] Fix "Cannot select" for vector ctpop
The commit of r205855:

Author: Arnold Schwaighofer <aschwaighofer@apple.com>
Date:   Wed Apr 9 14:20:47 2014 +0000

    SLPVectorizer: Only vectorize intrinsics whose operands are widened equally

    The vectorizer only knows how to vectorize intrinics by widening all operands by
    the same factor.

    Patch by Tyler Nowicki!

exposed a backend bug causing a regression (Cannot select ctpop).

The commit msg is a bit confusing because the patch actually changes the
behavior for the loop-vectorizer as well.  As things got refactored into a
helper ctpop got snuck in to the trivially-vectorizable helper which is now
used by both vectorizers.  In other words, we started seeing vector-ctpops in
the backend.

This change makes ctpop LegalizeAction::Expand for the types not supported by
the byte-only CNT instruction.  We may be able to custom-lower these later to
a single CNT but this is to fix the compiler crash first.

Fixes <rdar://problem/16578951>

llvm-svn: 206433
2014-04-17 01:01:37 +00:00
Rui Ueyama 08587f8ccd Silence the test failure on FreeBSD for now.
It's hard to debug this failure on remote machine only with lit logs.
I'm trying to reproduce it locally on a FreeBSD machine.

llvm-svn: 206432
2014-04-17 00:55:54 +00:00
Ben Langmuir 47d1ca4838 Rename lib/Headers/module.map to module.modulemap
Don't install a file using the legacy spelling.

llvm-svn: 206431
2014-04-17 00:52:48 +00:00
Adrian Prantl 2c92e9cb53 Debug info: When collecting the parameters of C++ partial template
specializations collect all arguments and not just the ones from the
class template partial specialization from which this class template
specialization was instantiated. The debug info does not represent the
partial specialization otherwise and so specialized parameters would
go missing.

rdar://problem/16636569.

llvm-svn: 206430
2014-04-17 00:30:48 +00:00
Gerolf Hoflehner 5f6268a40e Inline a function when the always_inline attribute
is set even when it contains a indirect branch.
The attribute overrules correctness concerns
like the escape of a local block address.

This is for rdar://16501761

llvm-svn: 206429
2014-04-17 00:21:52 +00:00