Commit Graph

143242 Commits

Author SHA1 Message Date
Cameron Zwarich 71f0acbeeb Fix a typo.
llvm-svn: 174830
2013-02-10 06:42:34 +00:00
Cameron Zwarich a158d39da0 Remove ancient references to 'atomic' phis in PHIElimination that don't really
make sense anymore.

llvm-svn: 174829
2013-02-10 06:42:32 +00:00
Cameron Zwarich e0966738db Make LiveVariables an instance variable of PHIElimination.
llvm-svn: 174828
2013-02-10 06:42:30 +00:00
Chris Lattner 6b24f7429a ok, ok, stop fighting type punning warnings by just using a union.
llvm-svn: 174827
2013-02-10 06:36:29 +00:00
Chris Lattner 4080fcc478 hopefully "really" fix a type punning warning by defining the buffer as
type char, which can't have TBAA tags.

llvm-svn: 174826
2013-02-10 06:07:16 +00:00
Chris Lattner e3d3e6ab8c attempt to defeat a gcc warning that is breaking a -Werror buildbot.
llvm-svn: 174825
2013-02-10 05:45:34 +00:00
Bill Wendling 5d020a3a31 Add accessor for the LLVMContext.
llvm-svn: 174824
2013-02-10 05:00:40 +00:00
Nico Weber 67ffb338ee Reformat formatter code. No functionality change.
llvm-svn: 174823
2013-02-10 04:38:23 +00:00
Nico Weber 2a726b6c34 Formatter: Detect ObjC array literals.
Use this to add a space after "@[" and before "]" for now.

Later, I want to use this to format multi-line array literals nicer, too.

llvm-svn: 174822
2013-02-10 02:08:05 +00:00
Fariborz Jahanian 234c00d6d0 objective-C: Fixes a bogus warning due to not setting
the "nonatomic" attribute in property redeclaration
in class extension. Also, improved on diagnostics in
this area while at it. // rdar://13156292

llvm-svn: 174821
2013-02-10 00:16:04 +00:00
Jakub Staszak 853136229b Remove unneeded "TargetMachine.h" #includes.
llvm-svn: 174817
2013-02-09 20:54:05 +00:00
Nico Weber 06fcec1cf9 Formatter: Add test for default arguments.
llvm-svn: 174816
2013-02-09 18:02:07 +00:00
Dmitri Gribenko 4b8a84fdca FileCheck'ize tests
llvm-svn: 174815
2013-02-09 16:41:47 +00:00
Dmitri Gribenko f37d0cd780 FileCheck'ize a test
llvm-svn: 174814
2013-02-09 16:25:38 +00:00
Bill Wendling a7c3877dc7 TEMPORARY SYNTAX CHANGE!
The original syntax for the attribute groups was ambiguous. For example:

    declare void @foo() #1
    #0 = attributes { noinline }

The '#0' would be parsed as an attribute reference for '@foo' and not as a
top-level entity. In order to continue forward while waiting for a decision on
what the correct syntax is, I'm changing it to this instead:

     declare void @foo() #1
     attributes #0 = { noinline }

Repeat: This is TEMPORARY until we decide what the correct syntax should be.
llvm-svn: 174813
2013-02-09 15:48:49 +00:00
Bill Wendling 33ab8a2187 Add a DenseMapInfo class for the AttributeSet.
We are going to place the AttributeSet into a DenseMap during assembly writing.

llvm-svn: 174812
2013-02-09 15:42:51 +00:00
Dmitri Gribenko f340008eab Remove unreachable statement
llvm-svn: 174811
2013-02-09 15:24:28 +00:00
Dmitri Gribenko bcef3411cd Comment parsing: use CharInfo.h
This also gives us 0.2% speedup on '-fsyntax-only -Wdocumentation' time for
a testcase that consists of all Clang headers.

llvm-svn: 174810
2013-02-09 15:16:58 +00:00
Dmitri Gribenko efbbd1e90c libclang: use CXCursor getters to simplify code
llvm-svn: 174809
2013-02-09 14:12:09 +00:00
Justin Holewinski 36a50991e7 [NVPTX] Make address space errors more explicit (llvm_unreachable -> report_fatal_error)
llvm-svn: 174808
2013-02-09 13:34:15 +00:00
Jakub Staszak bef117fed5 Simplify code.
llvm-svn: 174807
2013-02-09 13:29:31 +00:00
Jakub Staszak ba3189bc0a Remove unneeded #includes.
llvm-svn: 174806
2013-02-09 13:29:10 +00:00
Jordan Rose 4938f276a5 Remove some stray uses of <ctype.h> functions.
These are causing assertions on some MSVC builds.

llvm-svn: 174805
2013-02-09 10:09:43 +00:00
Chris Lattner 55d911d833 This is the correct version of r174802.
llvm-svn: 174804
2013-02-09 07:37:59 +00:00
Chris Lattner 1a43b350c4 Fix a nasty off-by one error that only manifests with 64-bit word size (which is
not enabled yet).

llvm-svn: 174803
2013-02-09 07:37:26 +00:00
Ted Kremenek 7ee25676a5 QoI: -Wreadonly-iboutlet-property should have the warning's location on the property.
There's no need to refer to the @implementation at all.

Fixes <rdar://problem/13186515>

llvm-svn: 174802
2013-02-09 07:13:16 +00:00
Chris Lattner 6c29cb3b7a Fix the underlying problem that was causing read(0) to be called: sometimes the
bitcode writer would generate abbrev records saying that the abbrev should be
filled with fixed zero-bit bitfields (this happens in the .bc writer when 
the number of types used in a module is exactly one, since log2(1) == 0).

In this case, just handle it as a literal zero.  We can't "just fix" the writer
without breaking compatibility with existing bc files, so have the abbrev reader
do the substitution.

Strengthen the assert in read to reject reads of zero bits so we catch such 
crimes in the future, and remove the special case designed to handle this.

llvm-svn: 174801
2013-02-09 07:07:29 +00:00
Chris Lattner 1420fda82f recommit r173072 (preparing bitstream reader to read a machine word at a time,
instead of always 32-bits at a time) with two changes:

1. Make Read(0) always return zero without affecting the state of our cursor.
2. Hack word_t to always be 32 bits, as staging.

These two caveats will change shortly.

llvm-svn: 174800
2013-02-09 06:52:14 +00:00
Jordan Rose d9759fdb03 Release notes: mention support for Unicode and UCNs in identifiers.
I'm using the name "Extended Identifiers" for the feature because that's
what GCC calls them. According to the standard, the new feature is
"universal character names are now allowed in identifiers", but the more
interesting "feature" is that identifiers can now contain Unicode characters,
however they are written.

llvm-svn: 174798
2013-02-09 02:12:23 +00:00
Enrico Granata e1fb1654c8 Quick fix for the libc++ std::map synthetic children provider
If you try to access any child > 0 without having touched child 0, LLDB won't be able to reconstruct type information from the debug info.
Previously, we would fail.
Now, we simply go fetch child 0 and then come back.

llvm-svn: 174795
2013-02-09 01:44:23 +00:00
Douglas Gregor 7dab26b87c Ensure that type definitions present in just-loaded modules are
visible.

The basic problem here is that a given translation unit can use
forward declarations to form pointers to a given type, say,

  class X;
  X *x;

and then import a module that includes a definition of X:

  import XDef;

We will then fail when attempting to access a member of X, e.g., 

  x->method()

because the AST reader did not know to look for a default of a class
named X within the new module.

This implementation is a bit of a C-centric hack, because the only
definitions that can have this property are enums, structs, unions,
Objective-C classes, and Objective-C protocols, and all of those are
either visible at the top-level or can't be defined later. Hence, we
can use the out-of-date-ness of the name and the identifier-update
mechanism to force the update.

In C++, we will not be so lucky, and will need a more advanced
solution, because the definitions could be in namespaces defined in
two different modules, e.g.,

  // module 1
  namespace N { struct X; }

  // module 2
  namespace N { struct X { /* ... */ }; }

One possible implementation here is for C++ to extend the information
associated with each identifier table to include the declaration IDs
of any definitions associated with that name, regardless of
context. We would have to eagerly load those definitions.

llvm-svn: 174794
2013-02-09 01:35:03 +00:00
Jim Ingham 0161b49cba Reworked the way Process::RunThreadPlan and the ThreadPlanCallFunction interoperate to fix problems where
hitting auto-continue signals while running a thread plan would cause us to lose control of the debug 
session.

<rdar://problem/12993641>

llvm-svn: 174793
2013-02-09 01:29:05 +00:00
NAKAMURA Takumi 1aa79e9f63 clang/lib/StaticAnalyzer/Core/BugReporter.cpp: Appease old msvc in std::pair(0, 0).
llvm-svn: 174792
2013-02-09 01:22:23 +00:00
Jakub Staszak 65225c3aa1 Remove trailing spaces.
llvm-svn: 174791
2013-02-09 01:19:12 +00:00
Jakub Staszak 79a396fbef Remove unneeded #includes.
llvm-svn: 174790
2013-02-09 01:15:18 +00:00
Andrew Trick bc7059032b LSR IVChain improvement.
Handle chains in which the same offset is used for both loads and
stores to the same array.

Fixes rdar://11410078.

llvm-svn: 174789
2013-02-09 01:11:01 +00:00
Jordan Rose 58c61e006f Properly validate UCNs for C99 and C++03 (both more restrictive than C(++)11).
Add warnings under -Wc++11-compat, -Wc++98-compat, and -Wc99-compat when a
particular UCN is incompatible with a different standard, and -Wunicode when
a UCN refers to a surrogate character in C++03.

llvm-svn: 174788
2013-02-09 01:10:25 +00:00
Anna Zaks 7811c3efd5 [analyzer] Invalidation checker: move the "missing implementation" check
The missing definition check should be in the same category as the
missing ivar validation - in this case, the intent is to invalidate in
the given class, as described in the declaration, but the implementation
does not perform the invalidation. Whereas the MissingInvalidationMethod
checker checks the cases where the method intention is not to
invalidate. The second checker has potential to have a much higher false
positive rate.

llvm-svn: 174787
2013-02-09 01:09:27 +00:00
Jakub Staszak f23980aba5 Remove #includes from the commonly used LoopInfo.h.
llvm-svn: 174786
2013-02-09 01:04:28 +00:00
Manman Ren d2c95eb995 Dwarf: do not use line_table_start in at_stmt_list since we do not always emit
line table entries in assembly.

llvm-svn: 174785
2013-02-09 00:41:44 +00:00
Enrico Granata eba9e4a3aa The new progress bar mode was losing us information compared to the old dots mode in that we would have no way of knowing about test failures (short of peeking into the test result directory.. and you're not supposed to peek!)
Added a new line of information that reports the count of tests that pass, fail or have other things happen to them.

Again no flag to have the dots back. If you care, let us know!

llvm-svn: 174784
2013-02-09 00:37:07 +00:00
Jakob Stoklund Olesen fac770b865 Remove the old liveness algorithm.
This is part of the plan to delete LiveVariables.

llvm-svn: 174783
2013-02-09 00:04:07 +00:00
Anna Zaks 0d8779cb79 [analyzer] Move DefaultBool so that all checkers can share it.
llvm-svn: 174782
2013-02-08 23:55:50 +00:00
Anna Zaks 91a5fdf83a [analyzer] Split IvarInvalidation into two checkers
Separate the checking for the missing invalidation methods into a
separate checker so that it can be turned on/off independently.

llvm-svn: 174781
2013-02-08 23:55:47 +00:00
Anna Zaks 470543bb2b [analyzer] IvarInvalidation: refactor, pull out the diagnostic printing
llvm-svn: 174780
2013-02-08 23:55:45 +00:00
Anna Zaks a5096f6f51 [analyzer] IvarInvalidation: add annotation for partial invalidation
The new annotation allows having methods that only partially invalidate
IVars and might not be called from the invalidation methods directly
(instead, are guaranteed to be called before the invalidation occurs).
The checker is going to trust the programmer to call the partial
invalidation method before the invalidator.This is common in cases when
partial object tear down happens before the death of the object.

llvm-svn: 174779
2013-02-08 23:55:43 +00:00
Enrico Granata 27692bcf28 Fixing a logic flaw with NSURL summary. This was caught by running the test suite in 32bit mode
llvm-svn: 174778
2013-02-08 23:54:46 +00:00
Enrico Granata a94ee7da81 <rdar://problem/13176279>
The LLDB test suite now shows a progress bar instead of dots when not in verbose mode
If you crave the dots, make your Terminal window smaller than 10 columns :-)
(or ask for a flag to have the dots come back on demand)

llvm-svn: 174777
2013-02-08 23:39:18 +00:00
Sergei Larin cd1201b98c Enable *BasicBlockPass::createPrinterPass()
Enables raw_ostream I/O for BasicBlockPass.

llvm-svn: 174776
2013-02-08 23:37:41 +00:00
Fariborz Jahanian f3c171ebec objective-C: don't issue bogus warning about
"auto-synthesized may not work correctly with 'nib' loader"
when 'readonly' property is redeclared 'readwrite' in class
extension. // rdar://13123861

llvm-svn: 174775
2013-02-08 23:32:30 +00:00