Commit Graph

52640 Commits

Author SHA1 Message Date
Renato Golin 9258aa5543 Make global named registers internal variables
llvm-svn: 209289
2014-05-21 10:40:27 +00:00
Yaron Keren 885ea4253d DeclVisitor is not used here.
llvm-svn: 209285
2014-05-21 09:02:49 +00:00
Alp Toker b05e0b53b9 Preprocessor: support defined() with operator names for MS compatibility
Also flesh out missing tests, improve diagnostic QOI and fix a couple of corner
cases found in the process.

Fixes PR10606.

llvm-svn: 209276
2014-05-21 06:13:51 +00:00
Craig Topper 161e4db52f [C++11] Use 'nullptr'. Parser edition.
llvm-svn: 209275
2014-05-21 06:02:52 +00:00
Craig Topper 8a13c4180e [C++11] Use 'nullptr'. CodeGen edition.
llvm-svn: 209272
2014-05-21 05:09:00 +00:00
Alp Toker 773649296d utils/CmpDriver: add brief documentation to indicate what this does
llvm-svn: 209268
2014-05-21 02:08:10 +00:00
Alp Toker b671e34c36 SourceManager: Use setMainFileID() consistently
Eliminate createMainFileID() / createMainFileIDForMemBuffer() utility
functions. These didn't add much convenience and conflated two distinct
operations.

This change makes things easier to follow by providing a consistent interface
and getting rid of a bunch of cast-to-voids.

llvm-svn: 209266
2014-05-21 01:12:41 +00:00
Argyrios Kyrtzidis c02a0dbe41 [objcmt] Make sure we don't edit the return type to add 'instancetype' if the return type is already that.
rdar://16961577

llvm-svn: 209264
2014-05-21 00:24:20 +00:00
Eric Christopher 4015e124e3 Update for paired llvm commit with AsmVerbose.
llvm-svn: 209261
2014-05-21 00:00:03 +00:00
Eric Christopher 6c553d6240 Remove test. Replacing it with a backend test with the optimized IR.
llvm-svn: 209260
2014-05-21 00:00:01 +00:00
Justin Bogner 5719614b77 libclang: Give each VirtualFileOverlay unit test its own name
llvm-svn: 209257
2014-05-20 23:52:11 +00:00
Eric Christopher bd8652d272 Make this test emit llvm IR rather than assembly.
llvm-svn: 209255
2014-05-20 23:23:51 +00:00
Justin Bogner 1c078f2b1f VirtualFileSystem: Fix false positives in YAMLVFSWriter::containedIn
Checking if a path starts with another path isn't sufficient for
determining if one is contained within the heirarchy of the other.
We need to ensure that the substring ends at a directory boundary.

llvm-svn: 209250
2014-05-20 22:12:58 +00:00
Alp Toker 6883743fd8 Reduce string duplication
If we're so keen on saving a dynamic allocation to add the trailing space, we
might as well do it in style.

llvm-svn: 209247
2014-05-20 22:03:47 +00:00
Alp Toker fdafb94f01 RAV reunification: merge Lambda body visitation to DRAV
llvm-svn: 209246
2014-05-20 22:03:39 +00:00
Alp Toker 8425c43c2a RAV reunification: merge DISPATCH_STMT() macro back to standard RAV
Also add the missing undef in both files.

llvm-svn: 209245
2014-05-20 22:03:27 +00:00
Alp Toker d92674ce81 RAV reunification: merge r190728
llvm-svn: 209244
2014-05-20 22:03:18 +00:00
Justin Bogner 9c785294fb VirtualFileSystem: Add YAMLVFSWriter to generate VFS mapping files
This moves the logic to write a JSON VFS mapping from the C api into
VirtualFileSystem, so that we can use it internally.

No functional change.

llvm-svn: 209241
2014-05-20 21:43:27 +00:00
Eric Christopher acca0085c1 Update for llvm change to avoid having global flag setting in TargetMachine.
llvm-svn: 209239
2014-05-20 21:25:41 +00:00
Aaron Ballman 2f22b94201 Cleaning up some range-based for loops so that the automatic type deduction is more explicit about pointers and const. Did some minor drive-by const correctness fixes and identifier updates as well. No functional changes.
llvm-svn: 209233
2014-05-20 19:47:14 +00:00
Peter Collingbourne 786283734a Revert r209231, "Update AttributeReference.rst."
According to Aaron, this is being generated on the server now.

llvm-svn: 209232
2014-05-20 19:38:07 +00:00
Peter Collingbourne 450a0b1dc9 Update AttributeReference.rst.
llvm-svn: 209231
2014-05-20 19:27:39 +00:00
Duncan P. N. Exon Smith 6f782b12aa Fix testcase from r209228
llvm-svn: 209229
2014-05-20 19:20:23 +00:00
Duncan P. N. Exon Smith d22b97c30b GlobalValue: Testcase for hidden visibility and local linkage
This is a testcase for r209227, a change in LLVM that automatically sets
visibility to default when the linkage is changed to local (rather than
asserting).

What this testcase triggers is hard to reproduce otherwise:  the
`GlobalValue` is created (with non-local linkage), the visibility is set
to hidden, and then the linkage is set to local.

PR19760

llvm-svn: 209228
2014-05-20 19:04:31 +00:00
Yaron Keren 065da7c53a Fixed spelling.
llvm-svn: 209224
2014-05-20 18:23:05 +00:00
Jordan Rose 7afd71e4ff Add a check for tautological bitwise comparisons to -Wtautological-compare.
This catches issues like:

if ((x & 8) == 4) { ... }
if ((x | 4) != 3) { ... }

Patch by Anders Rönnholm!

llvm-svn: 209221
2014-05-20 17:31:11 +00:00
Peter Collingbourne d2402470ee Make the wording for the flatten docs a little clearer.
llvm-svn: 209220
2014-05-20 17:30:03 +00:00
Eric Christopher 4c08be18b1 Fix testcase for case.
llvm-svn: 209218
2014-05-20 17:15:31 +00:00
Peter Collingbourne 41af7c2fdc Implement the flatten attribute.
This is a GNU attribute that causes calls within the attributed function
to be inlined where possible. It is implemented by giving such calls the
alwaysinline attribute.

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

llvm-svn: 209217
2014-05-20 17:12:51 +00:00
Eric Christopher c9e2a68905 Clean up language and grammar.
Based on a patch by jfcaron3@gmail.com!
PR19806

llvm-svn: 209215
2014-05-20 17:10:39 +00:00
NAKAMURA Takumi 32d832af98 clang/test/SemaCXX/err_init_conversion_failed.cpp: Tweak for i686-msvc.
For targeting i686-msvc, declarations are seen as thiscall like;

  void (template_test::S::*)(const int &) __attribute__((thiscall))
  void (template_test::S::*)(int) __attribute__((thiscall))

It didn't affect x86_64-msvc.

llvm-svn: 209212
2014-05-20 15:44:42 +00:00
Aaron Ballman 981ba24156 None of these attributes require FunctionTemplate to be explicitly listed as part of their subject definition. FunctionTemplateDecls are not what the attribute appertains to in the first place -- it attaches to the underlying FunctionDecl.
The attribute emitter was using FunctionTemplate to map the diagnostic to "functions or methods", but that isn't a particularly clear diagnostic in these cases anyway (since they do not apply to ObjC methods). Updated the attribute emitter to remove custom logic for FunctionTemplateDecl, and updated the test cases for the change in diagnostic wording.

llvm-svn: 209209
2014-05-20 14:10:53 +00:00
Daniel Jasper 069e5f4858 clang-format: [JS] Understand top-level function literals properly.
llvm-svn: 209205
2014-05-20 11:14:57 +00:00
Robert Lytton db8c1cb02c XCore target: sort typestring enum fields alphabetically
llvm-svn: 209196
2014-05-20 07:19:33 +00:00
Ben Langmuir 5988590363 Speculative fix for Windows buildbot after r209138
It appears that Windows doesn't like renaming over open files, which we
do in clearOutputFiles. The file being compiled should be safe to
removed, but this isn't very satisfying - we don't want to manually
manage the lifetime of files we cannot prove have no references.

llvm-svn: 209195
2014-05-20 05:55:04 +00:00
Craig Topper ccbc35edc2 [C++11] Use 'nullptr'. Tooling edition.
llvm-svn: 209192
2014-05-20 04:51:16 +00:00
Craig Topper 2554294321 [C++11] Use 'nullptr'. Analysis edition.
llvm-svn: 209191
2014-05-20 04:30:07 +00:00
Richard Trieu 5fe0a42ae9 Fix diagnostic message for member function pointer mismatches where one of the
classes is a template argument.

llvm-svn: 209190
2014-05-20 04:10:24 +00:00
Richard Trieu ccedd52736 Ignore void returning overloaded functions fom -Wunused-comparison. PR19791.
llvm-svn: 209186
2014-05-20 01:34:43 +00:00
Alp Toker 57cccec446 ARCMT/GC-check-warn-nsalloc.m: don't provide a diag group
This diagnostic is now controlled solely by -no-ns-alloc-error thus matching
the original intended behaviour.

llvm-svn: 209184
2014-05-19 23:48:49 +00:00
Adrian Prantl 2dbdd20d37 Demote the "Debug Info Version" module flag to llvm::Module::Warning
behavior on mismatch. The AutoUpgrader will drop incompatible debug info
any way and also emit a warning diagnostic for it.

rdar://problem/16926122

llvm-svn: 209182
2014-05-19 23:40:06 +00:00
Renato Golin c296d951a7 Using SmallString and correct addr var
llvm-svn: 209180
2014-05-19 23:25:25 +00:00
Alp Toker 97b084f528 Improve test verification from r209172
llvm-svn: 209175
2014-05-19 22:56:13 +00:00
Alp Toker 403a4f9b82 Get ARCMT/GC-check-warn-nsalloc.m working
The -no-ns-alloc-error migration option now causes the diagnostic to be ignored
completely. If this isn't desired, the error can be downgraded to a warning
using the usual -Wno-error=arcmt-ns-alloc.

Note that we can't use -verify right now on this test because
VerifyDiagnosticConsumer gets confused by multiple SourceManager instances,
which is presumably the reason it was XFAILed in the first place and why the
regression wasn't detected. We'll grep instead for now.

llvm-svn: 209172
2014-05-19 22:51:11 +00:00
Renato Golin 156a853ccb Fix usage of string when StringRef was needed
Also adding a variable to the test, so release bots match %1.
This should also calm the gdb buildbot.

.

llvm-svn: 209171
2014-05-19 22:36:19 +00:00
Richard Smith 1be902c02f [modules] Fix ODR violation: there's another clang::TypeLocVisitor elsewhere.
llvm-svn: 209169
2014-05-19 22:34:38 +00:00
Richard Smith ff6c0c18a8 [module] Remove a header that isn't used and doesn't compile.
llvm-svn: 209168
2014-05-19 22:20:41 +00:00
Peter Collingbourne b4728c12e8 Implement the no_split_stack attribute.
This is a GNU attribute that allows split stacks to be turned off on a
per-function basis.

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

llvm-svn: 209167
2014-05-19 22:14:34 +00:00
Richard Smith 851072efb7 If two sibling modules declare the same entity, and we indirectly pull a
declaration of that entity in from one of those modules, keep track of the fact
that we've not completed the redeclaration chain yet so that we can pull the
remaining declarations in from the other module if they're needed.

llvm-svn: 209161
2014-05-19 20:59:20 +00:00
Hans Wennborg 7f26fa6715 Allow dllimport on function definitions when they're template instantiations
llvm-svn: 209157
2014-05-19 20:14:13 +00:00