Commit Graph

119611 Commits

Author SHA1 Message Date
Kostya Serebryany 2b08718bba [asan] move more stuff to OS-specific files
llvm-svn: 147647
2012-01-06 02:12:25 +00:00
Greg Clayton 4017fa399b <rdar://problem/10652336>
Fixed a crasher when trying to load an expression prefix file:

% touch /tmp/carp.txt
% xcrun lldb
(lldb) settings set target.expr-prefix /tmp/carp.txt
Segmentation fault

llvm-svn: 147646
2012-01-06 02:01:06 +00:00
Anna Zaks 8e2fc5c5e9 [analyzer] Update the docs to reflect that gcc is not the only default
compiler option.

llvm-svn: 147645
2012-01-06 01:54:08 +00:00
Anna Zaks 1d39152059 [analyzer] scan-build: If we are on MacOS, use clang as the default
compiler.

llvm-svn: 147644
2012-01-06 01:54:05 +00:00
Anna Zaks 3a7f73d996 [analyzer] Skip --serialize-diagnostic when running scan-build.
Otherwise, the analyzer will try to analyze the serialized diagnostic
file as if it were a source file.

llvm-svn: 147643
2012-01-06 01:54:02 +00:00
Richard Smith d069d2f6ac Tweak to r147599 for PR10828: Move the check from the parser into sema, and use
the Semantic Powers to only warn on class types (or dependent types), where the
constructor or destructor could do something interesting.

llvm-svn: 147642
2012-01-06 01:31:20 +00:00
Eli Friedman 5c5e3b7e84 Minor refactoring of sentinel warning on blocks. Add a test for this warning.
llvm-svn: 147641
2012-01-06 01:23:10 +00:00
Greg Clayton 1a0be3b1f2 <rdar://problem/10649734>
Fixed an issue where the python interpreter could deadlock LLDB.

llvm-svn: 147640
2012-01-06 00:47:38 +00:00
Johnny Chen 39c6d0f9ae http://llvm.org/bugs/show_bug.cgi?id=11619
Allow creating SBData values from arrays or primitives in Python

Patch submitted by Enrico Granata.

llvm-svn: 147639
2012-01-06 00:46:12 +00:00
Greg Clayton 650e3b014e <rdar://problem/10647191>
Removed an extra call to close that was causing problems and also
now use the Host::File class to open the file.

llvm-svn: 147638
2012-01-06 00:43:54 +00:00
Johnny Chen b49440fa92 http://llvm.org/bugs/show_bug.cgi?id=11618
lldb::SBValue::AddressOf does not work on dereferenced registers in synthetic children provider

Patch submitted by Enrico Granata.

llvm-svn: 147637
2012-01-06 00:35:38 +00:00
Fariborz Jahanian 17eaf4089d objc++: sythesize a helper function to be used
for copying atomic properties of c++ objects
with non-trivial copy assignment in setters/getters.
Not yet used. // rdar://6137845

llvm-svn: 147636
2012-01-06 00:29:35 +00:00
Argyrios Kyrtzidis 7ce752610f Fix a memory leak of PragmaNamespaces, rdar://10611796.
llvm-svn: 147635
2012-01-06 00:22:09 +00:00
Greg Clayton ae920b69f5 We finalized on the new .apple_types accelerator table format where we don't
emit fully qualified names, so now we make sure the DW_TAG values match and
still lookup using the basename.

llvm-svn: 147634
2012-01-06 00:17:16 +00:00
Johnny Chen e7526b7daf http://llvm.org/bugs/show_bug.cgi?id=11715
comma at end of enumerator list

llvm-svn: 147633
2012-01-06 00:05:01 +00:00
Rafael Espindola a0fbaeebe6 Fix build on minix. Patch by Ben Gras!
llvm-svn: 147632
2012-01-05 23:59:42 +00:00
Eli Friedman b1bc368ca7 Address Richard's review comments on r147561 (Evaluate support for address-of-label differences).
llvm-svn: 147631
2012-01-05 23:59:40 +00:00
Dan Gohman 5ab9c0a927 Fix SpeculativelyExecuteBB to either speculate all or none of the phis
present in the bottom of the CFG triangle, as the transformation isn't
ever valuable if the branch can't be eliminated.

Also, unify some heuristics between SimplifyCFG's multiple
if-converters, for consistency.

This fixes rdar://10627242.

llvm-svn: 147630
2012-01-05 23:58:56 +00:00
Johnny Chen 3e8cd274e8 Fix indentation.
llvm-svn: 147629
2012-01-05 23:51:37 +00:00
Kostya Serebryany 3b7fb102c4 [asan] use dl_iterate_phdr for pre-symbolization on linux instead of parsing /proc/self/maps
llvm-svn: 147628
2012-01-05 23:50:34 +00:00
Johnny Chen 2a189134b9 Add back the file I wrongly deleted in r147613.
llvm-svn: 147627
2012-01-05 23:50:14 +00:00
Douglas Gregor 52261fd2f7 Always allocate an extra 8 bytes for a deserialized declaration, since
some code in Clang expects 8-byte alignment of declarations.

llvm-svn: 147626
2012-01-05 23:49:36 +00:00
Eli Friedman 55fa49f32d PR11705, part 2: globalopt shouldn't put inttoptr/ptrtoint operations into global initializers if there's an implied extension or truncation.
llvm-svn: 147625
2012-01-05 23:03:32 +00:00
Rafael Espindola 23f8d64b58 Link symbols with different visibilities according to the rules in the
System V Application Binary Interface. This lets us use
-fvisibility-inlines-hidden with LTO.
Fixes PR11697.

llvm-svn: 147624
2012-01-05 23:02:01 +00:00
Dan Gohman 5267211899 Revert r56315. When the instruction to speculate is a load, this
code can incorrectly move the load across a store. This never
happens in practice today, but only because the current
heuristics accidentally preclude it.

llvm-svn: 147623
2012-01-05 22:54:35 +00:00
Ted Kremenek 0c2c90b1ad After further discussion, rename attribute 'objc_disable_automatic_synthesis' to 'objc_requires_property_definitions'.
llvm-svn: 147622
2012-01-05 22:47:47 +00:00
Sean Callanan 3c88eae154 Fixed a problem in our local Clang's method for
performing Objective-C instance variable lookup.
Previously, it only completed the derived class
that was the beginning of the search.  Now, as
it walks up the superclass chain looking for the
ivar, it completes each superclass in turn.

Also added a testcase covering this issue.

llvm-svn: 147621
2012-01-05 22:35:40 +00:00
Eli Friedman de30e523b4 Tweak the fix to PR8977: an empty expression-list represents value initialization, not default initialization. Fixes PR11712.
llvm-svn: 147620
2012-01-05 22:34:08 +00:00
Douglas Gregor b3163e574e Don't seed the ASTWriter's declaration -> ID mapping with the IDs of
each deserialized declaration, since that information is already
available in each declaration.

llvm-svn: 147619
2012-01-05 22:33:30 +00:00
Benjamin Kramer 69eab4e0af Kill ObjectCodeEmitter and BinaryObject, they were unused and superseded by MC.
llvm-svn: 147618
2012-01-05 22:31:37 +00:00
Douglas Gregor 64af53c364 When we deserialize a declaration from a module file, allocate extra
storage for the global declaration ID. Declarations that are parsed
(rather than deserialized) are unaffected, so the number of
declarations that pay this cost tends to be relatively small (since
relatively few declarations are ever deserialized).

This replaces a largish DenseMap within the AST reader. It's not
strictly a win in terms of memory use---not every declaration was
added to that DenseMap in the first place---but it's cleaner to have
this information available for every deserialized declaration, so that
future clients can rely on it.

llvm-svn: 147617
2012-01-05 22:27:05 +00:00
Nick Lewycky f740db31e2 SCCCaptured is trivially false on entry to this loop and not modified inside it.
Eliminate the dead test for it on each loop iteration. No functionality change.

llvm-svn: 147616
2012-01-05 22:21:45 +00:00
Rafael Espindola afcf571ef9 Remove the old ELF writer.
llvm-svn: 147615
2012-01-05 22:07:43 +00:00
Douglas Gregor 72172e9009 When creating declarations that are deserialized from an module file,
go through a central allocation routine
Decl::AllocateDeserializedDecl(). No actual functionality change (yet).

llvm-svn: 147614
2012-01-05 21:55:30 +00:00
Johnny Chen 9ed5b49c45 Fix incomplete commit of http://llvm.org/viewvc/llvm-project?rev=147609&view=rev:
This patch combines common code from Linux and FreeBSD into
a new POSIX platform.  It also contains fixes for 64bit FreeBSD.

The patch is based on changes by Mark Peek <mp@FreeBSD.org> and
"K. Macy" <kmacy@freebsd.org> in their github repo located at
https://github.com/fbsd/lldb.

llvm-svn: 147613
2012-01-05 21:48:15 +00:00
Argyrios Kyrtzidis 9afd449e8f When loading an AST file, set SourceManager::MainFileID to the main file of the AST file,
as suggested by Tom Honermann.

llvm-svn: 147612
2012-01-05 21:36:25 +00:00
Danil Malyshev 7e325789af A small re-factored JIT/MCJIT::getPointerToNamedFunction(), so it could be called with the base class.
llvm-svn: 147610
2012-01-05 21:16:14 +00:00
Johnny Chen 30213ffc28 This patch combines common code from Linux and FreeBSD into
a new POSIX platform.  It also contains fixes for 64bit FreeBSD.

The patch is based on changes by Mark Peek <mp@FreeBSD.org> and
"K. Macy" <kmacy@freebsd.org> in their github repo located at
https://github.com/fbsd/lldb.

llvm-svn: 147609
2012-01-05 19:17:38 +00:00
Sebastian Pop 99ab273a77 revert r147542 after comments from Joerg Sonnenberger
llvm-svn: 147608
2012-01-05 18:28:46 +00:00
Chris Lattner 8ff6bc924f allow clients of SmallSet to specify their own comparison function for the set.
Patch by Stepan Dyatkovskiy!

llvm-svn: 147607
2012-01-05 17:35:07 +00:00
Chandler Carruth eab5029964 Remove an unused variable.
llvm-svn: 147605
2012-01-05 11:25:47 +00:00
Chandler Carruth e041a30bb9 Prevent a DAGCombine from firing where there are two uses of
a combined-away node and the result of the combine isn't substantially
smaller than the input, it's just canonicalized. This is the first part
of a significant (7%) performance gain for Snappy's hot decompression
loop.

llvm-svn: 147604
2012-01-05 11:05:55 +00:00
Chandler Carruth 6bc151f5d4 Cleanup and FileCheck-ize a test.
llvm-svn: 147603
2012-01-05 11:05:47 +00:00
Craig Topper 29b0737452 Mark scalar FMA4 instructions as ignoring the VEX.L bit.
llvm-svn: 147602
2012-01-05 08:56:10 +00:00
Victor Umansky 9255b6d9fe Peephole optimization of ptest-conditioned branch in X86 arch. Performs instruction combining of sequences generated by ptestz/ptestc intrinsics to ptest+jcc pair for SSE and AVX.
Testing: passed 'make check' including LIT tests for all sequences being handled (both SSE and AVX)

Reviewers: Evan Cheng, David Blaikie, Bruno Lopes, Elena Demikhovsky, Chad Rosier, Anton Korobeynikov
llvm-svn: 147601
2012-01-05 08:46:19 +00:00
Eli Bendersky 88676cff61 test commit (verifyiing commit access)
llvm-svn: 147600
2012-01-05 08:18:41 +00:00
Richard Smith 69f90dce49 PR10828: Produce a warning when a no-arguments function is declared in block
scope, when no other indication is provided that the user intended to declare a
function rather than a variable.

Remove some false positives from the existing 'parentheses disambiguated as a
function' warning by suppressing it when the declaration is marked as 'typedef'
or 'extern'.

Add a new warning group -Wvexing-parse containing both of these warnings.

The new warning is enabled by default; despite a number of false positives (and
one bug) in clang's test-suite, I have only found genuine bugs with it when
running it over a significant quantity of real C++ code.

llvm-svn: 147599
2012-01-05 04:12:21 +00:00
Greg Clayton 0f6fb756a1 Bumped Xcode project versions for lldb-101 and debugserver-160.
llvm-svn: 147597
2012-01-05 04:00:49 +00:00
Greg Clayton e38a5edd9e Added code in the Host layer that can report system log messages
so that we don't have "fprintf (stderr, ...)" calls sprinkled everywhere.
Changed all needed locations over to using this.

For non-darwin, we log to stderr only. On darwin, we log to stderr _and_
to ASL (Apple System Log facility). This will allow GUI apps to have a place
for these error and warning messages to go, and also allows the command line
apps to log directly to the terminal.

llvm-svn: 147596
2012-01-05 03:57:59 +00:00
Eli Friedman 71c8055f8e More lambda work. Tweak the Sema interface slightly. Start adding the pieces to build the lambda class and its call operator. Create an actual scope for the lambda body.
llvm-svn: 147595
2012-01-05 03:35:19 +00:00