summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* -Warc-repeated-use-of-weak: check ivars and variables as well.Jordan Rose2012-09-289-101/+253
| | | | | | | | | | Like properties, loading from a weak ivar twice in the same function can give you inconsistent results if the object is deallocated between the two loads. It is safer to assign to a strong local variable and use that. Second half of <rdar://problem/12280249>. llvm-svn: 164855
* Add a warning (off by default) for repeated use of the same weak property.Jordan Rose2012-09-289-1/+679
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivating example: if (self.weakProp) use(self.weakProp); As with any non-atomic test-then-use, it is possible a weak property to be non-nil at the 'if', but be deallocated by the time it is used. The correct way to write this example is as follows: id tmp = self.weakProp; if (tmp) use(tmp); The warning is controlled by -Warc-repeated-use-of-receiver, and uses the property name and base to determine if the same property on the same object is being accessed multiple times. In cases where the base is more complicated than just a single Decl (e.g. 'foo.bar.weakProp'), it picks a Decl for some degree of uniquing and reports the problem under a subflag, -Warc-maybe-repeated-use-of-receiver. This gives a way to tune the aggressiveness of the warning for a particular project. The warning is not on by default because it is not flow-sensitive and thus may have a higher-than-acceptable rate of false positives, though it is less noisy than -Wreceiver-is-weak. On the other hand, it will not warn about some cases that may be legitimate issues that -Wreceiver-is-weak will catch, and it does not attempt to reason about methods returning weak values. Even though this is not a real "analysis-based" check I've put the bug emission code in AnalysisBasedWarnings for two reasons: (1) to run on every kind of code body (function, method, block, or lambda), and (2) to suggest that it may be enhanced by flow-sensitive analysis in the future. The second (smaller) half of this work is to extend it to weak locals and weak ivars. This should use most of the same infrastructure. Part of <rdar://problem/12280249> llvm-svn: 164854
* Add basic support for adding !tbaa.struct metadata on llvm.memcpy calls forDan Gohman2012-09-286-1/+102
| | | | | | struct assignment. llvm-svn: 164853
* <rdar://problem/12398225>Greg Clayton2012-09-282-42/+46
| | | | | | Improve performance of StringExtractor::GetHexS8(). llvm-svn: 164852
* When processing an InitListExpr and skipping the initialization of an invalidRichard Smith2012-09-282-0/+8
| | | | | | | record, skip at least one element from the InitListExpr to avoid an infinite loop if we're initializing an array of unknown bound. llvm-svn: 164851
* GlobalDCE should be run at -O2 / -Os to eliminate unused dtor, etc. ↵Evan Cheng2012-09-281-4/+3
| | | | | | rdar://9142819 llvm-svn: 164850
* MIPS DSP: add operands to make sure instruction strings are being matched.Akira Hatanaka2012-09-282-23/+23
| | | | llvm-svn: 164849
* Remove unused methods.Bill Wendling2012-09-281-7/+1
| | | | llvm-svn: 164848
* docs: dedent list on index.rstSean Silva2012-09-281-23/+23
| | | | | | | | | In reStructuredText, indented blocks denote block quotes [1]. This list is not a block quote. [1]. http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#block-quotes llvm-svn: 164847
* Fix -Wcovered-switch-default warning.Michael J. Spencer2012-09-281-2/+0
| | | | llvm-svn: 164846
* MIPS DSP: other miscellaneous instructions.Akira Hatanaka2012-09-284-0/+207
| | | | llvm-svn: 164845
* Fixed a bug where if something went wrong whileSean Callanan2012-09-281-0/+4
| | | | | | | | constructing the ObjCInterfaceDecl for an ISA, we'd continue and try to use that Decl anyway, possibly causing a crash. llvm-svn: 164844
* Update template type diffing to handle qualifiers. Differing qualifiers willRichard Trieu2012-09-283-0/+341
| | | | | | now be printed with highlighting. llvm-svn: 164843
* Testcase for r164835Manman Ren2012-09-281-0/+28
| | | | llvm-svn: 164842
* Allow __builtin_bswap32/64 in constant expressions, like gcc does. Patch by ↵Richard Smith2012-09-283-0/+13
| | | | | | Tijl Coosemans! llvm-svn: 164841
* MIPS DSP: ADDUH.QB instruction sub-class.Akira Hatanaka2012-09-283-0/+312
| | | | llvm-svn: 164840
* Clean up part of template type diffing. Moved repeated code to separateRichard Trieu2012-09-281-32/+30
| | | | | | functions. Reworked one of the conditionals. No functional changes. llvm-svn: 164839
* Modern objcective-C translator. When doing rewriting, Do not Fariborz Jahanian2012-09-283-2/+5
| | | | | | | use the integrated pre-processor, preprocess in objective-c++ mode. // rdar://12189793. llvm-svn: 164836
* X86: when replacing SUB with TEST in ISelDAGToDAG, only replace uses of theManman Ren2012-09-281-5/+28
| | | | | | | | second output of SUB with first output of TEST. PR13966 llvm-svn: 164835
* Improve the diagnostic messages on dynamic_cast.Howard Hinnant2012-09-281-6/+6
| | | | llvm-svn: 164833
* Due to a mistake on my own part, I need to burn some version numbers. This ↵Howard Hinnant2012-09-281-1/+1
| | | | | | does not impact any of the implementation of libc++, and does not impact the ABI in any way. llvm-svn: 164832
* Removing dependency on third party library for Intel JIT event support.Andrew Kaylor2012-09-2815-376/+1285
| | | | | | Patch committed on behalf of Kirill Uhanov llvm-svn: 164831
* [analyzer] Handle inlined constructors for rvalue temporaries correctly.Jordan Rose2012-09-283-7/+22
| | | | | | | | | | | | | | | Previously the analyzer treated all inlined constructors like lvalues, setting the value of the CXXConstructExpr to the newly-constructed region. However, some CXXConstructExprs behave like rvalues -- in particular, the implicit copy constructor into a pass-by-value argument. In this case, we want only the /contents/ of a temporary object to be passed, so that we can use the same "copy each argument into the parameter region" algorithm that we use for scalar arguments. This may change when we start modeling destructors of temporaries, but for now this is the last part of <rdar://problem/12137950>. llvm-svn: 164830
* [analyzer] Create a temp region when a method is called on a struct rvalue.Jordan Rose2012-09-282-22/+40
| | | | | | | | | | | | | An rvalue has no address, but calling a C++ member function requires a 'this' pointer. This commit makes the analyzer create a temporary region in which to store the struct rvalue and use as a 'this' pointer whenever a member function is called on an rvalue, which is essentially what CodeGen does. More of <rdar://problem/12137950>. The last part is tracking down the C++ FIXME in array-struct-region.cpp. llvm-svn: 164829
* [analyzer] Create a temporary region for rvalue structs when accessing fieldsJordan Rose2012-09-283-13/+20
| | | | | | | | | | | | | | | | | Struct rvalues are represented in the analyzer by CompoundVals, LazyCompoundVals, or plain ConjuredSymbols -- none of which have associated regions. If the entire structure is going to persist, this is not a problem -- either the rvalue will be assigned to an existing region, or a MaterializeTemporaryExpr will be present to create a temporary region. However, if we just need a field from the struct, we need to create the temporary region ourselves. This is inspired by the way CodeGen handles calls to temporaries; support for that in the analyzer is coming next. Part of <rdar://problem/12137950> llvm-svn: 164828
* Avoid malloc thrashing in the uninitialized value analysis.Benjamin Kramer2012-09-281-11/+5
| | | | | | | - The size of the packed vector is often small, save mallocs using SmallBitVector. - Copying SmallBitVectors is also cheap, remove a level of indirection. llvm-svn: 164827
* PackedVector: Make the BitVector implementation configurable.Benjamin Kramer2012-09-281-13/+14
| | | | llvm-svn: 164826
* Fix a bug introduced in an earlier revision: actually return the StopReason, ↵Filipe Cabecinhas2012-09-281-1/+1
| | | | | | when we have a StopInfo object. llvm-svn: 164825
* Set Diag.ErrorOccurred even if a DiagnosticConsumer does not want it inDaniel Jasper2012-09-281-3/+2
| | | | | | | | | | | diagnostic count. If a DiagnosticConsumer sub-class overwrites IncludeInDiagnosticCounts, this should change diagnostic counts. However, it currently also influences Diag.ErrorOccurred, which in turn influences the behavior of parsing and semantic analysis (in a way that can make it crash). llvm-svn: 164824
* Provide malloc-free sentinels for the SparseBitVector internals.Benjamin Kramer2012-09-281-0/+16
| | | | llvm-svn: 164823
* Replace the use of strncpy() and sprintf() with std::string and LLVM streams.Dmitri Gribenko2012-09-281-4/+7
| | | | | | Patch by Martinez, Javier E. llvm-svn: 164822
* [ASan] Fix unit test headers. Add an option to change substitute ↵Alexey Samsonov2012-09-285-7/+13
| | | | | | asan_test_config.h file llvm-svn: 164821
* [ASan] use llvm-symbolizer (in offline mode) in ASan output tests on LinuxAlexey Samsonov2012-09-283-0/+13
| | | | llvm-svn: 164819
* CorrelatedPropagation: BasicBlock::removePredecessor can simplify PHI nodes. ↵Benjamin Kramer2012-09-282-0/+30
| | | | | | | | If the it's the condition of a SwitchInst, reload it. Fixes PR13972. llvm-svn: 164818
* Make backtraces work again with both the configure and cmake build.Benjamin Kramer2012-09-283-1/+9
| | | | llvm-svn: 164817
* [asan] Change defaults for Android target.Evgeniy Stepanov2012-09-281-2/+10
| | | | | | This way building without -DASAN_* in CFLAGS produces working binaries. llvm-svn: 164816
* GlobalOpt: non-constexpr bitcasts or GEPs can occur even if the global value ↵Benjamin Kramer2012-09-282-2/+27
| | | | | | | | is only stored once. Fixes PR13968. llvm-svn: 164815
* Surprisingly, we missed a trivial case here. Fix that!Nick Lewycky2012-09-282-0/+12
| | | | llvm-svn: 164814
* Remove a LLVM_DELETED_FUNCTION from destructor to fix -std=c++11 build on ↵Craig Topper2012-09-281-1/+3
| | | | | | gcc 4.7. llvm-svn: 164813
* Recognize the eax/ebp/eip etc version of x86 registerJason Molenda2012-09-281-2/+10
| | | | | | | names in addition to the rax/rbp/rip register names when deciding whether a register is volatile or not. llvm-svn: 164812
* 1. Add load/store words from the stackReed Kotler2012-09-283-34/+86
| | | | | | | | | 2. As part of this, added assembly format FEXT_RI16_SP_explicit_ins and moved other lines for FEXT_RI16 formats to be in the right place in the code. 3. Added mayLoad and mayStore assignements for the load/store instructions added and for ones already there that did not have this assignment. 4. Another patch will deal with the problem of load/store byte/halfword to the stack. This is a particular Mips16 problem. llvm-svn: 164811
* Fix the extra space char being emitted in this message when breakpoints ↵Jason Molenda2012-09-281-1/+1
| | | | | | | | resolve - 1 location added to breakpoint 2 llvm-svn: 164810
* Two changes: 1) I still didn't have the ABI correct to match the gcc-4.2 ↵Howard Hinnant2012-09-282-10/+48
| | | | | | std::string under the exception classes. I think the changes to stdexcept.cpp have got that down now. 2) On Apple platforms I'm seeing visibility bugs in applications with respect to type_info's being hidden. This is causing dynamic_cast to malfunction because there are multiple type_info's running around for one type within an application, making dynamic_cast believe that one type is actually multiple types. As a stop gap measure I'm trying to detect this error, print out an error message, but continue with the most likely desired result. This is all under __APPLE__. This behavior can be expanded to other platforms if desired. llvm-svn: 164809
* Improved the runtime reading to also get dataSean Callanan2012-09-273-37/+65
| | | | | | | out of the metaclass, so as to enumerate class methods for an object. llvm-svn: 164808
* Remove <def,read-undef> flags from partial redefinitions.Jakob Stoklund Olesen2012-09-271-0/+6
| | | | | | | | | The new coalescer can turn a full virtual register definition into a partial redef by merging another value into an unused vector lane. Make sure to clear the <read-undef> flag on such defs. llvm-svn: 164807
* Wrapped up the work I am going to do for now for the "add-dsym" or "target ↵Greg Clayton2012-09-2712-222/+550
| | | | | | | | | | | | | | | | | | | | symfile add" command. We can now do: Specify a path to a debug symbols file: (lldb) add-dsym <path-to-dsym> Go and download the dSYM file for the "libunc.dylib" module in your target: (lldb) add-dsym --shlib libunc.dylib Go and download the dSYM given a UUID: (lldb) add-dsym --uuid <UUID> Go and download the dSYM file for the current frame: (lldb) add-dsym --frame llvm-svn: 164806
* Fix more crlf issues.Micah Villmow2012-09-271-34/+34
| | | | llvm-svn: 164805
* Fix a regression from r164656.Eli Friedman2012-09-272-2/+16
| | | | llvm-svn: 164804
* [analyzer] Address Jordan's code review for r164790.Anna Zaks2012-09-272-20/+20
| | | | llvm-svn: 164803
* [analyzer] IvarInvalidation: track synthesized ivars and allow escapeAnna Zaks2012-09-272-31/+77
| | | | | | through property getters. llvm-svn: 164802
OpenPOWER on IntegriCloud