Commit Graph

51986 Commits

Author SHA1 Message Date
Reid Kleckner 7c1db7676e Fix a -Wmicrosoft warning on an unrepresentable enum
0x80000000 isn't representable as an int, which is the default enum
type.

llvm-svn: 206545
2014-04-18 01:21:55 +00:00
Duncan P. N. Exon Smith 85e349fd2c BackendUtil: Pass through -mdisable-tail-calls
The frontend option -fno-optimize-sibling-calls resolves to -cc1's
-mdisable-tail-calls, which is passed to the TargetMachine in the
backend.  PassManagerBuilder was adding the -tailcallelim pass anyway.

Use a new DisableTailCalls option in PassManagerBuilder to disable tail
calls harder.

Requires the matching commit in LLVM that adds DisableTailCalls.

<rdar://problem/16050591>

llvm-svn: 206543
2014-04-18 01:05:25 +00:00
Justin Bogner 534f14abe7 test: Use llvm-profdata merge in Profile tests
In preparation for using a binary format for instrumentation based
profiling, explicitly treat the test inputs as text and transform them
before running. This will allow us to leave the checked in files in
human readable format once the instrumentation format is binary.

No functional change.

llvm-svn: 206509
2014-04-17 22:49:06 +00:00
Reid Kleckner fd385407fa MS ABI: Don't append to vbtables that we shouldn't extend
This was probably a benign bug, since nobody would look at the vbtable
slots that we were filling in.

llvm-svn: 206508
2014-04-17 22:47:52 +00:00
Timur Iskhodzhanov ed11ae3d21 Follow-up to r206457 -- fix static adjustments for some subtle virtual inheritance cases
Reviewed at http://reviews.llvm.org/D3410

llvm-svn: 206504
2014-04-17 22:01:48 +00:00
Aaron Ballman e80bfcd048 Making some public members into private members. This also introduces a bit more const-correctness, and now uses some range-based for loops. No functional changes intended.
llvm-svn: 206503
2014-04-17 21:44:08 +00:00
Richard Smith 4b600d3f0b Fix comment.
llvm-svn: 206494
2014-04-17 20:39:09 +00:00
Richard Smith b45a6f72b6 Add missing serialization code for one of the CXXRecordDecl definition flags.
llvm-svn: 206493
2014-04-17 20:33:01 +00:00
Aaron Ballman 7a2fb5f436 Nitpicky refactoring -- use of nullptr and auto, made a bit more const-correct. No functional changes intended.
llvm-svn: 206491
2014-04-17 20:08:36 +00:00
John Thompson 4f52d44dce Revised per Dmitri's comments. My first exposure to range-based for loops, thanks!
llvm-svn: 206483
2014-04-17 18:17:36 +00:00
Nico Weber ffaf29a07b clang-format.py: Don't omit the first two words from error messages.
This reverts r172072.  clang-format used to use DiagnosticEngine to output
errors: http://llvm.org/viewvc/llvm-project?view=revision&revision=172071. Now
it doesn't, so this code is obsolete.

llvm-svn: 206479
2014-04-17 17:51:57 +00:00
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
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
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
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
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
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
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
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
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
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
Aaron Ballman fd987ecc73 Attempting to unbreak the MSVC 2012 build a second time.
llvm-svn: 206420
2014-04-16 21:32:23 +00:00
John Thompson bcdcc92e2f Added dump method for global module index.
llvm-svn: 206418
2014-04-16 21:03:41 +00:00
Joerg Sonnenberger 8280abe47f Handle -m32 for NetBSD/sparc64 correctly. Extend test case to also check
ARM, MIPS and i386 ABIs.

llvm-svn: 206416
2014-04-16 20:44:17 +00:00
Reid Kleckner 6f6e76dfe0 Revert "Move -fms-extensions predefined macros into InitPreprocessor"
This reverts commit r206413.

This was proposed before, but it's not clear if this is really a good
idea:
http://reviews.llvm.org/D3034

llvm-svn: 206415
2014-04-16 20:10:16 +00:00
Aaron Ballman 157779ed59 Attempting to unbreak the MSVC 2012 build.
llvm-svn: 206414
2014-04-16 19:59:42 +00:00
Reid Kleckner ae4759df00 Move -fms-extensions predefined macros into InitPreprocessor
If someone on Linux asks for -fms-extensions, there's no reason not to
define the feature test macros that MSVC defines.

llvm-svn: 206413
2014-04-16 19:47:06 +00:00
Diego Novillo 17b2a1b4b0 Fix check failure on hexagon targets.
This test was failing because there is no assembler for hexagon-elf on
this buildbot:

http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/10470

Fixed by adding -S to the driver invocation.

llvm-svn: 206412
2014-04-16 19:02:35 +00:00
Argyrios Kyrtzidis c747960855 Fix indentation, NFC.
llvm-svn: 206411
2014-04-16 18:45:32 +00:00
Argyrios Kyrtzidis de10366c06 [objc] -[NSObject init] is documented to not do anything, don't warn if subclasses do not call [super init] on their initializers.
Part of rdar://16568441

llvm-svn: 206410
2014-04-16 18:32:51 +00:00
Argyrios Kyrtzidis 441f626bd9 [objc] Consider new initializers inside @implementation when determining if the class
introduces new initializers.

Part of rdar://16568441

llvm-svn: 206409
2014-04-16 18:32:42 +00:00
Aaron Ballman af771c7b2a More minor refactoring. Updated for const-correctness, moved another deleted function to be private, 0 -> nullptr and some style corrections. No functional changes intended.
llvm-svn: 206406
2014-04-16 17:44:02 +00:00
Aaron Ballman 0e297988ec Minor cleanups for deleted functions to ensure they're a bit more robustly "deleted".
llvm-svn: 206404
2014-04-16 17:20:26 +00:00