summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Thread safety analysis: don't warn in case of duplicate annotation.DeLesley Hutchins2012-07-022-8/+31
| | | | llvm-svn: 159606
* Improve crash reporting test coverage.David Blaikie2012-07-021-2/+8
| | | | | | | | | | This adds validation that the * repro source is only rewrite-includes processed, not fully preprocessed. * repro script contains macro definitions (-DFOO=BAR). Based on suggestions/help by Matt Beaumont-Gay. llvm-svn: 159605
* <rdar://problem/11744001>Greg Clayton2012-07-021-0/+1
| | | | | | Fixed an issue where GDB servers that don't support the thread suffix could get registers states incorrectly due to an incorrect assumption that the current register thread (set using the "Hg%x" packet) will always be cached between runs. Now we clear the cached register thred when the process is resumed. llvm-svn: 159603
* Thread Safety Analysis: turn off checking within trylock functions.DeLesley Hutchins2012-07-022-0/+33
| | | | llvm-svn: 159601
* Add a warning flag for "'extern' variable has an initializer".Matt Beaumont-Gay2012-07-022-3/+3
| | | | llvm-svn: 159600
* misched: allow NULL InstrItineraries.Andrew Trick2012-07-021-0/+1
| | | | llvm-svn: 159599
* Extend a workaround for a CMake bug in LLVM's r159593 to apply toChandler Carruth2012-07-021-1/+2
| | | | | | a Clang target which hits the same bug directly. llvm-svn: 159598
* Extend the workaround from r159593 to cover a few explicit aliasChandler Carruth2012-07-021-1/+2
| | | | | | targets. llvm-svn: 159597
* [analyzer] If 'super' is known to be nil, we can still mark its range.Jordan Rose2012-07-021-1/+1
| | | | llvm-svn: 159596
* Revert "Remove unused member (& consequently unused parameter) in SA's Call ↵Jordan Rose2012-07-022-6/+14
| | | | | | | | | | | | | code." ...and instead add an accessor. We're not using this today, but it's something that should probably stay in the source for potential clients, and it doesn't cost a lot. (ObjCPropertyAccess is only created on the stack, and right now there's only ever one alive at a time.) This reverts r159581 / commit 8e674e1da34a131faa7d43dc3fcbd6e49120edbe. llvm-svn: 159595
* We support a mode where the Clang regression tests are run but not theChandler Carruth2012-07-021-3/+8
| | | | | | | | | | | | Clang unit tests. It's not clear why we support this mode in builds where LLVM is available (LLVM itself does not), but at least this makes us support it correctly. This also fixes a long-standing bug where we would pass the unit test param flag to lit in the standalone build even though the standalone build *never* has the unittests built and ready for testing. llvm-svn: 159594
* Revert r159588, and apply a more principled fix. Place the fix for thisChandler Carruth2012-07-022-5/+8
| | | | | | | | | | | | in the abstraction for lit test suites so that the various other layers of abstraction pick up the same behavioral fix, and so that we still get a complete list of dependencies for the 'check-all' target. This should fix the follow-on issues of the same nature with various other build targets, including Clang targets. Sorry for the churn, and again thanks to Matt for testing and breaking this more thoroughly. llvm-svn: 159593
* Include -D files in crash report repro scripts. (PR13255)David Blaikie2012-07-021-1/+0
| | | | | | | | | | | | Now that we're only using -frewrite-includes rather than full preprocessing when producing repro source files, we should also include command line macro definitions in the repro script. I don't have a test case for this because I'm not sure if/how I can open the crash report file when the name is only known by scraping the crash report output. Suggestions welcome if anyone thinks it'd be helpful. llvm-svn: 159592
* In blocks, only pretend that enum constants have enum type if necessary.Jordan Rose2012-07-027-78/+204
| | | | | | | | | | | | | | | | | | In C, enum constants have the type of the enum's underlying integer type, rather than the type of the enum. (This is not true in C++.) Thus, when a block's return type is inferred from an enum constant, it is incompatible with expressions that return the enum type. In r158899, I told block returns to pretend that enum constants have enum type, like in C++. Doug Gregor pointed out that this can break existing code. Now, we don't check the types of return statements until the end of the block. This lets us go back and add implicit casts in blocks with mixed enum constants and enum-typed expressions. <rdar://problem/11662489> (again) llvm-svn: 159591
* Turn an assert into an error to make it a bit more friendly.Eric Christopher2012-07-021-2/+9
| | | | | | Part of rdar://6880388 and rdar://11766377 llvm-svn: 159590
* Work around a really frustrating apparant CMake bug.Chandler Carruth2012-07-021-2/+4
| | | | | | | | | | | No functionality changed here, except that the CMake installed by default on Ubuntu Lucid should actually work with the makefile generators now. Thanks to Matt for the report and head-desking required to figure out why it was failing. llvm-svn: 159588
* When we're looking for redeclarations which might provide a definition in ↵Eli Friedman2012-07-022-0/+15
| | | | | | CodeGen, make sure we examine all the redeclarations. PR13252. llvm-svn: 159586
* Make this test invariant to future changes of the max loop unrolling count.Ted Kremenek2012-07-021-1/+1
| | | | llvm-svn: 159585
* Be more eager about setting the 'Invalid' bit on an invalid classDouglas Gregor2012-07-023-16/+15
| | | | | | | | | template instantiation. I wasn't able to reproduce this down to anything small enough to put in our test suite, but it's "obviously" okay to set the invalid bit earlier and precludes a known-broken-but-not-marked-broken class from being used elsewhere. llvm-svn: 159584
* Fix -Wstring-conversion warning.David Blaikie2012-07-021-2/+1
| | | | | | Patch by Matt Beaumont-Gay. llvm-svn: 159583
* Clone a bit of LIT flag defaults from the LLVM CMake file into theChandler Carruth2012-07-021-0/+8
| | | | | | | | | standalone section of the Clang CMake files. This will likely make the lit runs in Clang much more suitable to IDEs such as Xcode and MSVC when operating in a standalone mode. llvm-svn: 159582
* Remove unused member (& consequently unused parameter) in SA's Call code.David Blaikie2012-07-022-10/+6
| | | | | | This member became unused in r159559. llvm-svn: 159581
* Revert r159528 which taught lit's builtin shell test runner about theChandler Carruth2012-07-021-15/+4
| | | | | | | | | | '|&' bash syntax. We have lots of users with a bash on their system which doesn't support this syntax, and as bash is still significantly faster, we should support them. The test suite has already been updated to cope with this. llvm-svn: 159580
* Reintroduced FieldDecl public methods setBitWidth and removeBitWidth.Abramo Bagnara2012-07-022-0/+16
| | | | llvm-svn: 159579
* Bail out the LiveVariables analysis when the CFG is very large, asTed Kremenek2012-07-023-0/+15
| | | | | | | | | we are encountering some scalability issues with memory usage. The appropriate long term fix is to make the analysis more scalable, but this will at least prevent the analyzer swapping when analyzing very large functions. llvm-svn: 159578
* Fix subtle bug in AnalysisConsumer where we would not analyze functions ↵Ted Kremenek2012-07-023-55/+173
| | | | | | | | | | | | whose parent in the call graph had been inlined but for whatever reason we did not inline some of its callees. Also, fix a related traversal bug where we meant to do a BFS of the callgraph but instead were doing a DFS. llvm-svn: 159577
* Switch from using a lit.cfg-generator variable to the real variable inChandler Carruth2012-07-021-1/+1
| | | | | | | | | | | the standalone mode. We've changed scoping and sequencing of variables being defined and that cause this to start to be unset breaking some cmake users. Thanks to Jordan Rose for the report. The fix also makes the condition on the preceding line much more sensible. =D llvm-svn: 159576
* Switch from using a lit.cfg-generator variable that happens to be foundChandler Carruth2012-07-021-1/+1
| | | | | | | | | due to strange scoping rules to the actual canonical variable name within the LLVM CMake build. No functionality changed. llvm-svn: 159575
* Pass the correct ELFOSABI enumeration to the MipsELFObjectWriter constructorJack Carter2012-07-022-1/+5
| | | | | Contributer: Sasa Stankovic llvm-svn: 159574
* Reduce default template instantiation depth to 512; we're blowing outDouglas Gregor2012-07-022-2/+2
| | | | | | the stack too often with 1024. Fixes <rdar://problem/11678534>. llvm-svn: 159573
* Extend TargetPassConfig to allow running only a subset of the normal passes.Bob Wilson2012-07-029-23/+118
| | | | | | | | | | | | | | | | | This is still a work in progress but I believe it is currently good enough to fix PR13122 "Need unit test driver for codegen IR passes". For example, you can run llc with -stop-after=loop-reduce to have it dump out the IR after running LSR. Serializing machine-level IR is not yet supported but we have some patches in progress for that. The plan is to serialize the IR to a YAML file, containing separate sections for the LLVM IR, machine-level IR, and whatever other info is needed. Chad suggested that we stash the stop-after pass in the YAML file and use that instead of the start-after option to figure out where to restart the compilation. I think that's a great idea, but since it's not implemented yet I put the -start-after option into this patch for testing purposes. llvm-svn: 159570
* Move assertion with TargetPassConfig's Initialized flag.Bob Wilson2012-07-021-2/+2
| | | | llvm-svn: 159569
* Consistently use AnalysisID types in TargetPassConfig.Bob Wilson2012-07-025-75/+71
| | | | | | | This makes it possible to just use a zero value to represent "no pass", so the phony NoPassID global variable is no longer needed. llvm-svn: 159568
* Add all codegen passes to the PassManager via TargetPassConfig.Bob Wilson2012-07-0214-100/+113
| | | | | | | | This is a preliminary step toward having TargetPassConfig be able to start and stop the compilation at specified passes for unit testing and debugging. No functionality change. llvm-svn: 159567
* Add a missing forward declaration of PassManagerBase.Bob Wilson2012-07-021-0/+1
| | | | llvm-svn: 159566
* Need a space.Evan Cheng2012-07-021-1/+1
| | | | llvm-svn: 159565
* [analyzer] Convert existing checkers to use check::preCall and check::postCall.Jordan Rose2012-07-026-202/+125
| | | | llvm-svn: 159563
* [analyzer] Add generic preCall and postCall checks.Jordan Rose2012-07-027-28/+197
| | | | llvm-svn: 159562
* [analyzer] Convert CXXConstructExpr over to use CallEvent for evaluation.Jordan Rose2012-07-021-83/+13
| | | | llvm-svn: 159561
* [analyzer] Use CallEvent for inlining and call default-evaluation.Jordan Rose2012-07-026-145/+148
| | | | llvm-svn: 159560
* [analyzer] Finish replacing ObjCMessage with ObjCMethodDecl and friends.Jordan Rose2012-07-0217-343/+153
| | | | | | | | The preObjCMessage and postObjCMessage callbacks now take an ObjCMethodCall argument, which can represent an explicit message send (ObjCMessageSend) or an implicit message generated by a property access (ObjCPropertyAccess). llvm-svn: 159559
* [analyzer] Begin replacing ObjCMessage with ObjCMethodCall and friends.Jordan Rose2012-07-0210-80/+136
| | | | | | | | | | | | Previously, the CallEvent subclass ObjCMessageInvocation was just a wrapper around the existing ObjCMessage abstraction (over message sends and property accesses). Now, we have abstract CallEvent ObjCMethodCall with subclasses ObjCMessageSend and ObjCPropertyAccess. In addition to removing yet another wrapper object, this should make it easy to add a ObjCSubscriptAccess call event soon. llvm-svn: 159558
* [analyzer] Move the last bits of CallOrObjCMessage over to CallEvent.Jordan Rose2012-07-029-386/+116
| | | | | | | | | | | | | This involved refactoring some common pointer-escapes code onto CallEvent, then having MallocChecker use those callbacks for whether or not to consider a pointer's /ownership/ as escaping. This still needs to be pinned down, and probably we want to make the new argumentsMayEscape() function a little more discerning (content invalidation vs. ownership/metadata invalidation), but this is a good improvement. As a bonus, also remove CallOrObjCMessage from the source completely. llvm-svn: 159557
* [analyzer] Convert CallAndMessageChecker and ObjCSelfInitChecker to CallEvent.Jordan Rose2012-07-022-24/+68
| | | | | | | | | Both of these got uglier rather than cleaner because we don't have preCall and postCall yet; properly wrapping a CallExpr in a CallEvent requires doing a bit of deconstruction on the callee. Even when we have preCall and postCall we may want to expose the current CallEvent to pre/postStmt<CallExpr>. llvm-svn: 159556
* [analyzer] Convert RetainCountChecker to use CallEvent as much as possible.Jordan Rose2012-07-022-191/+239
| | | | | | | | | | | | | | | | | | | | | | | | | This ended allowing quite a bit of cleanup, and some minor changes. - CallEvent makes it easy to use hasNonZeroCallbackArg more aggressively, which we check in order to avoid false positives with callbacks that might release the object. - In order to support this for functions which consume their arguments, there are two new ArgEffects: DecRefAndStopTracking and DecRefMsgAndStopTracking. These act just like StopTracking, except that if the object only had a return count of +1 it's now considered released instead (so we still get use-after-free messages). - On the plus side, we no longer have to special-case +[NSObject performSelector:withObject:afterDelay:] and friends. - The use of IdentifierInfos in the method summary cache is now hidden; only the ObjCInterfaceDecl gets passed around most of the time. - Since we cache all "simple" summaries and check every function call, there is no real benefit to having NULL stand in for default summaries anymore. - Whitespace, unused methods, etc. Even more simplification to come when we get check::postCall and can unify all these other post* checks. llvm-svn: 159555
* [analyzer] Add a new abstraction over all types of calls: CallEventJordan Rose2012-07-0221-340/+890
| | | | | | | | | | This is intended to replace CallOrObjCMessage, and is eventually intended to be used for anything that cares more about /what/ is being called than /how/ it's being called. For example, inlining destructors should be the same as inlining blocks, and checking __attribute__((nonnull)) should apply to the allocator calls generated by operator new. llvm-svn: 159554
* [PCH] Make sure that all newly introduced visible decls in a DeclContextArgyrios Kyrtzidis2012-07-024-2/+78
| | | | | | | | | | | | | | | | | coming from an AST file are registered for serialization. A static data member instantiation of in a chained PCH could be missed when serializing decls; the result was that when emitting the visible decls map of its DeclContext, we would use a DeclID that was not actually emitted, leading to crashes or hangs. Fix this by making sure such decls are always registered for serialization. Also introduce extra sanity checks to make sure we don't register new declarations or types after we have serialized the types/decls block. rdar://11728990 llvm-svn: 159550
* A ':' after an enum-specifier at class scope is a bitfield, not a typo for a ↵Richard Smith2012-07-024-7/+17
| | | | | | ';'. llvm-svn: 159549
* Revert accidental checkin.Andrew Trick2012-07-021-3/+2
| | | | | | My last checkin was apparently not the branch I intended. It was missing one change (added by chandlerc), and contained a spurious change. llvm-svn: 159548
* Fix the remaining TCL-style quotes found in the testsuite. This isChandler Carruth2012-07-02124-312/+312
| | | | | | | | | | | | | | | | | another mechanical change accomplished though the power of terrible Perl scripts. I have manually switched some "s to 's to make escaping simpler. While I started this to fix tests that aren't run in all configurations, the massive number of tests is due to a really frustrating fragility of our testing infrastructure: things like 'grep -v', 'not grep', and 'expected failures' can mask broken tests all too easily. Essentially, I'm deeply disturbed that I can change the testsuite so radically without causing any change in results for most platforms. =/ llvm-svn: 159547
OpenPOWER on IntegriCloud