Commit Graph

119753 Commits

Author SHA1 Message Date
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
Andrew Trick 100af0adf7 Minor postra scheduler cleanup. It could result in more precise antidependence latency on ARM in exceedingly rare cases.
llvm-svn: 147594
2012-01-05 02:52:11 +00:00
Bill Wendling ac27f0c830 Replace the uint64_t -> double convertion algorithm with one that's more efficient.
This small bit of ASM code is sufficient to do what the old algorithm did:

     movq       %rax,  %xmm0
     punpckldq  (c0),  %xmm0  // c0: (uint4){ 0x43300000U, 0x45300000U, 0U, 0U }
     subpd      (c1),  %xmm0  // c1: (double2){ 0x1.0p52, 0x1.0p52 * 0x1.0p32 }
   #ifdef __SSE3__
     haddpd   %xmm0, %xmm0          
   #else
     pshufd   $0x4e, %xmm0, %xmm1 
     addpd    %xmm1, %xmm0
   #endif

It's arguably faster. One caveat, the 'haddpd' instruction isn't very fast on
all processors.
<rdar://problem/7719814>

llvm-svn: 147593
2012-01-05 02:13:20 +00:00
Sean Callanan c1b312a5c3 Fixed a potential hang while trying to execute
a function in the inferior.

llvm-svn: 147592
2012-01-05 02:00:14 +00:00
Chad Rosier 8fca6b268b [driver] Add support for passing -lazy_framework/-lazy_library to the linker.
rdar://10630328

llvm-svn: 147591
2012-01-05 01:56:11 +00:00
Johnny Chen cdc21d4c85 Add comment explaining the default constructor (ArchSpec) used in CreateTarget().
llvm-svn: 147590
2012-01-05 01:26:01 +00:00
Eli Friedman 918a6b05f4 Change casting slightly to avoid warnings about casting away const.
llvm-svn: 147589
2012-01-05 01:16:29 +00:00
Douglas Gregor 5c193c7ed6 When we're performing name lookup for a tag, we still allow ourselves
to see hidden declarations because every tag lookup is effectively a
redeclaration lookup. For example, image that

  struct foo;

is declared in a submodule that is known but hasn't been imported. If
someone later writes

  struct foo *foo_p;

then "struct foo" is either a reference or a redeclaration. To keep
the redeclaration chains sound, we treat it like a redeclaration for
name-lookup purposes.

llvm-svn: 147588
2012-01-05 01:11:47 +00:00
Sean Callanan 31a8d051dd Fixed a dangling pointer bug associated with the
result variable on a "finish" statement.  The
ownership of the result value was not being properly
assigned to the newly-created persistent result
variable; now it is.

llvm-svn: 147587
2012-01-05 01:11:09 +00:00