Commit Graph

133647 Commits

Author SHA1 Message Date
Fariborz Jahanian bf38d880d6 Move no explicit ownership warning to SemaType.cpp.
// rdar://12280826

llvm-svn: 163813
2012-09-13 17:29:07 +00:00
Ted Kremenek 12c7799c55 Add tests for r163778.
llvm-svn: 163812
2012-09-13 17:25:51 +00:00
Akira Hatanaka fcdd9b120d mips16: When copying operands in a conditional branch instruction, allow for
immediate operands to be copied.

Patch by Reed Kotler.

llvm-svn: 163811
2012-09-13 17:12:37 +00:00
Jakob Stoklund Olesen 78b9f8fc67 Revert r163761 "Don't fold indexed loads into TCRETURNmi64."
The patch caused "Wrong topological sorting" assertions.

llvm-svn: 163810
2012-09-13 16:52:17 +00:00
Benjamin Kramer 15a257dadd MemCpyOpt: When forming a memset from stores also take GEP constexprs into account.
This is common when storing to global variables.

llvm-svn: 163809
2012-09-13 16:29:49 +00:00
Nadav Rotem 97d44349c9 Fix an 80 char line limit.
llvm-svn: 163808
2012-09-13 16:27:32 +00:00
Nadav Rotem 77a09ebbeb Rename the flag which protects from escaped allocas, which may come from bugs in user code or in the compiler. Also, dont assert if the protection is not enabled.
llvm-svn: 163807
2012-09-13 15:46:30 +00:00
Micah Villmow 1cc19105e7 The current implementation does not allow more than 32 types to be properly handled with target lowering. This doubles the size to 64bit types and easily allows extension to more types.
llvm-svn: 163806
2012-09-13 15:24:43 +00:00
Micah Villmow 857186d5e4 Unify the emission of the calling conventions into a single function to reduce code duplication.
llvm-svn: 163805
2012-09-13 15:11:12 +00:00
Silviu Baranga 157f7c6742 This patch introduces A15 as a target in Clang.
llvm-svn: 163804
2012-09-13 15:06:00 +00:00
Silviu Baranga b47bb94f93 This patch introduces A15 as a target in LLVM.
llvm-svn: 163803
2012-09-13 15:05:10 +00:00
Nadav Rotem 24a822a5cb Fix a dagcombine optimization. The optimization attempts to optimize a bitcast of fneg to integers
by xoring the high-bit. This fails if the source operand is a vector because we need to negate
each of the elements in the vector.

Fix rdar://12281066 PR13813.

llvm-svn: 163802
2012-09-13 14:54:28 +00:00
Nadav Rotem 2bd25fed29 Fix a typo.
llvm-svn: 163801
2012-09-13 14:51:00 +00:00
Filipe Cabecinhas d40ca2f581 Make lldb play nicer with C++11 and fix a (maybe impossible to come by) bug.
llvm-svn: 163800
2012-09-13 14:46:00 +00:00
Bill Wendling fb1f6681a3 Use Nick's suggestion of storing a large NULL into the GV instead of memset, which requires TargetData.
llvm-svn: 163799
2012-09-13 14:32:30 +00:00
NAKAMURA Takumi 3de4e8987e ASTMatchersMacros.h: Appease msvc.
llvm-svn: 163798
2012-09-13 14:28:23 +00:00
Alexey Samsonov 2b8de6a753 [TSan] support building TSan unittests in CMake
llvm-svn: 163797
2012-09-13 14:04:57 +00:00
Alexey Samsonov a7df554138 [TSan] fix a typo in CMakeLists
llvm-svn: 163796
2012-09-13 14:02:40 +00:00
Alexey Samsonov f0aa9148a2 [TSan] Use interface attribute for weak functions that may be overriden by user
llvm-svn: 163795
2012-09-13 13:34:09 +00:00
Daniel Jasper a6bc1f6d35 Create initial support for matching and binding NestedNameSpecifier(Loc)s.
Review: http://llvm-reviews.chandlerc.com/D39
llvm-svn: 163794
2012-09-13 13:11:25 +00:00
Dmitri Gribenko 8994e0c03d Fix Doxygen misuse: refer to parameter names in paragraphs correctly (\arg is
not what most people want -- it starts a new paragraph).

llvm-svn: 163793
2012-09-13 13:11:20 +00:00
Manuel Klimek 024e075597 Add missing accessor.
llvm-svn: 163792
2012-09-13 12:44:47 +00:00
Nadav Rotem 4e9ad06617 Stack Coloring: We have code that checks that all of the uses of allocas
are within the lifetime zone. Sometime legitimate usages of allocas are
hoisted outside of the lifetime zone. For example, GEPS may calculate the
address of a member of an allocated struct. This commit makes sure that
we only check (abort regions or assert) for instructions that read and write
memory using stack frames directly. Notice that by allowing legitimate
usages outside the lifetime zone we also stop checking for instructions
which use derivatives of allocas. We will catch less bugs in user code
and in the compiler itself.

llvm-svn: 163791
2012-09-13 12:38:37 +00:00
Dmitri Gribenko 2bc1d483fe Fix Doxygen issues:
* wrap code blocks in \code ... \endcode;
* refer to parameter names in paragraphs correctly (\arg is not what most
  people want -- it starts a new paragraph).

llvm-svn: 163790
2012-09-13 12:34:29 +00:00
Alexey Samsonov 255f6a5f1a [TSan] Add initial support for buidling ThreadSanitizer runtime library with CMake (currently the only supported platfrom is 64-bit Linux). This patch makes 'clang++ -fthread-sanitizer' work for both clang in the build tree and installed clang
llvm-svn: 163789
2012-09-13 12:18:41 +00:00
Alexey Samsonov 046248c509 [TSan] fix a bunch of warnings reported by pedantic gcc
llvm-svn: 163788
2012-09-13 11:54:41 +00:00
Dmitri Gribenko c1ca1fe255 Fix a doxygen issue: these examples are supposed to be displayed preformatted.
llvm-svn: 163787
2012-09-13 11:42:30 +00:00
Alexey Samsonov ddcb77f287 [Sanitizer] don't use -Werror as default compile flag for sanitizer runtimes - people may use too many distinct/old host compilers
llvm-svn: 163784
2012-09-13 10:23:45 +00:00
Craig Topper 5c8ba0fc83 Fix function name in comment.
llvm-svn: 163783
2012-09-13 07:26:59 +00:00
Nick Lewycky 32feef063d Fix typo in comment.
llvm-svn: 163782
2012-09-13 07:01:25 +00:00
Ted Kremenek b47e6bc597 Conditionally parse documentation comments in system headers by
passing -fretain-comments-from-system-headers.  By default, the
compiler no longer parses such documentation comments, as they
can result in a noticeable compile time/PCH slowdown.

Fixes <rdar://problem/11860820>.

llvm-svn: 163778
2012-09-13 06:41:18 +00:00
Eric Christopher 17674ec8c6 Properly link libpthread_p when using profiling on OpenBSD.
Patch by Brad Smith.

llvm-svn: 163777
2012-09-13 06:32:34 +00:00
NAKAMURA Takumi 4a7a5610ce InitHeaderSearch.cpp: [mingw] Handle DOSish paths only on Win32 hosts.
llvm-svn: 163776
2012-09-13 05:53:23 +00:00
NAKAMURA Takumi 72f05bccc9 clang/lib/Analysis/ObjCNoReturn.cpp: Fix [-Wnewline-eof]
llvm-svn: 163775
2012-09-13 05:53:17 +00:00
Craig Topper 963305b450 Add a new compression type to ModRM table that detects when the memory modRM byte represent 8 instructions and the reg modRM byte represents up to 64 instructions. Reduces modRM table from 43k entreis to 25k entries. Based on a patch from Manman Ren.
llvm-svn: 163774
2012-09-13 05:45:42 +00:00
Greg Clayton f453907a6d Modified the command template to include best practices.
llvm-svn: 163773
2012-09-13 05:35:34 +00:00
Jordan Rose 4c266aa371 Format strings: offer a fixit for Darwin's %D/%U/%O to ISO %d/%u/%o.
<rdar://problem/12061922>

llvm-svn: 163772
2012-09-13 02:11:15 +00:00
Jordan Rose 510260c2bf Format strings: %D, %U, and %O are valid on Darwin (same as %d, %u, %o).
These will warn under -Wformat-non-iso, and will still be rejected
outright on other platforms.

<rdar://problem/12061922>

llvm-svn: 163771
2012-09-13 02:11:03 +00:00
Jim Grosbach 6a465cd8ef MCJIT: relocation addends encoded in the target aren't quite so easy.
The assumption that the target address for the relocation will always be
sizeof(intptr_t) and will always contain an addend for the relocation
value is very wrong. Default to no addend for now.

rdar://12157052

llvm-svn: 163765
2012-09-13 01:24:37 +00:00
Jim Grosbach 54289619bf MCJIT: Make sure to mask off non-type-field bits.
When comparing to the macho relocation type enum value, make sure we're only
comparing against the bits in the RelType that correspond.

llvm-svn: 163764
2012-09-13 01:24:35 +00:00
Jim Grosbach fb7ee84839 MCJIT: Pass the i386 MachO relocation type properly.
llvm-svn: 163763
2012-09-13 01:24:32 +00:00
Anna Zaks f6a5d793d2 [analyzer] Don't reimplement an existing function.
Thanks Jordan.

llvm-svn: 163762
2012-09-13 00:37:12 +00:00
Jakob Stoklund Olesen bfacef45eb Don't fold indexed loads into TCRETURNmi64.
We don't have enough GR64_TC registers when calling a varargs function
with 6 arguments. Since %al holds the number of vector registers used,
only %r11 is available as a scratch register.

This means that addressing modes using both base and index registers
can't be folded into TCRETURNmi64.

<rdar://problem/12282281>

llvm-svn: 163761
2012-09-13 00:25:00 +00:00
Ted Kremenek edf22edca0 Teach -Wuninitialized to recognize common "noreturn" idioms in
Objective-C related to NSException.

Fixes <rdar://problem/12287498>

I debated whether or not this logic should be sunk into the CFG
itself.  It's not clear if we should, as different analyses may
wish to have different policies.  We can re-evaluate this in the
future.

llvm-svn: 163760
2012-09-13 00:21:35 +00:00
Ted Kremenek 8b3f938697 Refactor logic in ExprEngine for detecting 'noreturn' methods
in NSException to a helper object in libAnalysis that can also
be used by Sema.  Not sure if the predicate name 'isImplicitNoReturn'
is the best one, but we can massage that later.

No functionality change.

llvm-svn: 163759
2012-09-13 00:21:31 +00:00
Chad Rosier f83315fd4a Add a few FIXMEs.
llvm-svn: 163758
2012-09-13 00:20:37 +00:00
Bill Wendling 2e6e86606a Introduce the __llvm_gcov_flush function.
This function writes out the current values of the counters and then resets
them. This can be used similarly to the __gcov_flush function to sync the
counters when need be. For instance, in a situation where the application
doesn't exit.
<rdar://problem/12185886>

llvm-svn: 163757
2012-09-13 00:09:55 +00:00
Chad Rosier b261a50b40 [ms-inline asm] Handle the enumeration of input and output expressions in a
more robust way to address a few FIXMEs.

The initial implementation, r163342, built the IR asm string and then tried to
patch things on the fly without enough context.  Specifically, it didn't skip
mnemonics nor did it track with assembly instruction an expression was related
to.  The new implementation patches the operands and then builds the final
IR string.

llvm-svn: 163756
2012-09-13 00:06:55 +00:00
Eric Christopher 31ce693f93 Reapply:
Make clang emit a flag for DW_AT_object_pointer for the artificial
    args where it should (implicit first arguments). FileCheck-ize a
    test as well and update tests to take into account the object
    pointer flag.

    rdar://9797999

llvm-svn: 163755
2012-09-12 23:36:49 +00:00
Eric Christopher e341776c1e Recommit, with fixes:
Add some support for dealing with an object pointer on arguments.

    Part of rdar://9797999

which now supports adding the object pointer attribute to the
subprogram as it should.

llvm-svn: 163754
2012-09-12 23:36:19 +00:00