Commit Graph

151896 Commits

Author SHA1 Message Date
Alexey Samsonov a9db3f9757 [ASan] reimplement strdup() interceptor to get nicer stack traces for memory chunks allocated there
llvm-svn: 184546
2013-06-21 14:41:59 +00:00
Evgeniy Stepanov b58b72e151 [msan] Intercept (v)asprintf.
llvm-svn: 184545
2013-06-21 13:32:26 +00:00
Reid Kleckner f9794c15e7 Disable an assertion death test when using MSVC's assert()
MSVC's debug runtime prints assertion failures in wide characters, which
gtest doesn't understand.

llvm-svn: 184544
2013-06-21 12:58:12 +00:00
Reid Kleckner 23f4c4b64f [ms-cxxabi] Destroy temporary record arguments in the callee
Itanium destroys them in the caller at the end of the full expression,
but MSVC destroys them in the callee.  This is further complicated by
the need to emit EH-only destructor cleanups in the caller.

This should help clang compile MSVC's debug iterators more correctly.
There is still an outstanding issue in PR5064 of a memcpy emitted by the
LLVM backend, which is not correct for C++ records.

Fixes PR16226.

Reviewers: rjmccall

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

llvm-svn: 184543
2013-06-21 12:45:15 +00:00
Evgeniy Stepanov ae4e1ec4e6 [msan] Add keep_going runtime flag.
llvm-svn: 184542
2013-06-21 12:37:58 +00:00
Alexey Samsonov f9e6624663 [ASan] make test for LSan annotations Linux-only for now
llvm-svn: 184541
2013-06-21 12:18:52 +00:00
Alexey Samsonov ad25b50a89 [ASan] Check that ASan user may include and use LSan headers
llvm-svn: 184540
2013-06-21 11:11:44 +00:00
Evgeniy Stepanov 57a40e5a94 [santizer] Disable several EVIOxxx ioctls on older kernels.
llvm-svn: 184539
2013-06-21 10:54:57 +00:00
Manuel Klimek cd5e799833 Improve documentation for AST matchers.
llvm-svn: 184538
2013-06-21 09:59:59 +00:00
Kostya Serebryany 8dba9fb1a2 add Function::removeFnAttr()
llvm-svn: 184536
2013-06-21 07:38:09 +00:00
Manuel Klimek a192ea204b Fix an ordering problem in the test.
The output can be in different orders, which breaks the test in some
situations. I have not yet found out what the root cause of the order
difference is. This fixes our internal build. If it is not the right
solution, feel free to roll back.

llvm-svn: 184535
2013-06-21 07:23:14 +00:00
Michael Gottesman f701d3f864 [objcarcopts] Encapsulate PtrState.RRI.ReleaseMetadata into the methods PtrState.GetReleaseMetadata() and PtrState.SetReleaseMetadata().
llvm-svn: 184534
2013-06-21 07:03:07 +00:00
Michael Gottesman b82a179606 [objcarcopts] Encapsulate PtrState.RRI.IsTailCallRelease into the method PtrState.IsTailCallRelease() and PtrState.SetTailCallRelease().
llvm-svn: 184533
2013-06-21 07:00:44 +00:00
Michael Gottesman 9313225e72 [obcjarcopts] Encapsulate PtrState.RRI.KnownSafe in the methods PtrState.IsKnownSafe and PtrState.SetKnownSafe.
This is apart of a series of patches to encapsulate PtrState.RRI and
make PtrState.RRI a private field of PtrState.

*NOTE* This is actually the second commit in the patch stream. I should
have put this note on the first such commit r184528.

llvm-svn: 184532
2013-06-21 06:59:02 +00:00
Michael Gottesman b7deb4cd79 [objcarcopts] Some more minor code cleanups/comment additions.
llvm-svn: 184531
2013-06-21 06:54:31 +00:00
Tobias Grosser edab1359a0 Use isl_val instead of isl_int in the core of Polly
isl recently introduced isl_val as an abstract interface to represent arbitrary
precision numbers. This interface superseeds the old isl_int interface. In
contrast to the old interface which implemented arbitrary precision arithmetic
using macros that forward to the gmp library, the new library hides the math
library implementation in isl. This allows us to switch the math library used by
isl without affecting users such as Polly.

llvm-svn: 184529
2013-06-21 06:41:31 +00:00
Michael Gottesman 4773a10cfb [objcarcopts] Refactor out the RRInfo merging code from PtrState into RRInfo::Merge.
I also added some comments and performed minor code cleanups.

llvm-svn: 184528
2013-06-21 05:42:08 +00:00
Nadav Rotem e1713e5fcf SLP Vectorizer: do not search for store-chains that are wider than the vector-register size.
llvm-svn: 184527
2013-06-21 04:18:13 +00:00
Michael Gottesman a02291010d [APFloat] Added missing doxygen module closing statement.
llvm-svn: 184526
2013-06-21 04:14:17 +00:00
David Blaikie 512b3f22bb DebugInfo: When asm printing include a '[def]' tag for tag decls that are definitions (& rename the 'fwd' tag to 'decl' for clarity)
This change is version locked with a change in Clang, so expect some
transient buildbot fallout.

llvm-svn: 184525
2013-06-21 03:41:54 +00:00
David Blaikie 03039fe9ba DebugInfo: handle the DI asm printing change to reword '[fwd]' as '[decl]' and add '[def]' for non-decl tag types
This is to make test cases looking for definitions more legible by
making the definition explicit rather than just the absence of '[fwd]'.
This allowed the debug-info-record tests to be rephrased - and in the
interests of reducing the number of individual test cases/invocations we
have, I merged them into one file, separated them with namespaces (&
then moved them to C++ because namespaces are great). If they need to
remain 'C' only tests, they can be moved back. (I didn't group them with
'debug-info-class.cpp' because these tests only apply to
-fno-limit-debug-info)

I removed the pieces of code that would cause these tests to pass under
-flimit-debug-info to ensure the tests remain relevant to their fixes
should we ever improve -flimit-debug-info to catch that kind of code.

This commit is version locked with the corresponding change to
DebugInfo.h in LLVM. Except some transient buildbot fallout.

llvm-svn: 184524
2013-06-21 03:41:46 +00:00
Meador Inge d554a49042 Add a release note for removing the simplify-libcalls pass.
llvm-svn: 184522
2013-06-21 03:08:23 +00:00
Rui Ueyama 55fc544e65 Fix typo in include guard.
llvm-svn: 184521
2013-06-21 02:29:54 +00:00
Eli Friedman 6f0cd6e866 Delete dead code.
llvm-svn: 184520
2013-06-21 02:13:57 +00:00
Eli Friedman 81e4e4e5cc Add test.
llvm-svn: 184519
2013-06-21 02:09:51 +00:00
Sean Silva 8d5ec19730 [docs] Add link to presentation slides.
llvm-svn: 184518
2013-06-21 02:09:29 +00:00
Eli Friedman fd6b3f86bf Delete dead code.
llvm-svn: 184517
2013-06-21 01:49:53 +00:00
Nico Weber 5b0b46ffa2 Add an assert() suggested by Richard.
llvm-svn: 184516
2013-06-21 01:29:36 +00:00
Eli Friedman 319f41382a Add missing test.
llvm-svn: 184515
2013-06-21 01:28:03 +00:00
Sean Silva 7ea06e5a9f [docs] Fix broken link.
llvm-svn: 184514
2013-06-21 01:11:52 +00:00
Sean Silva c4afa6d7ae [yaml2obj][ELF] Allow expressing undefined symbols.
Previously we unconditionally enforced that section references in
symbols in the YAML had a name that was a section name present in the
object, and linked the references to that section. Now, permit empty
section names (already the default, if the `Section` key is not
provided) to indicate SHN_UNDEF.

llvm-svn: 184513
2013-06-21 01:11:48 +00:00
David Blaikie f7bcb0c279 Fix all the silly things I committed in r184509
llvm-svn: 184512
2013-06-21 00:59:44 +00:00
Jordan Rose 4ace1a74c0 [analyzer] Handle zeroing CXXConstructExprs.
Certain expressions can cause a constructor invocation to zero-initialize
its object even if the constructor itself does no initialization. The
analyzer now handles that before evaluating the call to the constructor,
using the same "default binding" mechanism that calloc() uses, rather
than simply ignoring the zero-initialization flag.

As a bonus, trivial default constructors are now no longer inlined; they
are instead processed explicitly by ExprEngine. This has a (positive)
effect on the generated path edges: they no longer stop at a default
constructor call unless there's a user-provided implementation.

<rdar://problem/14212563>

llvm-svn: 184511
2013-06-21 00:59:00 +00:00
Jordan Rose dd91e0c703 [analyzer] Fix stale comment in CallEvent.
No functionality change.

llvm-svn: 184510
2013-06-21 00:58:51 +00:00
David Blaikie b8f2fbbe97 Alternative fix for r184473.
This just seems a bit tidier/more principled. Based on a patch provided
by Adrian - with the only minor tweak that it needed to use
"getTypeOrNull" rather than "getCompletedTypeOrNull" since we don't
store declarations in the CompletedTypes cache.

No intended functionality change.

llvm-svn: 184509
2013-06-21 00:40:50 +00:00
Sean Silva 37e817c8fc Unbreak bots. Didn't realize this was a C++11 feature.
llvm-svn: 184508
2013-06-21 00:33:01 +00:00
Sean Silva b6bfbad290 [docs] Fix formatting.
'\n' was displaying as 'n'

llvm-svn: 184507
2013-06-21 00:27:54 +00:00
Sean Silva aff5125f88 [yaml2obj][ELF] Don't explicitly set `Binding` with STB_*
Instead, just have 3 sub-lists, one for each of
{STB_LOCAL,STB_GLOBAL,STB_WEAK}.

This allows us to be a lot more explicit w.r.t. the symbol ordering in
the object file, because if we allowed explicitly setting the STB_*
`Binding` key for the symbol, then we might have ended up having to
shuffle STB_LOCAL symbols to the front of the list, which is likely to
cause confusion and potential for error.

Also, this new approach is simpler ;)

llvm-svn: 184506
2013-06-21 00:27:50 +00:00
Douglas Gregor 6c92b1fc3d Add test header missing from r184504.
llvm-svn: 184505
2013-06-21 00:22:44 +00:00
Douglas Gregor 600a2f5a21 When building a module, keep *all* declared methods in the global method pool.
As an optimization, we only kept declared methods with distinct
signatures in the global method pool, to keep the method lists
small. Under modules, however, one could have two different methods
with the same signature that occur in different (sub)modules. If only
the later submodule is important, message sends to 'id' with that
selector would fail because the first method (the only one that got
into the method pool) was hidden. When building a module, keep *all*
of the declared methods.

I did a quick check of both module build time and uses of modules, and
found no performance regression despite this causing us to keep more
methods in the global method pool. Fixes <rdar://problem/14148896>.

llvm-svn: 184504
2013-06-21 00:20:25 +00:00
Larisse Voufo 725de3e14f Bug Fix: Template explicit instantiations should not have definitions (FixIts yet to be tested.)
llvm-svn: 184503
2013-06-21 00:08:46 +00:00
Enrico Granata 2c75f11e86 Adding two new markers to the ${var..} specifier
- %N = show the name of the variable
- %> = show the expression path of the variable

llvm-svn: 184502
2013-06-21 00:04:51 +00:00
Eli Friedman 7796da2409 Add a couple more tests.
llvm-svn: 184501
2013-06-20 23:58:09 +00:00
Enrico Granata aad8e48054 In thread and frame format strings, it is now allowed to use Python functions to generate part or all of the output text
Specifically, the ${target ${process ${thread and ${frame specifiers have been extended to allow a subkeyword .script:<fctName> (e.g. ${frame.script:FooFunction})
The functions are prototyped as

def FooFunction(Object,unused)

where object is of the respective SB-type (SBTarget for target.script, ... and so on)

This has not been implemented for ${var because it would be akin to a Python summary which is already well-defined in LLDB

llvm-svn: 184500
2013-06-20 23:40:21 +00:00
Chandler Carruth d6c62b66b5 Update a comment to clarify that searching the target triple bin
directory for programs used by the driver is actually the standard
behavior we want to be compatible with GCC cross compilers -- it isn't
specific to SUSE or any other distro.

Also start fleshing out testing of the different cross compilation
patterns, both with a new very bare-bones tree of cross compilers and by
extending the multilib trees. Currently, we don't correctly model doing
a cross compile using the non-triple target of a bi-arch GCC install,
but I'll add support for that (and tests) next.

llvm-svn: 184499
2013-06-20 23:37:54 +00:00
Nico Weber 95296d4a16 Fix a crash with __flaot128 noticed by Eli.
llvm-svn: 184498
2013-06-20 23:30:30 +00:00
Michael Gottesman 930ecdb77b [checked-arithmetic builtins] Added builtins to enable users to perform checked-arithmetic in c.
This will enable users in security critical applications to perform
checked-arithmetic in a fast safe manner that is amenable to c.

Tests/an update to Language Extensions is included as well.

rdar://13421498.

llvm-svn: 184497
2013-06-20 23:28:10 +00:00
Richard Trieu 72ae1736b3 Add back a condition accidentially removed in r184470.
llvm-svn: 184496
2013-06-20 23:21:54 +00:00
Richard Smith 2f7aa19026 Fix typo in comment. Patch by Matthew Dempsky!
llvm-svn: 184495
2013-06-20 23:03:35 +00:00
Richard Smith 7a5b940952 Fix copy-pasted comment.
llvm-svn: 184494
2013-06-20 23:01:44 +00:00