Commit Graph

52012 Commits

Author SHA1 Message Date
Alp Toker 3a3ee3e376 cindex.py: Avoid deprecated function
Implement Diagnostic::category_name() using clang_getDiagnosticCategoryText()
instead of the deprected clang_getDiagnosticCategoryName().

Preserves existing behaviour and API covered by existing tests.

llvm-svn: 206712
2014-04-20 01:07:03 +00:00
Alp Toker 5f072d814f Remove some empty statements
Cleanup only.

llvm-svn: 206709
2014-04-19 23:55:49 +00:00
Alp Toker f424a597df Fix and restore the macro-multiline.c test
This test didn't work as intended and was ultimately disabled some years ago in
r169458.

Indeed it's not clear if the '\n' was ever passed through to the driver
correctly given that lit would insert '&& {' at the newline.

Test rewritten to use printf/xargs to insert '\n' in a more reliable manner and
to use FileCheck for verification.

llvm-svn: 206703
2014-04-19 21:40:58 +00:00
Alp Toker 07508405f4 Disallow driver use in more Sema tests
There are now only a handful of Sema tests remaining that use %clang in
SemaCXX, SemaObjC and SemaTemplate.

llvm-svn: 206688
2014-04-19 19:07:31 +00:00
Alp Toker 8ee5b01f34 Move ObjC Cocoa.h header test to Headers
This tests for broad compatibility with platform SDK headers using the clang
driver and so belongs alongside the other header ingtegration tests.

llvm-svn: 206687
2014-04-19 19:07:24 +00:00
Alp Toker 7591a05d14 Re-enable the C++11 modules integration test on OS X
XCode 5.1.1 has shipped with fixed SDK headers.

This reverts commit r200256.

Fixes PR18322.

llvm-svn: 206686
2014-04-19 19:07:19 +00:00
NAKAMURA Takumi f0c40f7952 clang/test/Index/pch-with-errors.c: Remove XFAIL added in r206294. It has been fixed since r206644.
llvm-svn: 206685
2014-04-19 16:49:22 +00:00
Richard Smith 3c326b36cc Speculative fix for buildbot failure. Apparently Clang 3.1 got move semantics wrong.
llvm-svn: 206682
2014-04-19 04:28:00 +00:00
DeLesley Hutchins a9db0019a2 Thread Safety Analysis: Convert to minimal SSA.
llvm-svn: 206681
2014-04-19 03:54:41 +00:00
Richard Smith cd45dbc5f2 When a module completes the definition of a class template specialization imported from another module, emit an update record, rather than using the broken decl rewriting mechanism. If multiple modules do this, merge the definitions together, much as we would if they were separate declarations.
llvm-svn: 206680
2014-04-19 03:48:30 +00:00
DeLesley Hutchins ae497deddf Thread Safety Analysis: Update SSA pass to handle loops.
llvm-svn: 206676
2014-04-19 00:35:54 +00:00
Ben Langmuir 993055f860 Fix a hole with nested unavailable submodules from r206664
If a module doesn't meet a requirement, neither do its submodules. If we
don't propogate that, we might think it's an error to be missing a
header in one of those submodules.

llvm-svn: 206673
2014-04-18 23:51:00 +00:00
Justin Bogner 8776638235 CodeGen: Remove an unused include
llvm-svn: 206667
2014-04-18 22:31:07 +00:00
Ben Langmuir ec8c975214 Don't build modules with (submodules with) missing headers
Unless they are in submodules that aren't available anyway, due to
requirements not being met.  Also, mark children as unavailable when the
parent is.

llvm-svn: 206664
2014-04-18 22:07:31 +00:00
Reid Kleckner 230f662d12 Fix sphinx-build warnings in clang docs.
llvm-svn: 206661
2014-04-18 21:55:49 +00:00
Reid Kleckner 5d21c4990f Add support for building Sphinx documentation when being inside LLVM source tree and using CMake
Patch by Daniel Liew <daniel.liew@imperial.ac.uk>!

llvm-svn: 206660
2014-04-18 21:55:46 +00:00
Justin Bogner 837a6f6f79 CodeGen: Use LLVM's InstrProfReader in -fprofile-instr-use=
Update clang to use the InstrProfReader from LLVM to read
instrumentation based profile data. This also switches us from the
naive text format to the binary format, since that's what's
implemented in the reader.

llvm-svn: 206658
2014-04-18 21:52:00 +00:00
Justin Bogner fc83c1105c [Cleanup] Remove a trailing whitespace
llvm-svn: 206657
2014-04-18 21:51:09 +00:00
Ben Langmuir 532fdc0d4f Don't read CompilerInstance fields that don't exist in ASTUnit
When transferring data from a CompilerInstance in an error path we need
to consider cases where the various fields are uninitialized.

llvm-svn: 206644
2014-04-18 20:39:48 +00:00
Justin Bogner 25463f1577 Teach users of OnDiskHashTable to define hash_value and offset types
This paves the way to making OnDiskHashTable work with hashes that are
not 32 bits wide and to making OnDiskHashTable work very large hash
tables. The LLVM change to use these types is upcoming.

llvm-svn: 206640
2014-04-18 20:27:24 +00:00
Justin Bogner bb094f0669 Remove OnDiskHashTable.h, since it's been moved to llvm
llvm-svn: 206637
2014-04-18 19:57:06 +00:00
Timur Iskhodzhanov 675bf27ab7 Split out the no-thunk multiple inheritance tests
Also, intentionally duplicate base class definitions per test, so it's easier to copy tests while debugging failures

llvm-svn: 206614
2014-04-18 15:10:05 +00:00
Dmitri Gribenko 62bcd925c0 Add more constness to module-related APIs
llvm-svn: 206595
2014-04-18 14:36:51 +00:00
Tim Northover 4dab69815c ARM64: make sure the caller is expected to extend in AAPCS.
This is one of those DarwinPCS differences. It'd been caught in
arguments, but not return values.

llvm-svn: 206594
2014-04-18 13:46:08 +00:00
Aaron Ballman 0491afaf5f Updating to use more range-based for loops, nullptr and auto. No functional changes.
llvm-svn: 206590
2014-04-18 13:13:15 +00:00
Tim Northover 07f1624aa2 ARM64: make sure HFAs on the stack get properly aligned.
Another AAPCS bug, part of PR19432.

llvm-svn: 206580
2014-04-18 10:47:44 +00:00
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