Commit Graph

111554 Commits

Author SHA1 Message Date
Johnny Chen 04adb62569 Uniquefy the various data-formatter test class names so that:
./dotest.py -v -f DataFormatterTestCase.test_with_dsym_and_run_command

will not end up running 14 tests.

llvm-svn: 138399
2011-08-23 22:32:45 +00:00
Eli Friedman 3fa64df543 Refactor and fix checking for initialization of flexible array members. The old version had the checks scattered across the code, missed some checks, and had a couple nasty bugs in existing checks.
Fixes PR10648 and another similar accepts-invalid bug.

llvm-svn: 138398
2011-08-23 22:24:57 +00:00
Bill Wendling 01a325a40e Look at the end of the entry block for an invoke.
The invoke could be at the end of the entry block. If it's the only one, then we
won't process all of the landingpad instructions correctly. This code is
currently ugly, but should be made much nicer once the new EH switch is thrown.

llvm-svn: 138397
2011-08-23 22:20:16 +00:00
Johnny Chen 4aa4f5dc0a Skip these two cases temporarily while investigating the crash on OSX Lion with clang as the compiler.
llvm-svn: 138393
2011-08-23 22:10:17 +00:00
Bruno Cardoso Lopes 9e9f2ce32d Fix a nasty bug where a v4i64 was being wrong emitted with 32-bit
permutations. Also tidy up some patterns and make them close to their
instruction definition!

llvm-svn: 138392
2011-08-23 22:06:37 +00:00
Johnny Chen 597cbbbd45 Make clang the default compiler for building the test programs.
llvm-svn: 138391
2011-08-23 21:54:10 +00:00
Jordy Rose 5aa9b1dd3f [analyzer] Clean up unused bits of CFRefCount.
llvm-svn: 138390
2011-08-23 21:51:36 +00:00
Eric Christopher c3fc262423 Right now this requires asserts.
llvm-svn: 138389
2011-08-23 21:47:58 +00:00
Jordy Rose 908426aae4 [analyzer] Make CFRefBug and CFRefReportVisitor not dependent on CFRefCount. Unfortunately, CFRefReport still is. No functionality change.
llvm-svn: 138388
2011-08-23 21:47:17 +00:00
Bill Wendling 4eb0433672 A landingpad instruction is neither folded nor dead.
llvm-svn: 138387
2011-08-23 21:33:05 +00:00
Jim Grosbach 51b554247d Move ARM frame-unwinding EHABI handling a touch earlier.
It should go before AsmPrinter MC pseudo expansion since it's based on
MachineInstr, not MCInst. Otherwise any frame related pseudo instructions
may be missed.

llvm-svn: 138386
2011-08-23 21:32:34 +00:00
Enrico Granata 129c3db6a7 Fixing commas in enums (build breaker on GCC) as reported by Filipe Cabecinhas
llvm-svn: 138385
2011-08-23 21:29:50 +00:00
Enrico Granata 88da35f881 Improved the user-friendliness of errors shown by the summary feature in certain areas
Renamed format "signed decimal" to be "decimal". "unsigned decimal" remains unchanged:
 - the name "signed decimal" was interfering with symbol %S (use summary) in summary strings.
   because of the way summary strings are implemented, this did not really lead to a bug, but
   simply to performing more steps than necessary to display a summary. this is fixed.
Documentation improvements (more on synthetic children, some information on filters). This is still a WIP.

llvm-svn: 138384
2011-08-23 21:26:09 +00:00
Sean Callanan bccce81340 Added support for persistent types to the
expression parser.  You can use a persistent
type like this:

(lldb) expr struct $foo { int a; int b; };
(lldb) struct $foo i; i.a = 2; i.b = 3; i
($foo) $0 = {
  (int) a = 2
  (int) b = 3
}

typedefs work similarly.

This patch affects the following files:

test/expression_command/persistent_types/*
  A test case for persistent types,
  in particular structs and typedefs.

ClangForward.h
  Added TypeDecl, needed to declare some
  functions in ASTResultSynthesizer.h

ClangPersistentVariables.[h,cpp]
  Added a list of persistent types to the
  persistent variable store.

ASTResultSynthesizer.[h,cpp]
  Made the AST result synthesizer iterate
  across TypeDecls in the expression, and
  record any persistent types found.  Also
  made a minor documentation fix.

ClangUserExpression.[h,cpp]
  Extended the user expression class to
  keep the state needed to report the
  persistent variable store for the target
  to the AST result synthesizers. 

  Also introduced a new error code for
  expressions that executed normally but
  did not return a result.

CommandObjectExpression.cpp
  Improved output for expressions (like 
  declarations of new persistent types) that
  don't return a result.  This is no longer
  treated as an error.

llvm-svn: 138383
2011-08-23 21:20:51 +00:00
Jordy Rose fd13f6f56a [analyzer] Cleanup: Move temporary declarations of CFRefCount variables closer to their uses. No functionality change.
llvm-svn: 138382
2011-08-23 21:06:32 +00:00
Argyrios Kyrtzidis 18c88a96eb Remove one SourceManager::isInFileID overload and use isOffsetInFileID for the other.
llvm-svn: 138381
2011-08-23 21:02:45 +00:00
Argyrios Kyrtzidis 2797df6a24 Amend r138129 (reduction of SLocEntries) which introduced performance regression due
to increased calls to SourceManager::getFileID. (rdar://9992664)

Use a slightly different approach that is more efficient both in terms of speed
(no extra getFileID calls) and in SLocEntries reduction.

Comparing pre-r138129 and this patch we get:

For compiling SemaExpr.cpp reduction of SLocEntries by 26%.
For the boost enum library:
  -SLocEntries -34% (note that this was -5% for r138129)
  -Memory consumption -50%
  -PCH size -31%

Reduced SLocEntries also benefit the hot function SourceManager::getFileID,
evident by the reduced "FileID scans".

llvm-svn: 138380
2011-08-23 21:02:41 +00:00
Argyrios Kyrtzidis e7f7516148 Introduce SourceManager::isInSLocAddrSpace and use it in TokenLexer instead of isInFileID
since it is a bit more efficient.

llvm-svn: 138379
2011-08-23 21:02:38 +00:00
Argyrios Kyrtzidis 5451a3973b Rename SourceManager::isBeforeInSourceLocationOffset -> isBeforeInSLocAddrSpace.
llvm-svn: 138378
2011-08-23 21:02:35 +00:00
Argyrios Kyrtzidis 7a7ff681ee TokenLexer::getExpansionLocForMacroDefLoc doesn't need to return an invalid SourceLocation.
llvm-svn: 138377
2011-08-23 21:02:32 +00:00
Argyrios Kyrtzidis f6a3b0ca4b In Lexer::isAtEndOfMacroExpansion use SourceManager::isInFileID and avoid
the extra SourceManager::getFileID call.

llvm-svn: 138376
2011-08-23 21:02:30 +00:00
Argyrios Kyrtzidis 296374b501 Move a couple of SourceManager functions out-of-line; no functionality change.
llvm-svn: 138375
2011-08-23 21:02:28 +00:00
Jordy Rose 20d4e68195 [analyzer] Move function retain-count effect summary log from CFRefCount to RetainReleaseChecker, and then explicitly provide the summary log when creating CFRefReports. No functionality change.
llvm-svn: 138374
2011-08-23 20:55:48 +00:00
Jim Grosbach 50b0f6669c [SU]XT[BH] are only available on ARMv6 and up.
llvm-svn: 138373
2011-08-23 20:53:08 +00:00
Ted Kremenek ee9848e20d Fix regression in -Wuninitialized involving VLAs. It turns out that we were modeling sizeof(VLAs)
incorrectly in the CFG, and also the static analyzer.  This patch regresses the analyzer a bit, but
that needs to be followed up with a better solution.

Fixes <rdar://problem/10008112>.

llvm-svn: 138372
2011-08-23 20:30:50 +00:00
Nate Begeman 43c322b5b2 Add some useful accessors to c++ api that appear to be missing from the c api
llvm-svn: 138371
2011-08-23 20:27:46 +00:00
Jordy Rose bf77e51fa1 [analyzer] Move helper method Update from CFRefCount to RetainReleaseChecker. No functionality change.
llvm-svn: 138370
2011-08-23 20:27:16 +00:00
Eli Friedman 750a5916af Cleanup to use helper.
llvm-svn: 138369
2011-08-23 20:22:34 +00:00
Eli Friedman c616c5ff1a Remove function parameter which always used the default value.
llvm-svn: 138368
2011-08-23 20:17:13 +00:00
Evan Cheng 4d6c9d711d Some refactoring so TargetRegistry.h no longer has to include any files
from MC.

llvm-svn: 138367
2011-08-23 20:15:21 +00:00
Eric Christopher 7bc78f692c Revert "Address Duncan's CR request:"
This reverts commit 20a05be15ea5271ab6185b83200fa88263362400. (svn rev 138340)

Conflicts:

	test/Transforms/InstCombine/bitcast.ll

llvm-svn: 138366
2011-08-23 20:11:10 +00:00
Jordy Rose 6763e38736 [analyzer] Move helper method handleAutoreleaseCounts from CFRefCount to RetainReleaseChecker. No functionality change.
llvm-svn: 138365
2011-08-23 20:07:14 +00:00
Jim Grosbach 37563cd545 Thumb parsing and encoding for WFE, WFI and YIELD.
llvm-svn: 138364
2011-08-23 20:02:30 +00:00
Jim Grosbach ad9e8655ee Thumb parsing and encoding for UXTB and UXTH.
llvm-svn: 138363
2011-08-23 19:59:32 +00:00
Jim Grosbach 5e4ea175f6 Thumb parsing and encoding for TST.
llvm-svn: 138362
2011-08-23 19:53:17 +00:00
Jim Grosbach bb07e73e0d Thumb parsing and encoding for SXTB and SXTH.
llvm-svn: 138361
2011-08-23 19:51:42 +00:00
Jim Grosbach 5cc338da67 Thumb parsing and encoding for SVC.
llvm-svn: 138360
2011-08-23 19:49:10 +00:00
Jim Grosbach d88404fbaa Thumb parsing and encoding for SUB.
llvm-svn: 138359
2011-08-23 19:45:45 +00:00
Jordy Rose 298cc4d907 [analyzer] Move ReturnStmt retain-count analysis from CFRefCount to RetainReleaseChecker. Tweak CFRefReport to reflect that fact that ReturnStmt checks are pre-statement, not post-statement. No intended functionality change.
llvm-svn: 138358
2011-08-23 19:43:16 +00:00
Evan Cheng 6b477b985b Fix 80 col violations.
llvm-svn: 138356
2011-08-23 19:17:21 +00:00
Nick Lewycky 4c8ff77f1b PerformSubCombine to work on integers larger than i128. Fixes a crasher.
llvm-svn: 138354
2011-08-23 19:01:24 +00:00
Jordy Rose 7861276f47 [analyzer] Move symbol death leak analysis from CFRefCount to RetainReleaseChecker.
llvm-svn: 138353
2011-08-23 19:01:07 +00:00
Jim Grosbach f1ca6a6df6 Thumb parsing and encoding for STRH.
llvm-svn: 138352
2011-08-23 18:56:20 +00:00
Caitlin Sadowski ffa5a909b4 Thread safety: Adding in an option for variadic expr* array of arguments
llvm-svn: 138351
2011-08-23 18:49:23 +00:00
Caitlin Sadowski afbbd8e5ad Thread-safety analysis: adding in a basic lockset tracking system. This
system flags an error when unlocking a lock which was not held, locking
the same lock twice, having a different lockset on each iteration of a
loop, or going out of scope while still holding a lock. In order to
successfully use the lockset, this patch also makes sure that attribute
arguments are attached correctly for later parsing.

This patch was also worked on by DeLesley Hutchins.

Note: This patch has been reviewed by Chandler Carruth and Jeffrey
Yasskin. Feel free to provide post-commit review comments for a
subsequent patch.

llvm-svn: 138350
2011-08-23 18:46:34 +00:00
Jim Grosbach 635aa69a91 Thumb parsing and encoding for STRB.
llvm-svn: 138349
2011-08-23 18:43:06 +00:00
Jim Grosbach 505be75900 Thumb parsing and encoding for tSTRspi.
llvm-svn: 138348
2011-08-23 18:39:41 +00:00
Jim Grosbach 6e546e0725 Thumb parsing and encoding for STR.
Not including tSTRspi.

llvm-svn: 138347
2011-08-23 18:33:38 +00:00
Rafael Espindola f9a688176f Fix an example in the documentation.
Patch by Sanjoy Das!

llvm-svn: 138346
2011-08-23 18:26:56 +00:00
Jim Grosbach d80d169a04 Thumb parsing and encoding for STM.
llvm-svn: 138345
2011-08-23 18:15:37 +00:00