Commit Graph

190384 Commits

Author SHA1 Message Date
Richard Smith e78bb1249e For PR21145: recognise a builtin call to a known deallocation function even if
it's defined in the current module. Clang generates this situation for the
C++14 sized deallocation functions, because it generates a weak definition in
case one isn't provided by the C++ runtime library.

llvm-svn: 226069
2015-01-15 01:00:33 +00:00
Kate Stone a487aa4cdb Three related changes to help:
The default help display now shows the alias collection by default, and hides commands whose named begin with an underscore.  Help is primarily useful to those unfamiliar with LLDB and should aim to answer typical questions while still being able to provide more esoteric answers when required.  To that latter end an argument to include the hidden commands in help has been added, and instead of having a help flag to show aliases there is now one to hide them.  This final change might be controversial as it repurposes the -a shorthand as the opposite of its original meaning.

The previous implementation of OutputFormattedHelpText was easily confused by embedded newlines.  The new algorithm correctly breaks on the FIRST newline or LAST space/tab before the target column count rather than treating all whitespace interchangeably.

Command interpreters now have the ability to specify help prologue text and a command prefix string.  Neither are used in the current LLDB sources but are required to support REPL-like extensions where LLDB commands must be prefixed and additional help text is required to explain how to access traditional debugging commands.

<rdar://problem/17751929>
<rdar://problem/16953815>
<rdar://problem/16953841>
<rdar://problem/16930173>
<rdar://problem/16879028>

llvm-svn: 226068
2015-01-15 00:52:41 +00:00
Richard Smith 64e033f9c4 Fix crash-on-invalid and name lookup when recovering from ~X::X() typo.
llvm-svn: 226067
2015-01-15 00:48:52 +00:00
Colin LeMahieu 8ffce23cda [Hexagon] Replacing old versions of stores and loads.
llvm-svn: 226065
2015-01-15 00:15:30 +00:00
Adrian Prantl 79dee1afa6 Add missing include directive for llvm::make_unique().
llvm-svn: 226064
2015-01-15 00:11:36 +00:00
Jonathan Roelofs 015cf55c71 Rename src_root -> libcxx_src_root. NFC
llvm-svn: 226063
2015-01-15 00:03:14 +00:00
Enrico Granata 02d87608c1 Reenable the logic to take an integer value and attempt to "po" it as an ObjC object
While there is quite a bit of potential for mishaps due to tagged pointers, and after quite some internal discussion, this seems a saner behavior given how "po" stands for "print OBJECT". The argument being that we should make at least some sensible attempt to print the thing the user passed as-if it was an object

Fixes rdar://19423124

llvm-svn: 226062
2015-01-14 23:58:18 +00:00
Jonathan Roelofs eb7b5e74d4 Rename system_lib -> system_cxx_lib. NFC
llvm-svn: 226061
2015-01-14 23:38:12 +00:00
Ramkumar Ramachandra dba7329ebb [GC] CodeGenPrep transform: simplify offsetable relocate
The transform is somewhat involved, but the basic idea is simple: find
derived pointers that have been offset from the base pointer using gep
and replace the relocate of the derived pointer with a gep to the
relocated base pointer (with the same offset).

llvm-svn: 226060
2015-01-14 23:27:07 +00:00
Duncan P. N. Exon Smith 9ffa7284df IR: Fix comment spelling, NFC
llvm-svn: 226058
2015-01-14 23:11:51 +00:00
Colin LeMahieu c7522f31f1 [Hexagon] Replacing old version of convert and load f64.
llvm-svn: 226057
2015-01-14 23:07:36 +00:00
Philip Reames 8d5d68f1aa getMangledTypeStr: clarify how it mangles types, and add tests
"Write a set of tests that show how name mangling is done for overloaded intrinsics."  These happen to use gc.relocates to exercise the codepath in question, but is not a GC specific test.

Patch by: artagnon@gmail.com
Differential Revision: http://reviews.llvm.org/D6915

llvm-svn: 226056
2015-01-14 23:05:17 +00:00
NAKAMURA Takumi a50a89a081 Update libdeps in NVPTXCodeGen, since r225944.
llvm-svn: 226055
2015-01-14 23:01:36 +00:00
Zachary Turner d46476b52a Only set the StopInfo on Windows if the stop is valid for this thread.
llvm-svn: 226054
2015-01-14 22:58:19 +00:00
Zachary Turner 4f1a39584e Don't try to link libpthread on Windows.
llvm-svn: 226053
2015-01-14 22:58:09 +00:00
Reid Kleckner e80a0a7572 Use MMI->getPersonality() instead of MMI->getPersonalities()[MMI->getPersonalityIndex()]
Also nuke the comment about supporting multiple personalities in a
single function, aka PR1414. That's just crazy.

llvm-svn: 226052
2015-01-14 22:47:54 +00:00
Duncan P. N. Exon Smith 8d3ef611ce IR: Move MDLocation into place (clang testcases)
Update testcases to match LLVM change in r226048.

llvm-svn: 226049
2015-01-14 22:28:03 +00:00
Duncan P. N. Exon Smith 9885469922 IR: Move MDLocation into place
This commit moves `MDLocation`, finishing off PR21433.  There's an
accompanying clang commit for frontend testcases.  I'll attach the
testcase upgrade script I used to PR21433 to help out-of-tree
frontends/backends.

This changes the schema for `DebugLoc` and `DILocation` from:

    !{i32 3, i32 7, !7, !8}

to:

    !MDLocation(line: 3, column: 7, scope: !7, inlinedAt: !8)

Note that empty fields (line/column: 0 and inlinedAt: null) don't get
printed by the assembly writer.

llvm-svn: 226048
2015-01-14 22:27:36 +00:00
Matthias Braun 96a319588a MachineVerifier: Allow undef reads if a matching superreg is defined.
Summary:
Some pseudo instruction expansions break down a wide register use into
multiple uses of smaller sub registers. If the super register was
partially undefined the broken down sub registers may be completely
undefined now leading to MachineVerifier complaints. Unfortunately
liveness information to add the required dead flags is not easily
(cheaply) available when expanding pseudo instructions.

This commit changes the verifier to be quiet if there is an additional
implicit use of a super register. Pseudo instruction expanders can use
this to mark cases where partially defined values get potentially broken
into completely undefined ones.

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

llvm-svn: 226047
2015-01-14 22:25:14 +00:00
Duncan P. N. Exon Smith 503cf3bff9 IR: Always print MDLocation line
Print `MDLocation`'s `line` field even when it's 0.

llvm-svn: 226046
2015-01-14 22:14:26 +00:00
Duncan P. N. Exon Smith e16d587515 IR: Drop metadata references more aggressively during teardown
Sometimes teardown happens before the debug info graph is complete
(e.g., when clang throws an error).  In that case, `MDNode`s will still
have RAUW, so deleting constants that the `MDNode`s point at will be
relatively expensive -- it'll cause re-uniquing all up the chain (what
I've been referring to as "teardown madness").

So, drop references *before* deleting constants.  We need to drop a few
more references now: the metadata side of the metadata/value bridges
needs to be dropped off the cliff along with the rest of it (previously,
the bridges were cleaned before we did anything with the `MDNode`s).

There's no real functionality change here -- state before and after
`LLVMContextImpl::~LLVMContextImpl()` is unchanged -- so no testcase.

llvm-svn: 226044
2015-01-14 21:58:17 +00:00
Jonathan Roelofs e5f997e551 Rename library_root to libcxx_library_root. NFC
llvm-svn: 226043
2015-01-14 21:56:50 +00:00
Zachary Turner 12947b7e25 Fix a number of tests on Windows.
These fix various issues with path handling and disable a few tests
which use features of LLVM which are not yet supported on Windows.

llvm-svn: 226042
2015-01-14 21:42:53 +00:00
Greg Clayton 6e7ab02cff Specify ObjC++ when running heap commands in case we are stopped in a frame with another language.
This ensures the expression gets runs with the correct language.

<rdar://problem/18816647>

llvm-svn: 226041
2015-01-14 21:37:19 +00:00
Jonathan Roelofs da5a97594a Refactor configure_compile_flags. NFC
llvm-svn: 226040
2015-01-14 21:02:14 +00:00
Vince Harron 4d2857321d Fixes compilation/run error with BUILD_SHARED_LIBS=TRUE
BUILD_SHARED_LIBS=TRUE currently isn't working for Linux x86_64
This patch fixes the link errors and also some runtime errors

Test Plan:
CC=clang CXX=clang++ cmake -GNinja -DBUILD_SHARED_LIBS=TRUE -DCMAKE_LINKER=ld.gold -DCMAKE_BUILD_TYPE=Debug ../../llvm
ninja
ninja check-lldb

llvm-svn: 226039
2015-01-14 21:01:15 +00:00
Rafael Espindola fad1639a12 Don't create new comdats in CodeGen.
This patch stops the implicit creation of comdats during codegen.

Clang now sets the comdat explicitly when it is required. With this patch clang and gcc
now produce the same result in pr19848.

llvm-svn: 226038
2015-01-14 20:55:48 +00:00
Ed Maste 55f74e829b test: Add workaround for FreeBSD libedit vs readline issue
If stdout is not a terminal Python executes
    rl_variable_bind ("enable-meta-key", "off");

This produces a warning with FreeBSD's libedit because the
enable-meta-key variable is unknown.  Not an issue on Apple because
cpython commit f0ab6f9f0603 added a #ifndef __APPLE__ around the call.
See http://bugs.python.org/issue19884 for more information.

For now we just discard the warning output to get the tests working
again on FreeBSD.

llvm-svn: 226037
2015-01-14 20:32:33 +00:00
Colin LeMahieu 11a34b385d [Hexagon] Removing old, unused !tstbit instructions.
llvm-svn: 226036
2015-01-14 20:26:15 +00:00
Rafael Espindola a371989f66 Add a test that would have found the issue with r225644.
llvm-svn: 226035
2015-01-14 20:24:46 +00:00
Chandler Carruth e3288147f0 [MBP] Add flags to disable the BadCFGConflict check in MachineBlockPlacement.
Some benchmarks have shown that this could lead to a potential
performance benefit, and so adding some flags to try to help measure the
difference.

A possible explanation. In diamond-shaped CFGs (A followed by either
B or C both followed by D), putting B and C both in between A and
D leads to the code being less dense than it could be. Always either
B or C have to be skipped increasing the chance of cache misses etc.
Moving either B or C to after D might be beneficial on average.

In the long run, but we should probably do a better job of analyzing the
basic block and branch probabilities to move the correct one of B or
C to after D. But even if we don't use this in the long run, it is
a good baseline for benchmarking.

Original patch authored by Daniel Jasper with test tweaks and a second
flag added by me.

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

llvm-svn: 226034
2015-01-14 20:19:29 +00:00
Bill Schmidt 082cfc05f1 [PPC64] Add support for the ICBT instruction on POWER8.
Patch by Kit Barton.

Support for the ICBT instruction is currently present, but limited to
embedded processors. This change adds a new FeatureICBT that can be used
to identify whether the ICBT instruction is available on a specific processor.

Two new tests are added:
 * Positive test to ensure the icbt instruction is present when using
-mcpu=pwr8
 * Negative test to ensure the icbt instruction is not generated when
using -mcpu=pwr7

Both test cases use the Prefetch opcode in LLVM. They are based on the
ppc64-prefetch.ll test case.

llvm-svn: 226033
2015-01-14 20:17:10 +00:00
Rafael Espindola 9e3e53f6dd Fix linking of shared libraries.
In shared libraries the plugin can see non-weak declarations that are still
undefined.

llvm-svn: 226031
2015-01-14 20:08:46 +00:00
David Blaikie daef1bcfbb Add comment about a gotcha I ran across while touching this code.
I haven't looked closely at exactly why the side effect is required, but
this seems better than not mentioning it at all.

llvm-svn: 226030
2015-01-14 19:59:18 +00:00
Duncan P. N. Exon Smith 4a4f78583e IR: Fix a use-after-free in RAUW
Happened pretty commonly during `LLVMContext` teardown when `clang -g`
hit an error.  This fixes the use-after-free.  Next I'll clean up
teardown so that it's not RAUW'ing when metadata-tracked values are
deleted (only really causes a problem if the graph is mid-construction
when teardown starts, but it's still unnecessary work).

llvm-svn: 226029
2015-01-14 19:56:10 +00:00
David Blaikie a72d6ef891 unique_ptrify the value in DominatorTreeBase::DomTreeNodes
(noticed the need for an explicit dtor in a recent commit & figured I'd
tidy that up)

llvm-svn: 226028
2015-01-14 19:55:27 +00:00
Greg Clayton 456f2712b3 Typing "gui" will crash programs that don't give LLDB a real terminal.
We now verify that the debugger's input file is a valid terminal file descriptor before allowing the "gui" command to try to run. 

Xcode would crash if you typed "gui" at the command line prior to this fix.

<rdar://problem/18775851>

llvm-svn: 226027
2015-01-14 19:45:21 +00:00
Rafael Espindola 0fd9e5f719 Fix handling of extern_weak. This was broken by r225983.
llvm-svn: 226026
2015-01-14 19:43:32 +00:00
Daniel Jasper 3b6018b9f6 clang-tidy: Add initial check for "Don't use else after return".
As per the LLVM coding standards:
http://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return

Initial version, probably still quite a bit to do until this is really
useful.

Review: http://reviews.llvm.org/D6927
llvm-svn: 226025
2015-01-14 19:37:54 +00:00
Jonathan Roelofs fd41e2f946 Support picking the unwinder used for testing on linux (just as libc++abi testing allows)
llvm-svn: 226024
2015-01-14 19:29:04 +00:00
David Majnemer a0afb55ff9 InstCombine: Don't take A-B<0 into A<B if A-B has other uses
This fixes PR22226.

llvm-svn: 226023
2015-01-14 19:26:56 +00:00
Rafael Espindola 7244bb3c17 Revert "Add r224985 back with two fixes."
This reverts commit r225644 while I debug a regression.

llvm-svn: 226022
2015-01-14 19:07:23 +00:00
Reid Kleckner 9b5eaf0d5a Emit the Itanium LSDA for unknown EH personalities on Win64
This fixes lots of generic CodeGen tests that use __gcc_personality_v0.
This suggests that using ExceptionHandling::MSVC was a mistake, and we
should instead classify each function by personality function. This
would, for example, allow us to LTO a binary containing uses of SEH and
Itanium EH.

llvm-svn: 226019
2015-01-14 18:50:10 +00:00
Reid Kleckner b57c1dc0f7 Remove dead code for llvm.eh.selector in the old EH model
llvm-svn: 226018
2015-01-14 18:49:39 +00:00
Zachary Turner a45fa2ccaa Implement demangling on Windows.
llvm-svn: 226017
2015-01-14 18:34:43 +00:00
Zachary Turner e2dcbd001c Add null pointer checks to some SBStream functions.
llvm-svn: 226016
2015-01-14 18:34:35 +00:00
Hans Wennborg 859ea8056d docs/conf.py: bump version to 3.7
llvm-svn: 226015
2015-01-14 18:32:20 +00:00
Hans Wennborg 9db1d94ebb Update PACKAGE_VERSION to 3.7.0svn
llvm-svn: 226014
2015-01-14 18:30:55 +00:00
Colin LeMahieu c91fabc233 [Hexagon] Removing old versions of cmph and updating references.
llvm-svn: 226013
2015-01-14 18:26:14 +00:00
Rafael Espindola 4e74d3be35 Add support for comdats with names larger than 256 characters.
llvm-svn: 226012
2015-01-14 18:25:45 +00:00