summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Don't call 'FilesToRemove[0]' when the vector is empty, even to computeChandler Carruth2012-06-161-1/+1
| | | | | | | the address of it. Found by a checking STL implementation used on a dragonegg builder. Sorry about this one. =/ llvm-svn: 158582
* Make the analyzer site a single point of reference for infoAnna Zaks2012-06-162-33/+30
| | | | | | on controlling diagnostics. llvm-svn: 158581
* Harden the Unix signals code to be more async signal safe.Chandler Carruth2012-06-161-9/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is likely only the tip of the ice berg, but this particular bug caused any double-free on a glibc system to turn into a deadlock! It is not generally safe to either allocate or release heap memory from within the signal handler. The 'pop_back()' in RemoveFilesToRemove was deleting memory and causing the deadlock. What's worse, eraseFromDisk in PathV1 has lots of allocation and deallocation paths. We even passed 'true' in a place that would have caused the *signal handler* to try to run the 'system' system call and shell out to 'rm -rf'. That was never going to work... This patch switches the file removal to use a vector of strings so that the exact text needed for the 'unlink' system call can be stored there. It switches the loop to be a boring indexed loop, and directly calls unlink without looking at the error. It also works quite hard to ensure that calling 'c_str()' is safe, by ensuring that the non-signal-handling code path that manipulates the vector always leaves it in a state where every element has already had 'c_str()' called at least once. I dunno exactly how overkill this is, but it fixes the deadlock-on-double free issue, and seems likely to prevent any other issues from sneaking up. Sorry for not having a test case, but I *really* don't know how to test signal handling code easily.... llvm-svn: 158580
* [analyzer] Buffers passed to CGBitmapContextCreate can escape.Jordan Rose2012-06-163-5/+33
| | | | | | | | | | | | | | Specifically, although the bitmap context does not take ownership of the buffer (unlike CGBitmapContextCreateWithData), the data buffer can be extracted out of the created CGContextRef. Thus the buffer is not leaked even if its original pointer goes out of scope, as long as - the context escapes, or - it is retrieved via CGBitmapContextGetData and freed. Actually implementing that logic is beyond the current scope of MallocChecker, so for now CGBitmapContextCreate goes on our system function exception list. llvm-svn: 158579
* Make the ".*" operator work correctly when the base is a prvalue and the ↵Eli Friedman2012-06-153-1/+48
| | | | | | field has a non-trivial copy constructor. PR13097. llvm-svn: 158578
* Remove final verification in RABasic.Jakob Stoklund Olesen2012-06-151-20/+0
| | | | | | | We now have a proper machine code verifier pass between register allocation and rewriting. llvm-svn: 158577
* Print out register number in InlineSpiller.Jakob Stoklund Olesen2012-06-151-2/+2
| | | | llvm-svn: 158575
* Recover when correcting an unknown type name to a keyword like "struct".Kaelyn Uhrain2012-06-154-22/+30
| | | | llvm-svn: 158573
* Move isCXXSimpleTypeSpecifier from Parser to Sema and tweak it for wider use.Kaelyn Uhrain2012-06-155-36/+39
| | | | llvm-svn: 158572
* [-E] Emit a rewritten _Pragma on its own line.Jordan Rose2012-06-155-34/+93
| | | | | | | | | | | 1. Teach Lexer that pragma lexers are like macro expansions at EOF. 2. Treat pragmas like #define/#undef when printing. 3. If we just printed a directive, add a newline before any more tokens. (4. Miscellaneous cleanup in PrintPreprocessedOutput.cpp) PR10594 and <rdar://problem/11562490> (two separate related problems) llvm-svn: 158571
* Unit test for LSR kind=Special fix: r158536.Andrew Trick2012-06-151-0/+102
| | | | llvm-svn: 158570
* Documentation cleanup: escape < characters in Doxygen comments.James Dennett2012-06-151-1/+1
| | | | llvm-svn: 158569
* Documentation cleanup: Escaped # characters in Doxygen comments.James Dennett2012-06-151-2/+2
| | | | llvm-svn: 158568
* Documentation cleanup: Escaped backslashes in Doxygen comments.James Dennett2012-06-151-1/+1
| | | | llvm-svn: 158567
* Documentation cleanup: fix a type, LocatioinE -> LocationEJames Dennett2012-06-151-2/+2
| | | | llvm-svn: 158566
* Documentation cleanup: escape Objective-C @keywords in Doxygen comments.James Dennett2012-06-151-3/+3
| | | | llvm-svn: 158565
* Documentation cleanup: Made a parameter name in a \param command match the codeJames Dennett2012-06-151-1/+1
| | | | llvm-svn: 158564
* Accept null PhysReg arguments to checkRegMaskInterference.Jakob Stoklund Olesen2012-06-152-2/+3
| | | | | | | Calling checkRegMaskInterference(VirtReg) checks if VirtReg crosses any regmask operands, regardless of the registers they clobber. llvm-svn: 158563
* Documentation cleanup:James Dennett2012-06-154-18/+18
| | | | | | | | | * Escaped "::" and "<" as needed in Doxygen comments; * Marked up code examples with \code...\endcode; * Documented a \param that is current, instead of a few that aren't; * Fixed up some \file and \brief comments. llvm-svn: 158562
* [docs] Make it pretty.Michael J. Spencer2012-06-151-5/+34
| | | | llvm-svn: 158561
* Fix the encoding of the armv7m (MClass) for MSR registers other than aspr,Kevin Enderby2012-06-153-31/+41
| | | | | | iaspr, espr and xpsr which also needed to have 0b10 in their mask encoding bits. llvm-svn: 158560
* Documentation cleanup:James Dennett2012-06-155-18/+17
| | | | | | | | * Escaped Objective-C @keywords in Doxygen comments; * Documented more accurate \params; * Exposed some more summaries using \brief. llvm-svn: 158559
* Add a missing initializer in ASTBitCodes.hDmitri Gribenko2012-06-151-1/+1
| | | | llvm-svn: 158558
* Documentation cleanup:James Dennett2012-06-151-27/+38
| | | | | | | * Escaped # characters in Doxygen comments; * Added Doxygen markup (\brief, \code, \file, \namespace). llvm-svn: 158557
* Don't dereference root in __parse_ctor_dtor_name unless it is known to not ↵Howard Hinnant2012-06-151-1/+1
| | | | | | be null. llvm-svn: 158556
* Documentation cleanup: fixed/created some /brief function summaries.James Dennett2012-06-151-8/+14
| | | | llvm-svn: 158555
* Documentation cleanup: escape # in a Doxygen comment.James Dennett2012-06-151-1/+1
| | | | llvm-svn: 158554
* Documentation cleanup:James Dennett2012-06-151-8/+7
| | | | | | | | | * Escaped the # of #define in Doxygen comments; * Formatting: Annotated __VA_ARGS__ with \c; * Converted docs to use \brief to provide summaries; * Fixed a typo: disbles -> disables. llvm-svn: 158553
* Documentation cleanup: escape backslashes in Doxygen comments.James Dennett2012-06-151-4/+5
| | | | llvm-svn: 158552
* ARM: optimization for sub+abs.Manman Ren2012-06-153-14/+27
| | | | | | | | | | | | | | This patch will optimize abs(x-y) FROM sub, movs, rsbmi TO subs, rsbmi For abs, we will use cmp instead of movs. This is necessary because we already have an existing peephole pass which optimizes away cmp following sub. rdar: 11633193 llvm-svn: 158551
* Documentation cleanup: delete doc comments from source files where they areJames Dennett2012-06-152-13/+0
| | | | | | broken duplicates of comments that are in the corresponding header files. llvm-svn: 158550
* Documentation cleanup: escape # in a Doxygen comment.James Dennett2012-06-151-1/+1
| | | | llvm-svn: 158549
* Documentation cleanup: escape @ in a Doxygen comment.James Dennett2012-06-151-2/+2
| | | | llvm-svn: 158548
* Add 'invalid' as a Reference Kind so that unknown/invalid kind strings can ↵Nick Kledzik2012-06-152-3/+24
| | | | | | return that fact to the caller for use in constructing an error message, rather that triggering an assertion. llvm-svn: 158547
* Documentation fix (cleaning up my own breakage): close <tt> with </tt>,James Dennett2012-06-151-1/+1
| | | | | | not with another <tt>. llvm-svn: 158546
* Stop referring to functions as methods in per-function fallthrough-checking.Alexis Hunt2012-06-154-15/+16
| | | | llvm-svn: 158545
* remove return statements after llvm_unreachable() as the compiler no longer ↵Nick Kledzik2012-06-152-13/+0
| | | | | | warns abot missing return values llvm-svn: 158544
* *fixed to separate mnemonic from operands with tabKay Tiong Khoo2012-06-151-4/+4
| | | | llvm-svn: 158543
* use llvm_unreachable() instead of assert(0) for invalid enum values in ↵Nick Kledzik2012-06-154-15/+16
| | | | | | switch statements llvm-svn: 158542
* Use ADT/StringSwitchNick Kledzik2012-06-151-73/+41
| | | | llvm-svn: 158541
* LSR: fix expansion of scaled reg in non-address type formulae.Andrew Trick2012-06-151-13/+17
| | | | | | | | | For non-address users, Base and Scaled registers are not specially associated to fit an address mode, so SCEVExpander should apply normal expansion rules. Otherwise we may sink computation into inner loops that have already been optimized. llvm-svn: 158537
* LSR fix: "Special" users are just like "Basic" users but allow -1 scale.Andrew Trick2012-06-151-2/+2
| | | | llvm-svn: 158536
* Remove assignments which aren't used afterwards.Bill Wendling2012-06-151-3/+1
| | | | llvm-svn: 158535
* Remove assignments which aren't used afterwards.Bill Wendling2012-06-151-2/+0
| | | | llvm-svn: 158534
* [completion] Add completions for @"..." and @(...), and tidy up @[] and @{}.Jordan Rose2012-06-153-6/+43
| | | | | | | | | | | | | Specifically, @[] and @{} didn't have a type associated with them; we now use "NSArray *" and "NSDictionary *", respectively. @"" has the type "NSString *". @(), unfortunately, has type "id", since it (currently) may be either an NSNumber or an NSString. Add a test for all the Objective-C at-expression completions. <rdar://problem/11507708&11507668&11507711> llvm-svn: 158533
* [analyzer] RetainCount: don't track objects init'd with a delegateJordan Rose2012-06-152-4/+27
| | | | | | | | | We already didn't track objects that have delegates or callbacks or objects that are passed through void * "context pointers". It's a not-uncommon pattern to release the object in its callback, and so the leak message we give is not very helpful. llvm-svn: 158532
* Warn when a static variable is referenced in a non-static inline function.Jordan Rose2012-06-153-0/+61
| | | | | | | | | | | | | This is explicitly forbidden in C99 6.7.4p3. This is /not/ forbidden in C++, probably because by default file-scope const/constexpr variables have internal linkage, while functions have external linkage. There's also the issue of anonymous namespaces to consider. Nevertheless, there should probably be a similar warning, since the semantics of inlining a function that references a variable with internal linkage do not seem well-defined. <rdar://problem/11577619> llvm-svn: 158531
* Test that -Wauto-var-id fires in value-dependent contexts.Jordan Rose2012-06-151-3/+9
| | | | | | | There was already a test that it did not fire in type-dependent contexts. This was already behaving correctly. llvm-svn: 158530
* Allow SROA to split up an array of vectors into multiple vectors, even when ↵Pete Cooper2012-06-152-3/+112
| | | | | | the vectors are dynamically indexed llvm-svn: 158529
* Some optimizations done by globalopt are safe only for internal linkage, notRafael Espindola2012-06-152-0/+15
| | | | | | | | linkonce linkage. For example, it is not valid to add unnamed_addr. This also fixes a crash in g++.dg/opt/static5.C. llvm-svn: 158528
OpenPOWER on IntegriCloud