Commit Graph

153223 Commits

Author SHA1 Message Date
Evgeniy Stepanov faba61a7bc [sanitizer] Support GLOB_ALTDIRFUNC in glob interceptor.
llvm-svn: 185932
2013-07-09 12:07:59 +00:00
Rafael Espindola ab417699dd ArrayRef'ize Sema::FinalizeDeclaratorGroup, Sema::BuildDeclaratorGroup and
Sema::ActOnDocumentableDecls.

Patch by Robert Wilhelm.

llvm-svn: 185931
2013-07-09 12:05:01 +00:00
Daniel Jasper bd05888fa0 Avoid confusing indentations for chained function calls.
Basically treat a function with a trailing call similar to a function
with multiple parameters.

Before:
  aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
      aaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaa))
      .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa();

After:
  aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
                           aaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaa))
      .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa();

Also fix typo.

llvm-svn: 185930
2013-07-09 11:57:27 +00:00
Joey Gouly 0f12aa2b0f Add MC assembly/disassembly support for VRINT{A, N, P, M} to V8FP.
llvm-svn: 185929
2013-07-09 11:26:18 +00:00
NAKAMURA Takumi 80e373e44f c-index-test/CMakeLists.txt: Suggest -isystem to include libxml2 with include_directories(SYSTEM).
llvm-svn: 185928
2013-07-09 11:14:30 +00:00
NAKAMURA Takumi b538ac6830 c-index-test/Makefile: Use -isystem instead of -I on $(LIBXML2_INC) with -Wdocumentation.
-Wdocumentation won't seek -isystem. LIBXML2's headers in a certain distro might be incompatible to -Wdocumentation.

FIXME: Could autoconf detect clang or availability of -isystem?
llvm-svn: 185927
2013-07-09 11:14:24 +00:00
Joey Gouly 3b693c42b5 Add MC assembly/disassembly support for VRINT{Z, X, R} to V8FP.
llvm-svn: 185926
2013-07-09 11:03:21 +00:00
Alexey Samsonov d7f6a6196e Document LLVM_USE_SANITIZER CMake option
llvm-svn: 185925
2013-07-09 10:56:13 +00:00
Ulrich Weigand 55daa77901 [PowerPC] Support ".machine any"
The PowerPC assembler is supposed to provide a directive .machine
that allows switching the supported CPU instruction set on the fly.
Since we do not yet check CPU feature sets at all and always accept
any available instruction, this is not really useful at this point.

However, it makes sense to accept (and ignore) ".machine any" to
avoid spuriously rejecting existing assembler files that use this.

llvm-svn: 185924
2013-07-09 10:00:34 +00:00
Alexander Potapenko 8d2d79d05f Revert r185872 - "Stop emitting weak symbols into the "coal" sections"
This patch broke `make check-asan` on Mac, causing ld warnings like the following one:

ld: warning: direct access in __GLOBAL__I_a to global weak symbol
___asan_mapping_scale means the weak symbol cannot be overridden at
runtime. This was likely caused by different translation units being
compiled with different visibility settings.

The resulting test binaries crashed with incorrect ASan warnings.

llvm-svn: 185923
2013-07-09 10:00:16 +00:00
Joey Gouly 2d0175e8fb Add MC assembly/disassembly support for VCVT{A, N, P, M} to V8FP.
llvm-svn: 185922
2013-07-09 09:59:04 +00:00
Evgeniy Stepanov 77ef78a0a5 [sanitizer] Intercept realpath and canonicalize_file_name.
Handle realpath(path, NULL) form.

llvm-svn: 185921
2013-07-09 09:53:37 +00:00
Evgeniy Stepanov f60c75a644 [sanitizer] Wrap lines >80 chars.
llvm-svn: 185920
2013-07-09 09:47:36 +00:00
Richard Sandiford 9784649157 [SystemZ] Use MVC for simple load/store pairs
Look for patterns of the form (store (load ...), ...) in which the two
locations are known not to partially overlap.  (Identical locations are OK.)
These sequences are better implemented by MVC unless either the load or
the store could use RELATIVE LONG instructions.

The testcase showed that we weren't using LHRL and LGHRL for extload16,
only sextloadi16.  The patch fixes that too.

llvm-svn: 185919
2013-07-09 09:46:39 +00:00
Richard Sandiford 47660c148c [SystemZ] Use "STC;MVC" for memset
Use "STC;MVC" for memsets that are too big for two STCs or MV...Is yet
small enough for a single MVC.  As with memcpy, I'm leaving longer cases
till later.

The number of tests might seem excessive, but f33 & f34 from memset-04.ll
failed the first cut because I'd not added the "?:" on the calculation
of Size1.

llvm-svn: 185918
2013-07-09 09:32:42 +00:00
Evgeniy Stepanov 8495b84076 [asan] Fix windows build.
llvm-svn: 185917
2013-07-09 09:29:19 +00:00
David Majnemer eeed73b981 InstCombine: Fix typo in comment for visitICmpInstWithInstAndIntCst
llvm-svn: 185916
2013-07-09 09:24:35 +00:00
David Majnemer 72d76275ac InstCombine: variations on 0xffffffff - x >= 4
The following transforms are valid if -C is a power of 2:
(icmp ugt (xor X, C), ~C) -> (icmp ult X, C)
(icmp ult (xor X, C), -C) -> (icmp uge X, C)

These are nice, they get rid of the xor.

llvm-svn: 185915
2013-07-09 09:20:58 +00:00
Daniel Jasper b1f74a8152 Fix alignment of closing brace in braced initializers.
Before:
someFunction(OtherParam, BracedList{
                           // comment 1 (Forcing intersting break)
                           param1, param2,
                           // comment 2
                           param3, param4
             });
After:
someFunction(OtherParam, BracedList{
                           // comment 1 (Forcing intersting break)
                           param1, param2,
                           // comment 2
                           param3, param4
                         });

To do so, the UnwrappedLineParser now stores the information about the
kind of brace in the FormatToken.

llvm-svn: 185914
2013-07-09 09:06:29 +00:00
Evgeniy Stepanov f7f252d025 [sanitizer] Syscall handlers for clock_gettime and clock_getres.
llvm-svn: 185913
2013-07-09 08:54:59 +00:00
David Majnemer 414d4e58aa InstCombine: X & -C != -C -> X <= u ~C
Tests were added in r185910 somehow.

llvm-svn: 185912
2013-07-09 08:09:32 +00:00
Ulrich Weigand 78a5a116a0 [PowerPC] Support .llong and fix .word
This adds support for the .llong PowerPC-specifc assembler directive.
In doing so, I notices that .word is currently incorrect: it is
supposed to define a 2-byte data element, not a 4-byte one.

llvm-svn: 185911
2013-07-09 07:59:25 +00:00
David Majnemer bafa537eb7 Commit r185909 was a misapplied patch, fix it
llvm-svn: 185910
2013-07-09 07:58:32 +00:00
David Majnemer f2a9a513c7 InstCombine: add more transforms
C1-X <u C2 -> (X|(C2-1)) == C1
C1-X >u C2 -> (X|C2) == C1
X-C1 <u C2 -> (X & -C2) == C1
X-C1 >u C2 -> (X & ~C2) == C1

llvm-svn: 185909
2013-07-09 07:50:59 +00:00
Daniel Jasper 6331da0672 Format overloaded operators like other functions.
This fixes llvm.org/PR16328 (at least partially).

Before:
SomeLoooooooooooooooooooooooooooooogType operator<<(
    const SomeLooooooooogType &a, const SomeLooooooooogType &b);

After:
SomeLoooooooooooooooooooooooooooooogType
operator<<(const SomeLooooooooogType &a, const SomeLooooooooogType &b);

llvm-svn: 185908
2013-07-09 07:43:55 +00:00
Hal Finkel dbbf09b28e PPC: Allocate RS spill slot for unaligned i64 load/store
This fixes another bug found by llvm-stress!

If we happen to be doing an i64 load or store into a stack slot that has less
than a 4-byte alignment, then the frame-index elimination may need to use an
indexed load or store instruction (because the offset may not be a multiple of
4, a requirement of the STD/LD instructions). The extra register needed to hold
the offset comes from the register scavenger, and it is possible that the
scavenger will need to use an emergency spill slot. As a result, we need to
make sure that a spill slot is allocated when doing an i64 load/store into a
less-than-4-byte-aligned stack slot.

Because test cases for things like this tend to be fairly fragile, I've
concatenated a few small bugpoint-reduced test cases together to form the
regression test.

llvm-svn: 185907
2013-07-09 06:34:51 +00:00
Jason Molenda c95407b0d5 Add the frame content dumper function call to one more place.
llvm-svn: 185906
2013-07-09 05:36:41 +00:00
Rafael Espindola 0f3de64ddf Compute the size of an archive member in the constructor.
It is always computed the same way (by parsing the header). Doing it in the
constructor simplifies the callers a bit.

llvm-svn: 185905
2013-07-09 05:26:25 +00:00
Rafael Espindola e22176c648 Remove declare but not implemented methods.
llvm-svn: 185904
2013-07-09 05:09:08 +00:00
Jason Molenda 5bd4a4613c Add new information gathering to the lldb & simple backtrace methods:
print five words of memory at the beginning of the stack frame so it's
easier to track where an incorrect saved-fp or saved-pc may have come from.

llvm-svn: 185903
2013-07-09 05:08:14 +00:00
Rui Ueyama cf68e2a1b1 [PECOFF][Writer] Compute the size of a chunk each time it's added rather than all at once.
Contents of ".reloc" section depends on the addresses of other sections, so
the section cannot be created until all the other sections are created and get
their memory addresses (RVAs). That means that computation of section size
needs to be at least two pass.

Techynically there's no reason to compute it all at once, but instead we can
compute the address of a section as added to the output file. Doing so helps
us to create ".reloc" section.

llvm-svn: 185902
2013-07-09 04:44:18 +00:00
Rafael Espindola 747bc07bc3 Move some code out of line. No functionality change.
llvm-svn: 185901
2013-07-09 03:39:35 +00:00
Jim Grosbach 340b6da4f2 X86: Add comment.
llvm-svn: 185900
2013-07-09 02:07:28 +00:00
Jim Grosbach c35388f103 X86 fast-isel: Avoid explicit AH subreg reference for [SU]Rem.
Explicit references to %AH for an i8 remainder instruction can lead to
references to %AH in a REX prefixed instruction, which causes things to
blow up. Do the same thing in FastISel as we do for DAG isel and instead
shift %AX right by 8 bits and then extract the 8-bit subreg from that
result.

rdar://14203849
http://llvm.org/bugs/show_bug.cgi?id=16105

llvm-svn: 185899
2013-07-09 02:07:25 +00:00
Anna Zaks e0ad10404d [analyzer] Fixup for r185609: actually do suppress warnings coming out of std::list.
list is the name of a class, not a namespace. Change the test as well - the previous
version did not test properly.

Fixes radar://14317928.

llvm-svn: 185898
2013-07-09 01:55:00 +00:00
Eli Friedman 999af7bf6e Fix recovery for missing * in objc property.
<rdar://problem/14354144>

llvm-svn: 185897
2013-07-09 01:38:07 +00:00
Richard Smith 701a3523ba Don't give # and ## special treatment when in -traditional-cpp mode. Patch by
Austin Seipp!

llvm-svn: 185896
2013-07-09 01:00:29 +00:00
Richard Smith baf2912b40 Generalize hack allowing 'const' in __has_attribute (etc) to allow any token
with identifier info. This covers most identifier-like entities (other than
the ISO646 keywords).

llvm-svn: 185895
2013-07-09 00:57:56 +00:00
Sean Silva 2f672d610e Make BinaryRef output correctly in case of empty data.
Previously, it would simply output nothing, but it should output an
empty string `""`.

llvm-svn: 185894
2013-07-09 00:54:46 +00:00
Stephen Lin 8e8424eb17 Style fixes: remove unnecessary braces for one-statement if blocks, no else after return, etc. No funcionality change.
llvm-svn: 185893
2013-07-09 00:44:49 +00:00
Ed Maste a7f13f0510 Update exception to match decorator name
llvm-svn: 185891
2013-07-09 00:24:52 +00:00
Eric Christopher 215a77585d Revert "DebugInfo: remove unused helper function getDICompositeType."
This reverts commit r185876 as the functions appear to still be used
by dragonegg.

llvm-svn: 185890
2013-07-09 00:16:56 +00:00
Daniel Malea b3d41a278b Add TestConcurrentEvents test for LLDB's handling of inferior threads
- Test verifies LLDB's handling of inferiors with threads that: hit breakpoints,
  modfiy variables that have watchpoints set, generate user signals, and crash.
- Add a few "stress tests" (with ~100 threads) -- run these with "-l" dotest.py
  flag.
- Fix stop_reason_to_str helper in lldbutil to handle eStopReasonThreadExited.
- Add sort_stopped_threads helper to lldbutil to separate thread lists based
  on stop reason.

Logged llvm.org/pr16566 and llvm.org/pr16567 for bugs exposed.

llvm-svn: 185889
2013-07-09 00:08:01 +00:00
Eli Bendersky 07b0e451ca Fix comment
llvm-svn: 185888
2013-07-08 23:57:07 +00:00
Eli Friedman 544c956b72 Fix crash typo-correcting dependent member func.
PR16561.

llvm-svn: 185887
2013-07-08 23:35:04 +00:00
Nadav Rotem c9c57518ab This patch changes the saved IRBuilder insert point from BasicBlock::iterator to AssertingVH.
Commit 185883 fixes a bug in the IRBuilder that should fix the ASan bot. AssertingVH can help in exposing some RAUW problems.

Thanks Ben and Alexey!

llvm-svn: 185886
2013-07-08 23:31:13 +00:00
Michael Gottesman c1b648f6c0 [objc-arc] Fix assertion in EraseInstruction so that noop on null calls when passed null do not trigger the assert.
The specific case of interest is when objc_retainBlock is passed null.

llvm-svn: 185885
2013-07-08 23:30:23 +00:00
Fariborz Jahanian e61c907792 ObjC migration: more test for migration to
properties.

llvm-svn: 185884
2013-07-08 23:29:51 +00:00
Nadav Rotem 4f396d8043 Fix a bug in IRBuilder::ClearInsertionPoint. The IR Builder needs to reset both the BB and the insert point inside the BB.
llvm-svn: 185883
2013-07-08 23:27:43 +00:00
Bill Wendling 135f476b4f Don't run internalize if we're outputing bit-code and not an object file.
The problem with running internalize before we're ready to output an object file
is that it may change a 'weak' symbol into an internal one, but that symbol
could be needed by an external object file --- e.g. with arclite.

<rdar://problem/14334895>

llvm-svn: 185882
2013-07-08 23:23:03 +00:00