Commit Graph

148631 Commits

Author SHA1 Message Date
Rafael Espindola 04d3f49608 Use a pointer as the relocation iterator.
Since the relocation iterator walks only the relocations in one section, we
can just use a pointer and avoid fetching information about the section at
every reference.

llvm-svn: 180262
2013-04-25 12:45:46 +00:00
Rafael Espindola 1e48387962 Clarify getRelocationAddress x getRelocationOffset a bit.
getRelocationAddress is for dynamic libraries and executables,
getRelocationOffset for relocatable objects.

Mark the getRelocationAddress of COFF and MachO as not implemented yet. Add a
test of ELF's. llvm-readobj -r now prints the same values as readelf -r.

llvm-svn: 180259
2013-04-25 12:28:45 +00:00
Rafael Espindola bff5956cfa Don't mark 'extern "C" void f(void)' as having extern storage class.
Instead, we check for one line extern "C" context in linkage computation and
when deciding if a variable is a definition.

This hopefully completes the transition to having "as written" semantics for
hasExternalStorage.

llvm-svn: 180258
2013-04-25 12:11:36 +00:00
Alexey Samsonov 5c38383205 [ASan] Add allow_user_segv_handler to let users override SEGV handler installed by ASan
llvm-svn: 180255
2013-04-25 10:52:15 +00:00
Silviu Baranga 4ad2bc5963 Fix constant folding for one lane vector types. Constant folding one lane vector types not returns a vector instead of a scalar.
llvm-svn: 180254
2013-04-25 09:32:33 +00:00
Daniel Jasper 6fe2f009df Add option to align escaped newlines left.
This enables formattings like:

  #define A   \
    int aaaa; \
    int b;    \
    int ccc;  \
    int dddddddddd;

Enabling this for Google/Chromium styles only as I don't know whether it
is desired for Clang/LLVM.

llvm-svn: 180253
2013-04-25 08:56:26 +00:00
Daniel Jasper a04337e22b Fix scrolling bug in clang-format's emacs integration.
This patch ensure that nothing scrolls even if the same buffer is opened
in multiple windows.

llvm-svn: 180252
2013-04-25 07:06:48 +00:00
Dmitry Vyukov a05bbe1c9a tsan: add a test that used to crash, fixed by r180180.
llvm-svn: 180251
2013-04-25 06:58:43 +00:00
Peter Collingbourne 2816c023ea [ms-cxxabi] Fix a number of bugs in the mangler.
This includes the following fixes:
 - Implement 4 subtly different variants of qualifier mangling and use them
   in what I believe are the right places.
 - Fix handling of array types.  Previously we were always decaying them,
   which is wrong if the type appears as a template argument, pointee,
   referent etc.
Fixes PR13182.

Differential Revision: http://llvm-reviews.chandlerc.com/D709

llvm-svn: 180250
2013-04-25 04:25:40 +00:00
Rafael Espindola 72780ed996 Revert "Adding object caching support to MCJIT"
This reverts commit 07f03923137a91e3cca5d7fc075a22f8c9baf33a.

Looks like it broke the valgrind bot:

http://lab.llvm.org:8011/builders/llvm-x86_64-linux-vg_leak/builds/649

llvm-svn: 180249
2013-04-25 03:47:41 +00:00
Rafael Espindola 837448bc19 Revert "Exposing MCJIT through C API"
This reverts commit 8c31b298149ca3c3f2bbd9e8aa9a01c4d91f3d74.

It looks like this commit broke some bots:

http://lab.llvm.org:8011/builders/llvm-ppc64-linux2/builds/5209

llvm-svn: 180248
2013-04-25 03:19:12 +00:00
Rafael Espindola ba5899c563 Don't compute a std::vector<uint8_t> just to write it out a stream.
llvm-svn: 180247
2013-04-25 03:07:42 +00:00
Akira Hatanaka 8aba50fd39 Test case for r180241.
llvm-svn: 180246
2013-04-25 02:22:07 +00:00
Akira Hatanaka 714a8f62db Test case for r180238.
llvm-svn: 180245
2013-04-25 02:21:09 +00:00
Jim Ingham 0ad7e0545b In Process::ProcessEventData::DoOnRemoval, we need to handle the case where NO thread has a stop reason
specially, and make sure we stop.  This shouldn't happen, but if it does, the user will probably want to
see it.

<rdar://problem/13273125>

llvm-svn: 180244
2013-04-25 02:04:59 +00:00
Filipe Cabecinhas 10a7a59871 More CMake fixes for OS X.
llvm-svn: 180243
2013-04-25 01:36:53 +00:00
Jason Molenda 8214b01da2 Fix one small whitespace alignment mistake.
llvm-svn: 180242
2013-04-25 01:33:46 +00:00
Akira Hatanaka f0aa6c9101 [mips] Add definitions of micromips load and store instructions.
Patch by Zoran Jovanovic.

llvm-svn: 180241
2013-04-25 01:21:25 +00:00
Filipe Cabecinhas 5afbec8b0c Allow users to choose identity used to sign tools.
Summary:
No change if the identity isn't defined by the makefile.

Reviewers: echristo

Differential Revision: http://llvm-reviews.chandlerc.com/D632

llvm-svn: 180240
2013-04-25 01:17:54 +00:00
Richard Trieu c7699631df Add "-no-canonical-prefixes" to a test case.
llvm-svn: 180239
2013-04-25 01:17:23 +00:00
Akira Hatanaka cd9b74a599 [mips] Add definitions of micromips shift instructions.
Patch by Zoran Jovanovic.

llvm-svn: 180238
2013-04-25 01:11:15 +00:00
Greg Clayton 9d49056ef0 <rdar://problem/13565393>
If a register is in a ValueObject, be sure to print its children if it is a vector type.

llvm-svn: 180237
2013-04-25 01:06:07 +00:00
Greg Clayton 0fa5c974ef Don't print the type if there is none and don't print "<invalid type>". ValueObjects can be register sets and register groups and dumping those with:
(lldb) script print frame.GetRegisters()

llvm-svn: 180236
2013-04-25 01:05:15 +00:00
Greg Clayton 78e44bdd47 Don't crash if we try to interpret the IR (incorrectly in this case) and can't handle the size. This came from trying to do:
(lldb) p typedef float __attribute__((ext_vector_type(8))) __ext_vector_float8; (__ext_vector_float8)$ymm0

llvm-svn: 180235
2013-04-25 00:57:05 +00:00
Anna Zaks 99394bbd02 [analyzer] Fix a crash in RetainCountChecker - we should not rely on CallEnter::getCallExpr to return non-NULL
We get a CallEnter with a null expression, when processing a destructor. All other users of
CallEnter::getCallExpr work fine with null as return value.

(Addresses PR15832, Thanks to Jordan for reducing the test case!)

llvm-svn: 180234
2013-04-25 00:41:32 +00:00
Michael Gottesman 3508389233 [neonemitter tests] Change triple of emitted tests to thumbv7s to match the target cpu being swift. Also specify the target-abi to apcs-gnu.
llvm-svn: 180233
2013-04-25 00:10:14 +00:00
Andrew Kaylor 25fa9db462 Fixing OCAML bindings for MCJIT
llvm-svn: 180232
2013-04-25 00:03:58 +00:00
Tom Stellard 87047f69ad R600: Initialize BooleanVectorContents
Fixes test/CodeGen/R600/setcc.ll

llvm-svn: 180231
2013-04-24 23:56:18 +00:00
Tom Stellard 34e4068d05 R600: Use SHT_PROGBITS for the .AMDGPU.config section
The libelf implementation that is distributed here:
http://www.mr511.de/software/english.html
will not parse sections that are marked SHT_NULL.

llvm-svn: 180230
2013-04-24 23:56:14 +00:00
Andrew Kaylor ee1e45796e Exposing MCJIT through C API
Patch by Filip Pizlo

llvm-svn: 180229
2013-04-24 23:33:53 +00:00
Fariborz Jahanian 46ed4d978e Objective-C parsing [qoi]: Recover gracefully with good diagnostic
when class implementation declaration adds protocol qualifier
list. // rdar://12233858

llvm-svn: 180228
2013-04-24 23:23:47 +00:00
Andrew Trick 2e87517144 Fix for r180193 - MI Sched: eliminate local vreg.
Fixes PR15838. Need to check for blocks with nothing but dbg.value.

I'm not sure how to force this situation with a unit test. I tried to
reduce the test case in PR15838 (1k lines of metadata) but gave up.

llvm-svn: 180227
2013-04-24 23:19:56 +00:00
Chad Rosier 108d5a61b7 [inline asm] Fix a crasher for an invalid value type/register class.
rdar://13731657

llvm-svn: 180226
2013-04-24 22:53:10 +00:00
Andrew Kaylor f91b5acc99 Making invalidateInstructionCache automatic in SectionMemoryManager
llvm-svn: 180225
2013-04-24 22:39:12 +00:00
Greg Clayton f4d6de6a53 Added the ability to extract a ModuleSpecList (a new class) from an ObjectFile. This is designed to be used when you have an object file that contains one or more architectures (MacOSX universal (fat) files) and/or one or more objects (BSD archive (.a files)).
There is a new static ObjectFile function you can call:

size_t
ObjectFile::GetModuleSpecifications (const FileSpec &file,
                                     lldb::offset_t file_offset,
                                     ModuleSpecList &specs)

This will fill in "specs" which the details of all the module specs (file + arch + UUID (if there is one) + object name (for BSD archive objects eventually) + file offset to the object in question).

This helps us when a user specifies a file that contains a single architecture, and also helps us when we are given a debug symbol file (like a dSYM file on MacOSX) that contains one or more architectures and we need to be able to match it up to an existing Module that has no debug info.

llvm-svn: 180224
2013-04-24 22:29:28 +00:00
Greg Clayton 8d1d25222e Remove a print statement that was left in accidentally.
llvm-svn: 180223
2013-04-24 22:21:02 +00:00
Michael Gottesman fdb497a9b2 [objc-arc] Added ImpreciseAutoreleaseSet to track autorelease calls that were once autoreleaseRV instructions.
Due to the semantics of ARC, we must be extremely conservative with autorelease
calls inserted by the frontend since ARC gaurantees that said object will be in
the autorelease pool after that point, an optimization invariant that the
optimizer must respect.

On the other hand, we are allowed significantly more flexibility with
autoreleaseRV instructions.

Often times though this flexibility is disrupted by early transformations which
transform objc_autoreleaseRV => objc_autorelease if said instruction is no
longer being used as part of an RV pair (generally due to inlining). Since we
can not tell the difference in between an autorelease put into place by the
frontend and one created through said ``strength reduction'' we can not perform
these optimizations.

The addition of this set gets around said issues by allowing us to differentiate
in between said two cases.

rdar://problem/13697741.

llvm-svn: 180222
2013-04-24 22:18:18 +00:00
Michael Gottesman cd5b02701c Fixed comment typo.
llvm-svn: 180221
2013-04-24 22:18:15 +00:00
Jack Carter a2015328e8 Mips assembler: Add 64 bit testing for JAL
Contributer: Vladimir Medic
llvm-svn: 180220
2013-04-24 21:52:42 +00:00
Enrico Granata 3f8e40ce7a See: http://stackoverflow.com/questions/16166897/c-how-to-obtain-address-of-stdvector-object-in-lldb-xcode
The user was trying to obtain the address-of an std::vector and the experience was more painful than necessary because data formatters were kicking in for vector* objects
We got this right for libc++ - we should get it right for libstdc++ too

llvm-svn: 180219
2013-04-24 21:52:24 +00:00
Enrico Granata e743c78299 <rdar://problem/13209140>
“plugin load” tries to be more helpful when it fails to load a plugin

llvm-svn: 180218
2013-04-24 21:29:08 +00:00
Sean Callanan 2ad6691be4 Fixed IRForTarget to handle Objective-C messages
sent to "super".

<rdar://problem/13042260>

llvm-svn: 180217
2013-04-24 21:25:20 +00:00
Jason Molenda c0e5b3ba1d Temporarily recognize exc_type EXC_BREAKPOINT with an exc_code of 0
(normally undefined) as indicating a breakpoint hit, in addition
to the normal (EXC_BREAKPOINT, EXC_ARM_BREAKPOINT) pair.
<rdar://problem/13730366> 

llvm-svn: 180216
2013-04-24 20:58:03 +00:00
Sean Callanan 76ee3e7e1c Fixed expression parser handling of empty strings.
<rdar://problem/12977827>

llvm-svn: 180215
2013-04-24 19:50:12 +00:00
Rafael Espindola 75c3036d4b Use pointers to iterate over symbols.
While here, don't report a dummy symbol for relocations that don't have symbols.
We used to says such relocations were for the first defined symbol, but now we
return end_symbols(). The llvm-readobj output change agrees with otool.

llvm-svn: 180214
2013-04-24 19:47:55 +00:00
Howard Hinnant 03ec04f9b5 default_delete needs a static_assert against void types. I had previously thought that sizeof(void) would take care of this. I was wrong.
llvm-svn: 180213
2013-04-24 19:44:26 +00:00
Sean Callanan bac54a8d54 Fixed a build problem.
llvm-svn: 180212
2013-04-24 19:26:29 +00:00
Fariborz Jahanian 6a41337132 Objective-C arc: Improve disgnostics when 'weak'
property cannot be synthesized because its backing
ivar does not support weak references.
// rdar://13676793

llvm-svn: 180211
2013-04-24 19:13:05 +00:00
Sean Callanan 7f5ac65fb9 Added support for pulling Objective-C class symbols
out of the runtime.  This allows calling static methods
on classes whose symbols have been stripped out of the
binary.

<rdar://problem/12042992>

llvm-svn: 180210
2013-04-24 19:07:29 +00:00
Michael J. Spencer 9d70cef481 [Core] Allow weak symbols in shared library when linking.
Patch by Rui Ueyama.

llvm-svn: 180209
2013-04-24 19:00:26 +00:00