Commit Graph

147940 Commits

Author SHA1 Message Date
Ashok Thirumurthi 6ac9d13e61 Provided a variant of ReadCStringFromMemory that supports null terminators of any character width.
This prevents unbounded reads (i.e. reads of GetMaximumSizeOfStringSummary() bytes)
from causing test failures (i.e. due to ptrace EIO or EFAULT on Linux).

Note that ReadCStringFromMemory is marked as deprecated because the loop that calls
ReadMemory does not continue until the string has been completely read.
The expected behavior is to read until until max_bytes or a null terminator.

Note: As discussed on lldb-dev, further testing will be performed with ReadStringFromMemory
before further changes are made for users of ReadCStringFromMemory.

Thanks to Enrico, Matt and Andy for their review feedback.

llvm-svn: 179857
2013-04-19 15:58:38 +00:00
Chad Rosier cc541e8003 [ms-inline asm] Cleanup the dot operator implementation.
llvm-svn: 179856
2013-04-19 15:57:00 +00:00
Alexander Kornienko 78e2587214 Removed leftover directory from clang-format
llvm-svn: 179855
2013-04-19 15:52:36 +00:00
Tim Northover 27ff504653 ARM: Permit "sp" in ARM variant of STREXD instructions
Patch from Mihail Popa

llvm-svn: 179854
2013-04-19 15:44:32 +00:00
Rafael Espindola 3cdeb17ff2 refactor the struct byte swapping to a helper function.
llvm-svn: 179851
2013-04-19 13:45:05 +00:00
Rafael Espindola c6555c1956 Only run the tests in test/Object/ARM if we have ARM support.
llvm-svn: 179850
2013-04-19 12:47:53 +00:00
Benjamin Kramer 0baf8f4279 Attributes: Don't print trailing whitespace on the function attribute comment.
llvm-svn: 179849
2013-04-19 11:43:21 +00:00
Rafael Espindola feef8c2469 Don't read one command past the end.
Thanks to Evgeniy Stepanov for reporting this.

It might be a good idea to add a command iterator abstraction to MachO.h, but
this fixes the bug for now.

llvm-svn: 179848
2013-04-19 11:36:47 +00:00
Tim Northover a155ab2dd2 ARM: permit "sp" in ARM variants of MOVW/MOVT instructions
llvm-svn: 179847
2013-04-19 09:58:09 +00:00
Anton Yartsev 3976656e08 [analyzer] Call proper callback for const regions escaped other then on call.
llvm-svn: 179846
2013-04-19 09:39:51 +00:00
Jakub Staszak 9b59d14fc4 Revert 179826. Tests were worthless.
llvm-svn: 179845
2013-04-19 09:32:30 +00:00
Alexey Samsonov e7ea8cfb49 Fixup for r179843: add missing header
llvm-svn: 179844
2013-04-19 08:49:05 +00:00
Alexey Samsonov dcf0ade114 [ASan] Make init-order checker allow access to already initialized globals.
This change adds ASan runtime option "strict-init-order" (off by default)
that makes init-order checker bark if global initializer accesses any global from different
translation unit (even if the latter is already initialized). strict init-order checking
doesn't play well with, e.g. LLVM registration machineries, and causes issue 
https://code.google.com/p/address-sanitizer/issues/detail?id=178.

llvm-svn: 179843
2013-04-19 08:35:16 +00:00
Sean Callanan 443427357f Removed 2800+ lines of code that no longer do anything
now that the IR interpreter and the JIT share the same
materialization codepaths.

llvm-svn: 179842
2013-04-19 08:14:32 +00:00
Alexey Samsonov 6021e94774 [TSan] Allocate fd table in user heap instead of using internal allocator. We need this to catch races on fds.
llvm-svn: 179841
2013-04-19 08:04:46 +00:00
Eric Christopher 0e89ade8ff Revert "PR14606: debug info imported_module support"
This reverts commit r179836 as it seems to have caused test failures.

llvm-svn: 179840
2013-04-19 07:47:16 +00:00
Eric Christopher 3669c3c603 Revert "PR14606: Debug info for using directives/DW_TAG_imported_module"
This reverts commit r179837 as it seems to be causing test failures.

llvm-svn: 179839
2013-04-19 07:46:36 +00:00
Sean Callanan 3dbf346ef3 Optimized the way breakpoint conditions are evaluated.
Previously, the options for a breakopint or its
locations stored only the text of the breakpoint
condition (ironically, they used ClangUserExpression
as a glorified std::string) and, each time the condition
had to be evaluated in the StopInfo code, the expression
parser would be invoked via a static method to parse and
then execute the expression.

I made several changes here:

  - Each breakpoint location now has its own
    ClangUserExpressionSP containing a version of
    the breakpoint expression compiled for that exact
    location.

  - Whenever the breakpoint is hit, the breakpoint
    condition expression is simply re-run to determine
    whether to stop.

  - If the process changes (e.g., it's re-run) or
    the source code of the expression changes (we use
    a hash so as to avoid doing string comparisons)
    the ClangUserExpressionSP is re-generated.

This should improve performance of breakpoint
conditions significantly, and takes advantage of
the recent expression re-use work.

llvm-svn: 179838
2013-04-19 07:09:15 +00:00
David Blaikie cf5e5bade1 PR14606: Debug info for using directives/DW_TAG_imported_module
More changes later for using declarations/DW_TAG_imported_declaration.

llvm-svn: 179837
2013-04-19 07:04:02 +00:00
David Blaikie 88564f3cf7 PR14606: debug info imported_module support
Adding another CU-wide list, in this case of imported_modules (since they
should be relatively rare, it seemed better to add a list where each element
had a "context" value, rather than add a (usually empty) list to every scope).
This takes care of DW_TAG_imported_module, but to fully address PR14606 we'll
need to expand this to cover DW_TAG_imported_declaration too.

llvm-svn: 179836
2013-04-19 06:57:04 +00:00
David Blaikie bfa5274df5 Give CGDebugInfo::getContextDescriptor a more specific return type
Not that the DI* hierarchy is terribly type safe, but this makes the contract a
little clearer I think.

llvm-svn: 179835
2013-04-19 06:56:38 +00:00
Lang Hames 77bf0afcc8 Add support for index resources (for a SlotIndex) to be relinquished.
When the SlotIndexes pass was introduced it was intended to support insertion
of code during register allocation. Removal of code was a minor consideration
(and raised the question of what to do about dangling SlotIndex objects pointing
to the erased index), so I opted to keep all indexes around indefinitely and
simply null out those that weren't being used.

Nowadays people are moving more code around (e.g. via HandleMove), which means
more zombie indexes. I want to start killing off indexes when we're done with
them to reclaim the resources they use up.
 

llvm-svn: 179834
2013-04-19 04:31:49 +00:00
Michael Liao e28fab22c4 Use 'array_lengthof' as possible to avoid magic numbers
llvm-svn: 179833
2013-04-19 04:03:37 +00:00
Sean Callanan 7d71e5677e Reverted 179810, which breaks the expression
parser.

llvm-svn: 179832
2013-04-19 02:42:00 +00:00
Jason Molenda 17f9e8b3ce Change TargetList::CreateTarget to realpath the c-string filename of the
executable -- if I do "(lldb) file ~/bin/exe" that tilde expansion needs
to take place here.

llvm-svn: 179831
2013-04-19 02:36:24 +00:00
Tom Stellard 9d10c4ce86 R600: Add pattern for the BFI_INT instruction
llvm-svn: 179830
2013-04-19 02:11:06 +00:00
Tom Stellard ea977bc0e3 R600/SI: Use InstFlag for VOP3 modifier operands
InstFlag has a default value of 0 and will simplify the VOP3 patterns.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 179829
2013-04-19 02:11:00 +00:00
Tom Stellard 5a6b0d828b R600: Reorganize lit tests and document how they should be organized
llvm-svn: 179828
2013-04-19 02:10:53 +00:00
Sean Callanan bb9945f447 Made IRMemoryMap::FindSpace a little cleverer,
and made attempts to allocate memory in the process
fall back to FindSpace and just allocate memory on
the host (but with real-looking pointers, hence
FindSpace) if the process doesn't allow allocation.
This allows expressions to run on processes that don't
support allocation, like core files.

This introduces an extremely rare potential problem:
If all of the following are true:

- The Process doesn't support allocation;

- the user writes an expression that refers to an
  address that does not yet map to anything, or is
  dynamically generated (e.g., the result of calling
  a function); and

- the randomly-selected address for the static data
  for that specific expression runs into the
  address the user was expecting to work with;

then dereferencing the pointer later results
in the user seeing something unexpected.  This is
unlikely but possible; as a future piece of work,
we should have processes be able to hint to the
expression parser where it can allocate temporary data
of this kind.

llvm-svn: 179827
2013-04-19 01:51:24 +00:00
Jakub Staszak 99317268e2 Keep coding stanard. Don't use "else if" after "return".
llvm-svn: 179826
2013-04-19 01:18:04 +00:00
Jakub Staszak 2c1daf75b9 Don't run expensive -O2 and -O3 in tests.
llvm-svn: 179825
2013-04-19 01:10:45 +00:00
Eli Bendersky 6084f45f38 Add some more stats for fast isel vs. SelectionDAG, w.r.t lowering function
arguments in entry BBs.

llvm-svn: 179824
2013-04-19 01:04:40 +00:00
Argyrios Kyrtzidis 982934e7d4 [libclang] Fix copy-paste error in comment.
llvm-svn: 179823
2013-04-19 00:51:52 +00:00
Jason Molenda 44edbf1310 Remove an unneeded local var, a missing return statement in kernel search code, thanks to Greg Clayton for finding these.
llvm-svn: 179822
2013-04-19 00:50:28 +00:00
Filipe Cabecinhas 24cf86f83e Split Linux-specific and OS X specific stuff. Add include_directories
Only add the -std=c++11 flag when needed, don't touch current flags.

llvm-svn: 179821
2013-04-19 00:19:04 +00:00
Bill Wendling df9bf40c56 Use an enum instead of magic constants to improve readability.
llvm-svn: 179820
2013-04-19 00:05:59 +00:00
Argyrios Kyrtzidis 23814e4f49 [libclang] Introduce clang_Cursor_isVariadic, which returns non-zero if the given cursor is a variadic function or method.
rdar://13667150

llvm-svn: 179819
2013-04-18 23:53:05 +00:00
Fariborz Jahanian d5d6f3d5a2 Objective-C++: Enable passing of modern C++11 style
initialized temporaries to objc++ methods. 
// rdar://12788429

llvm-svn: 179818
2013-04-18 23:43:21 +00:00
Bill Wendling 3b21eb69fb Implement a better fix for PR15185.
If the return type is a pointer and the call returns an integer, then do the
inttoptr convertions. And vice versa.

llvm-svn: 179817
2013-04-18 23:34:17 +00:00
Argyrios Kyrtzidis 9d9bc01e42 [libclang] Introduce clang_Cursor_getObjCDeclQualifiers, to query for 'ObjC Qualifiers' written next to the return and
parameter types in an ObjC method declarations.

rdar://13676977

llvm-svn: 179816
2013-04-18 23:29:12 +00:00
Greg Clayton febe8e33d7 More fallout unique_ptr changes for from http://lab.llvm.org:8011/builders/lldb-x86_64-linux/builds/3565.
llvm-svn: 179815
2013-04-18 23:25:55 +00:00
Bill Wendling 99bce5fe08 Relax this assert. It may not hold in all cases.
llvm-svn: 179814
2013-04-18 23:16:46 +00:00
Chad Rosier f8fb2bc2f3 [ms-inline asm] Apply the condition code mnemonic aliases to both the Intel and
AT&T dialect.  Test case for r179804 as well.
rdar://13674398 and PR13340.

llvm-svn: 179813
2013-04-18 23:16:12 +00:00
Chad Rosier 274800025a Fix typo.
llvm-svn: 179811
2013-04-18 23:12:05 +00:00
Greg Clayton d850685e01 Try and unblock issue found in: http://lab.llvm.org:8011/builders/lldb-x86_64-linux/builds/3564
llvm-svn: 179810
2013-04-18 22:59:51 +00:00
Bill Wendling 1a61b7b21f Assert if we're trying to generate a null compact unwind entry.
llvm-svn: 179809
2013-04-18 22:56:05 +00:00
Bill Wendling 0c3fad7efc Set the compact unwind encoding to 'requires EH DWARF' if we cannot generate a CU encoding.
llvm-svn: 179808
2013-04-18 22:55:29 +00:00
Hal Finkel b12da6be75 Disable PPC comparison optimization by default
This seems to cause a stage-2 LLVM compile failure (by crashing TableGen); do
I'm disabling this for now.

llvm-svn: 179807
2013-04-18 22:54:25 +00:00
Benjamin Kramer 1e4a886c28 Add comment to describe cleverness.
llvm-svn: 179806
2013-04-18 22:49:48 +00:00
Greg Clayton 7b0992d9cd After discussing with Chris Lattner, we require C++11, so lets get rid of the macros and just use C++11.
llvm-svn: 179805
2013-04-18 22:45:39 +00:00