Commit Graph

144500 Commits

Author SHA1 Message Date
Enrico Granata a221e4e89c Optimization of the code-running NSDictionary formatter to skip runtime symbol fetching
llvm-svn: 176041
2013-02-25 19:44:39 +00:00
Greg Clayton 59c40ff3f9 <rdar://problem/13286937>
Make sure to not look in self.images when we have a symbolicator with a live process.

llvm-svn: 176040
2013-02-25 19:34:57 +00:00
Jim Ingham e2ff0ba20d Add a log line when debugserver exits, and clean up some of the other standard logs output to make it more useful.
llvm-svn: 176039
2013-02-25 19:31:37 +00:00
Chad Rosier 1ef5d51ade Add a front-end test case for r176036.
llvm-svn: 176038
2013-02-25 19:13:23 +00:00
Andrew Trick 7cf4361912 pre-RA-sched fix: only reevaluate physreg interferences when necessary.
Fixes rdar:13279013: scheduler was blowing up on select instructions.

llvm-svn: 176037
2013-02-25 19:11:48 +00:00
Chad Rosier 669bb3ee77 [ms-inline asm] Add support for the pushad/popad mnemonics.
rdar://13254235

llvm-svn: 176036
2013-02-25 19:06:27 +00:00
Michael Han dbe8890be2 Fix empty declaration printing.
Don't print the semicolon when visiting an empty declaration because the semicolon
will be printed as a terminator later.

llvm-svn: 176035
2013-02-25 18:40:11 +00:00
Jordan Rose f9e9a9f41b [analyzer] Base regions may be invalid when layered on symbolic regions.
While RegionStore checks to make sure casts on TypedValueRegions are valid,
it does not do the same for SymbolicRegions, which do not have perfect type
info anyway. Additionally, MemRegion::getAsOffset does not take a
ProgramState, so it can't use dynamic type info to determine a better type
for the regions. (This could also be dangerous if the type of a super-region
changes!)

Account for this by checking that a base object region is valid on top of a
symbolic region, and falling back to "symbolic offset" mode if not.

Fixes PR15345.

llvm-svn: 176034
2013-02-25 18:36:15 +00:00
Renato Golin 8b90511e6b ARM build docs easier for copy&paste
llvm-svn: 176033
2013-02-25 18:25:58 +00:00
Eric Christopher e63c305b72 Add forgotten testcase.
llvm-svn: 176032
2013-02-25 18:19:32 +00:00
Matt Beaumont-Gay 0e760da5fc 'Hexadecimal' has two 'a's and only one 'i'.
llvm-svn: 176031
2013-02-25 18:11:18 +00:00
Bill Schmidt b454829981 Fix missing relocation for TLS addressing peephole optimization.
Report and fix due to Kai Nacke.  Testcase update by me.

llvm-svn: 176029
2013-02-25 16:44:35 +00:00
Daniel Jasper 62e681744c Re-add hack that caused regression.
This fixes llvm.org/PR15350.

Before:
Constructor(int Parameter = 0)
    : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaa),
                aaaaaaaaaaaa(aaaaaaaaaaaaaaaaa) {}

After:
Constructor(int Parameter = 0)
    : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaa),
      aaaaaaaaaaaa(aaaaaaaaaaaaaaaaa) {}

I think the correct solution is to put the VariablePos into
ParenState, not LineState. Added FIXME.

llvm-svn: 176027
2013-02-25 15:59:54 +00:00
Howard Hinnant a9f698009f Alexey Samsonov: #ifdefs out undefined function in static build of libc++ w/o RTTI.
llvm-svn: 176026
2013-02-25 15:50:36 +00:00
Edwin Vane f901b71921 Adding hasDeclaration overload for TemplateSpecializationType
TemplateSpecializationType doesn't quite have getDecl(). Need to go
through TemplateName to get a TemplateDecl.

Added test cases for the hasDeclaration() overload for
TemplateSpecializationType. Also introduced the type matcher
templateSpecializationType() used by the new hasDeclaration() test case.

Updated LibASTMatchersReference.

Reviewers: klimek
llvm-svn: 176025
2013-02-25 14:49:29 +00:00
Edwin Vane ed93645739 Support in hasDeclaration for types with getDecl()
Re-introducing r175532. The has_getDecl metafunction didn't compile with
Visual Studio. This revision uses approaches has_getDecl from a
different angle that isn't a problem for Visual Studio.

Added dedicated tests for the metafunction.

Reviewers: klimek
llvm-svn: 176024
2013-02-25 14:32:42 +00:00
Chandler Carruth 121dbf8846 Fix spelling noticed by Duncan.
llvm-svn: 176023
2013-02-25 14:29:38 +00:00
Chandler Carruth 05920b1847 Fix the root cause of PR15348 by correctly handling alignment 0 on
memory intrinsics in the SDAG builder.

When alignment is zero, the lang ref says that *no* alignment
assumptions can be made. This is the exact opposite of the internal API
contracts of the DAG where alignment 0 indicates that the alignment can
be made to be anything desired.

There is another, more explicit alignment that is better suited for the
role of "no alignment at all": an alignment of 1. Map the intrinsic
alignment to this early so that we don't end up generating aligned DAGs.

It is really terrifying that we've never seen this before, but we
suddenly started generating a large number of alignment 0 memcpys due to
the new code to do memcpy-based copying of POD class members. That patch
contains a bug that rounds bitfield alignments down when they are the
first field. This can in turn produce zero alignments.

This fixes weird crashes I've seen in library users of LLVM on 32-bit
hosts, etc.

llvm-svn: 176022
2013-02-25 14:20:21 +00:00
Edwin Vane d0dfa07b44 Reverting r176019. Corrupt patch.
llvm-svn: 176021
2013-02-25 14:09:28 +00:00
Alexey Samsonov 54ff0f6388 [Sanitizer] one more fix for signed/unsigned mismatch in comparison
llvm-svn: 176020
2013-02-25 14:06:38 +00:00
Edwin Vane 8342598d1b Support in hasDeclaration for types with getDecl()
Re-introducing r175532. The has_getDecl metafunction didn't compile with Visual
Studio. This revision approaches has_getDecl from a different angle that isn't
a problem for Visual Studio.

Added dedicated tests for the metafunction.

Reviewers: klimek
llvm-svn: 176019
2013-02-25 13:59:06 +00:00
Daniel Jasper 64c3851be6 Update generated documentation after recent matcher addition.
llvm-svn: 176018
2013-02-25 12:39:41 +00:00
Daniel Jasper 639522ca35 Add matcher for AccessSpecDecls.
Also, add matchers isPrivate(), isProtected() and isPublic(), that
restrict the matching of such AccessSpecDecls and all other Decls.

llvm-svn: 176017
2013-02-25 12:02:08 +00:00
Alexey Samsonov b2ac280f96 [Sanitizer] fix signed/unsigned compare warnings in sanitizer_stacktrace_test. Build sanitizer_common tests with -Werror as we use predictable just-built Clang for building them
llvm-svn: 176014
2013-02-25 09:00:03 +00:00
Alexey Samsonov 85f0a7e644 [TSan] Add interceptor for malloc_usable_size()
llvm-svn: 176013
2013-02-25 08:43:10 +00:00
Alexey Samsonov 10bccda948 [TSan] remove temporary build directory in 'make clean' command
llvm-svn: 176012
2013-02-25 08:32:02 +00:00
Ted Kremenek 9db5f52c47 [analyzer] Relax assumption in FindLastStoreBRVisitor that the thing we are looking for is always a VarRegion.
This was triggering assertion failures when analyzing the LLVM codebase.  This
is fallout from r175988.

I've got delta chewing away on a test case, but I wanted the fix to go
in now.

llvm-svn: 176011
2013-02-25 07:37:18 +00:00
Ted Kremenek 04fa9e3d80 [analyzer] add the notion of an "interesting" lvalue expression for ExplodedNode pruning.
r175988 modified the ExplodedGraph trimming algorithm to retain all
nodes for "lvalue" expressions.  This patch refines that notion to
only "interesting" expressions that would be used for diagnostics.

llvm-svn: 176010
2013-02-25 07:37:13 +00:00
Bill Wendling 87869db5f5 Add more attributes from the command line to functions.
This is an ongoing process. Any command line option which a back-end cares about
should be added here.

llvm-svn: 176009
2013-02-25 07:15:16 +00:00
Han Ming Ong c73f9c5d89 <rdar://problem/13282582>
Need available CPU on target device to support CPU reporting.

llvm-svn: 176008
2013-02-25 05:41:42 +00:00
Reed Kotler bd1058a877 Make pseudos FEXT_CCRX16_ins and FEXT_CCRXI16_ins into custom emitters.
llvm-svn: 176007
2013-02-25 02:25:47 +00:00
Dmitri Gribenko a431ae6842 Documentation: add an idea for a (weird) clang tool
llvm-svn: 176005
2013-02-25 01:14:45 +00:00
David Blaikie bbe0e1abe6 DIBuilder: support structs with vtable pointers in the same way as classes
llvm-svn: 176004
2013-02-25 01:07:18 +00:00
David Blaikie 6d4fe1592d Update Clang for a minor DIBuilder breaking change.
llvm-svn: 176003
2013-02-25 01:07:08 +00:00
Reed Kotler 7a86b3dc2b Make psuedo FEXT_T8I816_ins into a custom emitter.
llvm-svn: 176002
2013-02-24 23:17:51 +00:00
Aaron Ballman 234ebd74ac Moving initialization into the initializer list and correcting capitalization, as suggested by Chandler.
llvm-svn: 176001
2013-02-24 19:08:10 +00:00
Dmitri Gribenko 2b125832e3 Documentation: add an idea for an automatic refactoring
llvm-svn: 176000
2013-02-24 19:04:36 +00:00
Daniel Jasper 26d1b1db23 Allow breaking between a type and name in variable declarations.
This fixes llvm.org/PR14967 and is generall necessary to avoid
situations where the column limit is exceeded. The challenge is
restricting such lines splits, otherwise clang-format suddenly starts
breaking at bad places.

Before:
ReallyLongReturnType<TemplateParam1, TemplateParam2>
ReallyReallyLongFunctionName(
    const std::string &SomeParameter,
    const SomeType<string,
                   SomeOtherTemplateParameter> &ReallyReallyLongParameterName,
    const SomeType<string,
                   SomeOtherTemplateParameter> &AnotherLongParameterName) {}

After:
ReallyLongReturnType<TemplateParam1, TemplateParam2>
ReallyReallyLongFunctionName(
    const std::string &SomeParameter,
    const SomeType<string, SomeOtherTemplateParameter> &
        ReallyReallyLongParameterName,
    const SomeType<string, SomeOtherTemplateParameter> &
        AnotherLongParameterName) {}

llvm-svn: 175999
2013-02-24 18:54:32 +00:00
Bill Schmidt c68c6df884 Fix PR14364.
This removes a const_cast hack from PPCRegisterInfo::hasReservedSpillSlot().
The proper place to save the frame index for the CR spill slot is in the
PPCFunctionInfo object, not the PPCRegisterInfo object.

No new test cases, as this just reimplements existing function.  Existing
tests such as test/CodeGen/PowerPC/crsave.ll are sufficient.

llvm-svn: 175998
2013-02-24 17:34:50 +00:00
Shankar Easwaran 596b40871a [ELF][Hexagon] add _SDA_BASE_(absolute symbol pointing to start of quickdata)
llvm-svn: 175997
2013-02-24 16:02:24 +00:00
Benjamin Kramer e08de37902 Add the testcase from PR13573, this used to crash.
The error is a bit strange tbh, but better than crashing.

llvm-svn: 175996
2013-02-24 15:51:32 +00:00
Benjamin Kramer ee40b9a2d4 CVP: If we have a PHI with an incoming select, try to skip the select.
This is a common pattern with dyn_cast and similar constructs, when the
PHI no longer depends on the select it can often be turned into a simpler
construct or even get hoisted out of the loop.

PR15340.

llvm-svn: 175995
2013-02-24 15:34:43 +00:00
Benjamin Kramer b867fea5e6 Fix invalid IR in test, missing incoming value for PHI node.
llvm-svn: 175994
2013-02-24 15:34:29 +00:00
Shankar Easwaran 1b095842ec [ELF] Change functions to virtual, in ExecutableAtoms
llvm-svn: 175993
2013-02-24 15:11:55 +00:00
Shankar Easwaran 5f0afe84f5 [ELF]Change name of runtime files, so that targets can change runtime files that they own
llvm-svn: 175992
2013-02-24 14:54:02 +00:00
Francois Pichet d1cef3ecd3 Typo
llvm-svn: 175991
2013-02-24 12:34:13 +00:00
Ted Kremenek 9625048278 [analyzer] tracking stores/constraints now works for ObjC ivars or struct fields.
This required more changes than I originally expected:

- ObjCIvarRegion implements "canPrintPretty" et al
- DereferenceChecker indicates the null pointer source is an ivar
- bugreporter::trackNullOrUndefValue() uses an alternate algorithm
  to compute the location region to track by scouring the ExplodedGraph.
  This allows us to get the actual MemRegion for variables, ivars,
  fields, etc.  We only hand construct a VarRegion for C++ references.
- ExplodedGraph no longer drops nodes for expressions that are marked
  'lvalue'.  This is to facilitate the logic in the previous bullet.
  This may lead to a slight increase in size in the ExplodedGraph,
  which I have not measured, but it is likely not to be a big deal.

I have validated each of the changed plist output.

Fixes <rdar://problem/12114812>

llvm-svn: 175988
2013-02-24 07:21:01 +00:00
Ted Kremenek e3cf171730 Add "KnownSVal" to represent SVals that cannot be UnknownSVal.
This provides a few sundry cleanups, and allows us to provide
a compile-time check for a case that was a runtime assertion.

llvm-svn: 175987
2013-02-24 07:20:53 +00:00
Ted Kremenek c4a90244bb Add regression test for serialized diagnostics for notes without locations.
This meant to be included in r175802.

llvm-svn: 175986
2013-02-24 07:20:47 +00:00
Nadav Rotem b532fca92c Revert r169638 because it broke Mesa llvmpipe tests.
Fix PR15239.

llvm-svn: 175985
2013-02-24 07:09:35 +00:00