Commit Graph

141379 Commits

Author SHA1 Message Date
Dmitri Gribenko ae73417b69 Implement a fixit for -Wmain-return-type
llvm-svn: 172684
2013-01-17 00:26:13 +00:00
Fariborz Jahanian c889205567 objC block layout: Patch reorders block layout to
produce more inline layout metadata. // rdar://12752901

llvm-svn: 172683
2013-01-17 00:25:06 +00:00
Matt Beaumont-Gay e9fe5308ca Fix a typo introduced in r172665.
llvm-svn: 172682
2013-01-17 00:21:55 +00:00
Daniel Dunbar 252bedc568 [IR] Reserve/define the purpose for the "Linker Options" metadata flags.
llvm-svn: 172681
2013-01-17 00:16:27 +00:00
Lang Hames 045f439310 Update the description of the llvm.fmuladd.* intrinsics to avoid use of the
ambiguous term 'legal'.

Suggested by Andrew Booker. Thanks Andrew!

llvm-svn: 172680
2013-01-17 00:00:49 +00:00
Argyrios Kyrtzidis 6b4f341ecd [objcmt] Rewrite a NSDictionary dictionaryWithObjects:forKeys: to a dictionary literal
if we can see the elements of the arrays.

for example:

 NSDictionary *dict = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"1", @"2", nil] forKeys:[NSArray arrayWithObjects:@"A", @"B", nil]];

-->

 NSDictionary *dict = @{ @"A" : @"1", @"B" : @"2" };

rdar://12428166

llvm-svn: 172679
2013-01-16 23:54:48 +00:00
Rafael Espindola b306900200 Delay linkage checks when validating the weakref attribute.
llvm-svn: 172678
2013-01-16 23:49:06 +00:00
Dmitri Gribenko 4dc2ba15d7 Documentation: fix a typo 'IEE754'
Reported on IRC by _savage

llvm-svn: 172677
2013-01-16 23:40:37 +00:00
Aaron Ballman f96361e6cb Fixes crash when illegal function definitions are deleted or defaulted. Fixes PR14577.
llvm-svn: 172676
2013-01-16 23:39:10 +00:00
Michael J. Spencer 71c00f42bd [ELF] Use operator new(std::size_t, BumpPtrAllocator).
llvm-svn: 172675
2013-01-16 23:34:45 +00:00
Michael J. Spencer 84d3b01fb5 [ELF] clang-format ReaderELF.cpp
llvm-svn: 172674
2013-01-16 23:34:32 +00:00
Rafael Espindola 7d9669e432 Simplify code. No functionality change.
llvm-svn: 172673
2013-01-16 23:21:32 +00:00
David Blaikie f157e90135 Remove unnecessary initialization i Added in r172668.
echristo already fixed this in r172649, but I'll leave the reformatting in
since I'm in the blame history for it now anyway.

llvm-svn: 172672
2013-01-16 23:18:16 +00:00
Enrico Granata 17fd63c6f0 Adding a custom summary for libc++ std::vector<bool>
vector<bool> is specialized and the existing general summary for vectors would lie to the user.
Tackling libstdc++ and synthetic children is the following, less critical, part of this task

llvm-svn: 172671
2013-01-16 23:17:30 +00:00
Aaron Ballman 10027160cc Wrapping __popcnt64 for MSVC so that it's only used on 64-bit builds.
llvm-svn: 172670
2013-01-16 23:17:21 +00:00
David Blaikie 5bb700360c Readd an open paren that was lost while reformatting code.
llvm-svn: 172669
2013-01-16 23:13:42 +00:00
David Blaikie 687cd95941 Fix -Wreorder warning.
Rewrapping courtesy of clang-format.

llvm-svn: 172668
2013-01-16 23:13:36 +00:00
Rafael Espindola f1d2f0ea21 Check for internal weak decls after merging.
This fixes pr14946. The problem was that the linkage computation was done too
early, so things like "extern int a;" would be given external linkage, even if
a previous declaration was static.

llvm-svn: 172667
2013-01-16 23:11:15 +00:00
David Blaikie 3302f2bd46 PR14964: intrinsic headers using non-reserved identifiers
Several of the intrinsic headers were using plain non-reserved identifiers.
C++11 17.6.4.3.2 [global.names] p1 reservers names containing a double
begining with an underscore followed by an uppercase letter for any use.

I think I got them all, but open to being corrected. For the most part I
didn't bother updating function-like macro parameter names because I don't
believe they're subject to any such collission - though some function-like
macros already follow this convention (I didn't update them in part because
the churn was more significant as several function-like macros use the double
underscore prefixed version of the same name as a parameter in their
implementation)

llvm-svn: 172666
2013-01-16 23:08:36 +00:00
Douglas Gregor 048fbfa302 Rework the traversal of Objective-C categories and extensions to
consider (sub)module visibility.

The bulk of this change replaces myriad hand-rolled loops over the
linked list of Objective-C categories/extensions attached to an
interface declaration with loops using one of the four new category
iterator kinds:

  visible_categories_iterator: Iterates over all visible categories
  and extensions, hiding any that have their "hidden" bit set. This is
  by far the most commonly used iterator.

  known_categories_iterator: Iterates over all categories and
  extensions, ignoring the "hidden" bit. This tends to be used for
  redeclaration-like traversals.

  visible_extensions_iterator: Iterates over all visible extensions,
  hiding any that have their "hidden" bit set.

  known_extensions_iterator: Iterates over all extensions, whether
  they are visible to normal name lookup or not.

The effect of this change is that any uses of the visible_ iterators
will respect module-import visibility. See the new tests for examples.

Note that the old accessors for categories and extensions are gone;
there are *Raw() forms for some of them, for those (few) areas of the
compiler that have to manipulate the linked list of categories
directly. This is generally discouraged.

Part two of <rdar://problem/10634711>.
 

llvm-svn: 172665
2013-01-16 23:00:23 +00:00
Peter Collingbourne e8baf33712 Use getProcessTriple in clang-interpreter.
llvm-svn: 172664
2013-01-16 22:37:09 +00:00
Enrico Granata 04700d5564 Changing the Python reference document to be more explicit in discouraging usage of lldb.{debugger,...} convenience variables for formatters and other non-interactive Python extensions
llvm-svn: 172663
2013-01-16 22:25:17 +00:00
Greg Clayton 0942033500 Removed unused variable.
llvm-svn: 172662
2013-01-16 22:22:42 +00:00
Dmitri Gribenko 3de75d7c7c Fix a -Wdocumentation warning (empty paragraph passed to '\brief' command)
llvm-svn: 172661
2013-01-16 22:10:09 +00:00
Richard Smith e826c1a134 Add raw string literal versus C preprocessor test, suggested by James Dennett.
llvm-svn: 172660
2013-01-16 21:43:09 +00:00
Daniel Dunbar d77d9fb04d [IR] Add 'Append' and 'AppendUnique' module flag behaviors.
llvm-svn: 172659
2013-01-16 21:38:56 +00:00
Renato Golin f104c4c4ca Change CostTable model to be global to all targets
Moving the X86CostTable to a common place, so that other back-ends
can share the code. Also simplifying it a bit and commoning up
tables with one and two types on operations.

llvm-svn: 172658
2013-01-16 21:29:55 +00:00
Edwin Vane 862fec8835 Write transform results to disk only once
Instead of writing the result of each transform to disk for every
transform, write the results to buffers in memory and pass those buffers
to the next transform as input. Only write the buffers to disk if the
final syntax check passes.

Reviewers: klimek
llvm-svn: 172657
2013-01-16 21:11:50 +00:00
Michael Gottesman 00dfc68c2d Added test for r172599 which fixes bugzilla://14584,rdar://11744105.
llvm-svn: 172656
2013-01-16 21:07:18 +00:00
Michael J. Spencer a6285243b2 [Support] Include the intrisics header and check for definition properly.
llvm-svn: 172655
2013-01-16 20:50:43 +00:00
Tim Northover bd7c169664 Fix recent test for more diverse environments.
I think the main issue was the lack of -ffreestanding, which pulled in
the host's stdint.h. After that things went rapidly downhill.

llvm-svn: 172653
2013-01-16 20:35:54 +00:00
Eric Christopher 69fc38f02f Make this test X86 only.
llvm-svn: 172652
2013-01-16 20:31:35 +00:00
Eric Christopher 45008a5688 Move this to X86.
llvm-svn: 172651
2013-01-16 20:31:32 +00:00
Tim Northover 4ef746768b Correct order of operands forwarding NEON vfma to LLVM fma
llvm-svn: 172650
2013-01-16 20:13:15 +00:00
Eric Christopher 5e4696d2f5 Move initialization of ParsingIfOrElifDirective down next to the macro
initializations to fix Wreorder warning.

llvm-svn: 172649
2013-01-16 20:09:36 +00:00
Eric Christopher 37d05cded7 Add testcase missed yesterday. Patch from Paul Robinson.
llvm-svn: 172648
2013-01-16 19:54:35 +00:00
Greg Clayton b14bed80cb Remove std::string input arguments and replace with "const char *".
llvm-svn: 172647
2013-01-16 19:53:55 +00:00
Eric Christopher ce26df829f Add testcase missed yesterday from Paul Robinson.
llvm-svn: 172646
2013-01-16 19:53:47 +00:00
Michael J. Spencer 90a1773397 [Support] Add MSVC intrinsic for CountPopulation.
Patch by Jakub Staszak.

llvm-svn: 172645
2013-01-16 19:52:12 +00:00
Michael J. Spencer ad228f4a72 [Support] Update MSVC compiler support in Compiler.h.
llvm-svn: 172644
2013-01-16 19:51:59 +00:00
Aaron Ballman 1f0fa91bed Adding verbiage to the Language Extensions document about __has_include and __has_include_next only being allowed within preprocessor directives.
llvm-svn: 172643
2013-01-16 19:51:19 +00:00
Eli Bendersky da09857394 Remove unneeded include and empty line
llvm-svn: 172642
2013-01-16 19:42:16 +00:00
Enrico Granata e1d29e4642 Replacing reference to radar number with svn revision
llvm-svn: 172641
2013-01-16 19:41:57 +00:00
Eli Bendersky 880247148c Some small (and mostly cosmetic) fixes.
llvm-svn: 172640
2013-01-16 19:32:36 +00:00
Aaron Ballman 6ce0000dd5 No longer crashing with an assert when __has_include or __has_include_next is used outside of a preprocessor directive. This fixes PR14837.
llvm-svn: 172639
2013-01-16 19:32:21 +00:00
Eli Bendersky 0fab22544f Clean up some unnecessary headers and forward declarations
llvm-svn: 172638
2013-01-16 19:00:21 +00:00
Eli Bendersky a313ae6cf9 Now that GenericAsmParser was folded into AsmParser, some methods and types can
return into the safe harbor of AsmParser's private areas.

llvm-svn: 172637
2013-01-16 18:56:50 +00:00
Enrico Granata bcd80b4723 <rdar://problem/13021266>
Adding FindFirstGlobalVariable to SBModule and SBTarget
These calls work like FindGlobalVariables but they only return the first match found and so they can return an SBValue instead of an SBValueList for added convenience of use

llvm-svn: 172636
2013-01-16 18:53:52 +00:00
Douglas Gregor 77f49a4902 Teach global selector lookup to ignore hidden methods, which occur
when the methods are declared in a submodule that has not yet been
imported. Part of <rdar://problem/10634711>. 

llvm-svn: 172635
2013-01-16 18:47:38 +00:00
Daniel Dunbar 0ec72bbc4d [Linker] Change module flag linking to be more extensible.
- Instead of computing a bunch of buckets of different flag types, just do an
   incremental link resolving conflicts as they arise.

 - This also has the advantage of making the link result deterministic and not
   dependent on map iteration order.

llvm-svn: 172634
2013-01-16 18:39:23 +00:00