Commit Graph

211124 Commits

Author SHA1 Message Date
Ravitheja Addepally 9fcf72ef9b Testcase and fix for bug 24074
Summary:
In bug 24074, the type information is not shown
correctly. This commit  includes the following -
-> Changes for displaying correct type based on
   current lexical scope for the command "image
   lookup -t"
-> The corresponding testcase.

Reviewers: jingham, ovyalov, spyffe, richard.mitton, clayborg

Differential Revision: http://reviews.llvm.org/D12404

llvm-svn: 248366
2015-09-23 07:19:02 +00:00
Bruce Mitchener 77b94d4416 Fix covered-switch-default warning in FormatManager.
Summary:
The default case doesn't need to be here as the switch covers
all possible values. If there's a new "lazy bool" value added
in the future, the compiler would start to warn about the new
case not being covered.

Reviewers: granata.enrico, clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D13084

llvm-svn: 248365
2015-09-23 02:33:30 +00:00
Bruce Mitchener 7fa48ab6ce Fix indentation in ExpressionParser.h.
llvm-svn: 248364
2015-09-23 02:23:02 +00:00
Enrico Granata 9c63f99a13 Allow CompilerType to express a vote on whether oneliner printing should happen
llvm-svn: 248363
2015-09-23 02:04:34 +00:00
Sanjoy Das 2aacc0ecca [SCEV] Introduce ScalarEvolution::getOne and getZero.
Summary:
It is fairly common to call SE->getConstant(Ty, 0) or
SE->getConstant(Ty, 1); this change makes such uses a little bit
briefer.

I've refactored the call sites I could find easily to use getZero /
getOne.

Reviewers: hfinkel, majnemer, reames

Subscribers: sanjoy, llvm-commits

Differential Revision: http://reviews.llvm.org/D12947

llvm-svn: 248362
2015-09-23 01:59:04 +00:00
Davide Italiano a89d178a4f [ELF2] Add ASCII representation of the string table to test.
Requested by: rafael

llvm-svn: 248361
2015-09-23 01:56:26 +00:00
Davide Italiano e44456b1b9 [ELF2] Constify getStrTabSec().
llvm-svn: 248360
2015-09-23 01:50:53 +00:00
Enrico Granata c6bf2e2d1d Add {TypeSystem|CompilerType}::GetTypeForFormatters()
Different type system may have different notions of attributes of a type that do not matter for data formatters matching purposes
For instance, in the case of clang types, we remove some qualifiers (e.g. "volatile") as it doesn't make much sense to differentiate volatile T from T in the data formatters

This new API allows each type system to generate, if needed, a type that does not have those unwanted attributes that the data formatters can then consume to generate matches

llvm-svn: 248359
2015-09-23 01:39:46 +00:00
Evgeniy Stepanov 8d0e3011d8 Revert "Android support for SafeStack."
test/Transforms/SafeStack/abi.ll breaks when target is not supported;
needs refactoring.

llvm-svn: 248358
2015-09-23 01:23:22 +00:00
Evgeniy Stepanov ce2e16f00c Android support for SafeStack.
Add two new ways of accessing the unsafe stack pointer:

* At a fixed offset from the thread TLS base. This is very similar to
  StackProtector cookies, but we plan to extend it to other backends
  (ARM in particular) soon. Bionic-side implementation here:
  https://android-review.googlesource.com/170988.
* Via a function call, as a fallback for platforms that provide
  neither a fixed TLS slot, nor a reasonable TLS implementation (i.e.
  not emutls).

llvm-svn: 248357
2015-09-23 01:03:51 +00:00
Cong Hou b54a72ef78 Add a test case for the fix of profile update issue when lowering switch statement.
llvm-svn: 248356
2015-09-23 00:34:56 +00:00
Nico Weber a3dd36b6e9 Make ms-intrin.cpp test require the x86 target.
llvm-svn: 248355
2015-09-23 00:24:34 +00:00
Cong Hou 9def6efd7e Fixed an issue on updating profile data when lowering switch statement.
Fixed the issue that when there is an edge from the jump table to the default statement, we should check it directly instead of checking if the sibling of the jump table header is a successor of the jump table header, which may not be the default statment but a successor of it.

llvm-svn: 248354
2015-09-23 00:20:27 +00:00
NAKAMURA Takumi ca6f044f35 dsymutil: Fix a comment. [-Wdocumentation]
llvm-svn: 248353
2015-09-23 00:19:20 +00:00
Bruce Mitchener 48ea900c67 Use opaque_compiler_type_t in place of void*.
Reviewers: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D13060

llvm-svn: 248352
2015-09-23 00:18:24 +00:00
Devin Coughlin 749de2355c Revert "[analyzer] Improve localizability checks for iOS / OS X."
This reverts commit r248350. The pluralization checks are failing on some bots.

llvm-svn: 248351
2015-09-23 00:17:52 +00:00
Devin Coughlin ab58314357 [analyzer] Improve localizability checks for iOS / OS X.
Various improvements to the localization checker:
* Adjusted copy to be consistent with diagnostic text in other Apple
  API checkers.
* Added in ~150 UIKit / AppKit methods that require localized strings in
  UnlocalizedStringsChecker.
* UnlocalizedStringChecker now checks for UI methods up the class hierarchy and
  UI methods that conform for a certain Objective-C protocol.
* Added in alpha version of PluralMisuseChecker and some regression tests. False
  positives are still not ideal.

A patch by Kulpreet Chilana!

Differential Revision: http://reviews.llvm.org/D12417

llvm-svn: 248350
2015-09-22 23:58:04 +00:00
Rafael Espindola 1ab429bf49 Fix a last minuted edit that should not have been committed.
Sorry about that.

llvm-svn: 248349
2015-09-22 23:42:55 +00:00
Adrian Prantl e3b49e01eb Add a unit test for r248341.
llvm-svn: 248348
2015-09-22 23:42:47 +00:00
Rafael Espindola 05a3dd2cba Implement --export-dynamic.
llvm-svn: 248347
2015-09-22 23:38:23 +00:00
Chris Bieneman be61720c4e [builtins] Fixing broken bot building on linux with -Werror
Returning a void expression is bad.

llvm-svn: 248346
2015-09-22 23:35:24 +00:00
Adrian Prantl a5206ce72a Module Debugging: Use the clang module signature as the module's dwo_id
when building a module. Clang already records the module signature when
building a skeleton CU to reference a clang module.

Matching the id in the skeleton with the one in the module allows a DWARF
consumer to verify that they found the correct version of the module
without them needing to know about the clang module format.

llvm-svn: 248345
2015-09-22 23:26:43 +00:00
Adrian Prantl adbd2b1f32 Serialization: Let ASTWriter return the signature of the written module.
NFC

llvm-svn: 248344
2015-09-22 23:26:31 +00:00
Jason Molenda 040975472c A small fixup needed for debugserver to work natively
on iOS devices; fallout from Vince's cleanups made
in r237218 back in May.  iOS native lldbs will call
StartDebugserverProcess() with a random port #
(see ProcessGDBRemote::LaunchAndConnectToDebugserver)
and neither side of this conditional expression should
be followed in that case.

I added an "if (in_port == 0) { ..." check around the
entire if/then/else and indented the block of code so
the diff looks larger than it really is.

<rdar://problem/21712643> 

llvm-svn: 248343
2015-09-22 23:25:44 +00:00
Adrian Prantl 4410392e96 IR: Add a setDWOId() method to DICompileUnit.
Tested via clang.

llvm-svn: 248342
2015-09-22 23:21:06 +00:00
Adrian Prantl fbfc58e112 IR: Fix the return value of DICompileUnit::getDWOId.
llvm-svn: 248341
2015-09-22 23:21:03 +00:00
Adrian Prantl 77fefeba37 Debug Info: Emit the dwo_name only in skeleton CUs, not in DWOs.
llvm-svn: 248340
2015-09-22 23:21:00 +00:00
Enrico Granata 2e4ff97cb7 Fix a test case which was failing. There was no actual problem in the test logic, just a cosmetic issue with the presentation of the result by Foundation
llvm-svn: 248339
2015-09-22 23:08:13 +00:00
Enrico Granata f515729a07 Move the "run" alias from process launch --shell to process launch --shell-expand-args when building on OS X
The argdumper-based launching is more friendly to System Integrity Protection, and will work on older releases of OS X as well

Leave non-Apple builds alone

llvm-svn: 248338
2015-09-22 22:57:12 +00:00
Todd Fiala 871b2e5e30 test runner: remove print from prior commit; fixup listner socket backlog
When doing test event collation from dotest inferiors to the parallel test
runner, I had a hard-coded small value for the socket backlog. Fix it to
be 2*num workers so we don't fail socket connections from inferiors.

llvm-svn: 248337
2015-09-22 22:47:34 +00:00
Devin Coughlin 8177173757 [analyzer] Make realloc(ptr, 0) handling equivalent to malloc(0).
Currently realloc(ptr, 0) is treated as free() which seems to be not correct. C
standard (N1570) establishes equivalent behavior for malloc(0) and realloc(ptr,
0): "7.22.3 Memory management functions calloc, malloc, realloc: If the size of
the space requested is zero, the behavior is implementation-defined: either a
null pointer is  returned, or the behavior is as if the size were some nonzero
value, except that the returned pointer shall not be used to access an object."
The patch equalizes the processing of malloc(0) and realloc(ptr,0). The patch
also enables unix.Malloc checker to detect references to zero-allocated memory
returned by realloc(ptr,0) ("Use of zero-allocated memory" warning).

A patch by Антон Ярцев!

Differential Revision: http://reviews.llvm.org/D9040

llvm-svn: 248336
2015-09-22 22:47:14 +00:00
Matthias Braun 73e4221e6c LiveIntervalAnalysis: Avoid multiple connected liveness components
We may have subregister defs which are unused but not discovered and
cleaned up prior to liveness analysis. This creates multiple connected
components in the resulting live range which are forbidden in the
MachineVerifier because they would unnecesarily constrain the register
allocator. Rewrite those dead definitions to define a newly created
virtual register.

Differential Revision: http://reviews.llvm.org/D13035

llvm-svn: 248335
2015-09-22 22:37:44 +00:00
Matthias Braun 5efe871971 LiveInterval: Distribute subregister liveranges to new intervals in ConnectedVNInfoEqClasses::Distribute()
This improves ConnectedVNInfoEqClasses::Distribute() to distribute the
segments and value numbers in the subranges instead of conservatively
clearing all subregister info.

No separate test here, just clearing the subrange instead of properly
distributing them would however break my upcoming fix regarding dead super
register definitions.

Differential Revision: http://reviews.llvm.org/D13075

llvm-svn: 248334
2015-09-22 22:37:42 +00:00
Michael Zolotukhin deade19630 [Unroll] Do not crash trying to propagate a value to vector load.
llvm-svn: 248333
2015-09-22 22:27:12 +00:00
Evgeniy Stepanov a7ecbe5685 [asan] Add missing -pthread in tests.
llvm-svn: 248332
2015-09-22 22:24:46 +00:00
Adrian Prantl e5162dba49 dsymutil: Follow references to clang modules and recursively clone the
debug info.

This does not yet resolve external type references.

llvm-svn: 248331
2015-09-22 22:20:50 +00:00
Chris Bieneman 0a9466c11e [builtins] One more stab at fixing the bots.
llvm-svn: 248330
2015-09-22 22:19:21 +00:00
Marshall Clow 286a74e93d Fix Typo in GCC no RTTI detection. Fixes PR#24901. Thanks to Bernhard Rosenkraenzer for the report and the patch.
llvm-svn: 248329
2015-09-22 21:58:30 +00:00
Chris Bieneman 7908b12967 [builtins] Fixing atomic builtins to be compiled out if stdatomic.h isn't available.
This should fix the bots broken by r248322.

Reviewed by bogner over my shoulder.

llvm-svn: 248328
2015-09-22 21:50:43 +00:00
Michael Zolotukhin 8bb31dd08a [Unroll] Follow-up for r247769: fix a bug in UnrolledInstAnalyzer::visitLoad.
Apart from checking that GlobalVariable is a constant, we should check
that it's not a weak constant, in which case we can't propagate its
value.

llvm-svn: 248327
2015-09-22 21:41:29 +00:00
Rafael Espindola 7f07442bb6 Move the last remaining hard coded relocations to Target.
Unfortunately the i386 and x86_64 relocation have the same numerical value
and it is a probably a bit much to add got support for another architecture
just to test this.

llvm-svn: 248326
2015-09-22 21:35:51 +00:00
Evgeniy Stepanov 9147de0ddf [asan] Versioned interceptor for pthread_create.
This fixes a crash in pthread_create on linux/i386 due to abi
incompatibility between intercepted and non-intercepted functions.

See the test case for more details.

llvm-svn: 248325
2015-09-22 21:34:44 +00:00
Rafael Espindola 1d6063e804 Stub out ARM and PPC targets so that we can use a switch to create them.
llvm-svn: 248324
2015-09-22 21:24:52 +00:00
Todd Fiala 83c32e3a49 test framework: default to threading-based test runners
Windows gets threading-pool, OS X versions < 10.10 get
multiprocessing, everyone else gets threading.

llvm-svn: 248323
2015-09-22 21:19:40 +00:00
Chris Bieneman 54445f92a9 [CMake] Add atomic builtins to GENERIC_SOURCES list.
Reviewers: bogner, samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D13069

llvm-svn: 248322
2015-09-22 21:18:19 +00:00
Rafael Espindola 3efa4e982e Add a token ppc64 reloc just to have a test showing that we handle BE.
llvm-svn: 248321
2015-09-22 21:12:55 +00:00
Aaron Ballman 7eb86d1d2d Instead of defining the operator delete() function, it is better to delete the function so that any uses (even from within Node or its subclasses) do not accidentally call it. NFC intended.
llvm-svn: 248320
2015-09-22 21:00:35 +00:00
Rafael Espindola c40108858d Move relocation processing to Target.
I will add a couple of ppc64 relocs in the next patches.

llvm-svn: 248319
2015-09-22 20:54:08 +00:00
Devin Coughlin eb538abfbd [analyzer] Create one state for a range switch case instead of multiple.
This fixes PR16833, in which the analyzer was using large amounts of memory
for switch statements with large case ranges.

rdar://problem/14685772

A patch by Aleksei Sidorin!

Differential Revision: http://reviews.llvm.org/D5102

llvm-svn: 248318
2015-09-22 20:31:19 +00:00
Rafael Espindola 8c21fad1e8 Fix a merge problem.
r248289 got lots when I moved code to Target.cpp. Sorry about that.

llvm-svn: 248317
2015-09-22 20:06:19 +00:00