Commit Graph

185222 Commits

Author SHA1 Message Date
Eric Fiselier 78d325c143 [libcxxabi] Add support for running libc++abi tests with sanitizers
Summary: Add support for LLVM_USE_SANITIZER to the libc++abi tests. Currently, if libc++abi is configured with LLVM_USE_SANITIZER then none of the tests will pass.

Reviewers: jroelofs, mclow.lists, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

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

llvm-svn: 220464
2014-10-23 03:10:43 +00:00
Eric Fiselier 062e6ee121 Add -ldl to libc++ tests when sanitizers are used.
Clang 3.6 no longer links the sanitizer runtime library dependancies when
-nodefaultlibs is used. This patch manually links in a missing dependancy.

llvm-svn: 220463
2014-10-23 02:54:15 +00:00
Peter Collingbourne 244ecf55bd Add llvm-go tool.
This tool lets us build LLVM components within the tree by setting up a
$GOPATH that resembles a tree fetched in the normal way with "go get".

It is intended that components such as the Go frontend will be built in-tree
using this tool.

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

llvm-svn: 220462
2014-10-23 02:33:23 +00:00
Richard Smith 30428bc844 Revert accidentally-committed files in r220460.
llvm-svn: 220461
2014-10-23 02:02:31 +00:00
Richard Smith feb54b6ded Refactor implementation of 'exclude header'.
This was not a real header role, and was never exposed to clients of ModuleMap.
Remove the enumeration value for it and track it as marking the header as
'known' rather than creating an extra KnownHeader entry that *every single*
client ignores.

llvm-svn: 220460
2014-10-23 02:01:19 +00:00
Evgeniy Stepanov 7db296eba5 [msan] Emit checks for constant shadow values under an experimental flag.
Does not change the default behavior.

llvm-svn: 220457
2014-10-23 01:05:46 +00:00
Richard Smith b8afebe259 Fix covered-switch warning.
llvm-svn: 220456
2014-10-23 01:03:45 +00:00
Alexey Samsonov ecfd5c84ca Revert r218541 - Don't link in sanitizer runtimes if -nostdlib/-nodefaultlibs is provided.
This is a sad thing to do, but all the alternatives look ugly.

Looks like there are legitimate cases when users may want to link
with sanitizer runtimes *and* -nodefaultlibs (and ensure they provide
replacements for system libraries). For example, this happens in libc++
test suite.

"-nodefaultlibs" is told to link only the libraries explicitly provided
by the user, and providing "-fsanitize=address" is a clear indication of
intention to link with ASan runtime.
We can't easily introduce analogue of "-print-libgcc-name": linking with
sanitizers runtimes is not trivial: some runtimes are split into several
archive libraries, which are required to be wrapped in
-whole-archive/-no-whole-archive.

If "-fsanitize=whatever" and "-nodefaultlibs" are provided, system library
dependencies of sanitizer runtimes (-lc/-ldl/-lpthread/-lrt) will *not* be
linked, and user would have to link them in manually. Note that this can
cause problems, as failing to provide "-lrt" might lead to crashes in runtime
during ASan initialization. But looks like we should bite this bullet.

See r218541 review thread for the discussion.

llvm-svn: 220455
2014-10-23 00:46:10 +00:00
David Blaikie f299947bfa [DebugInfo] Sink DwarfDebug::addCurrentFnArgument down into DwarfFile.
Variable handling will be sunk into DwarfFile so that abstract variables
and the like can be shared across multiple CUs (to handle cross-CU
inlining, for example).

llvm-svn: 220453
2014-10-23 00:16:05 +00:00
David Blaikie 2b22b1e9a2 [DebugInfo] Add DwarfDebug& to DwarfFile.
Use the DwarfDebug in one function that previously took it as a
parameter, and lay the foundation for use this for other operations
coming soon.

llvm-svn: 220452
2014-10-23 00:16:03 +00:00
David Blaikie 263a008525 [DebugInfo] Remove LexicalScopes::isCurrentFunctionScope and CSE a use of LexicalScopes::getCurrentFunctionScope
Now that we're sure the only root (non-abstract) scope is the current
function scope, there's no need for isCurrentFunctionScope, the property
can be tested directly instead.

llvm-svn: 220451
2014-10-23 00:06:27 +00:00
Nick Lewycky d935be3568 Update the documentation for API change to CreateASTConsumer the rest of the way.
llvm-svn: 220450
2014-10-22 23:57:14 +00:00
Richard Smith 5974ee637e Test files I forgot to svn add in r220448.
llvm-svn: 220449
2014-10-22 23:52:04 +00:00
Richard Smith 306d892076 [modules] Add support for 'textual header' directives.
This allows a module to specify that it logically contains a file, but that
said file is non-modular and intended for textual inclusion. This allows
layering checks to work properly in the presence of such files.

llvm-svn: 220448
2014-10-22 23:50:56 +00:00
Derek Schuff 1fd051bfe8 Fix Mips nacl-mask test for new bundle-aligned label behavior
After r220439 the behavior of labels in bundle-align mode changed,
and I neglected to update this test.

llvm-svn: 220447
2014-10-22 23:32:00 +00:00
Tobias Grosser 1d5c6c71d1 Fix typo
llvm-svn: 220446
2014-10-22 23:26:48 +00:00
Tobias Grosser 878aba4980 Remove incorrect value description for -enable-polly-aligned
The description of the parameter value passed to -enable-polly-aligned did
not make any sense at all, but was just a leftover coming from when this option
was copied form -enable-polly-openmp. We just drop it as the option description
gives sufficient information already.

llvm-svn: 220445
2014-10-22 23:22:41 +00:00
Lang Hames efe7e22673 [MCJIT] Make repeat calls to MCJIT::getPointerToFunction for declarations safe.
MCJIT::getPointerForFunction adds the resulting address to the global mapping.
This should be done via updateGlobalMapping rather than addGlobalMapping, since
the latter asserts if a mapping already exists.

MCJIT::getPointerToFunction is actually deprecated - hopefully we can remove it
(or more likely re-task it) entirely soon. In the mean time it should at least
work as advertised.

<rdar://problem/18727946>

llvm-svn: 220444
2014-10-22 23:18:42 +00:00
Tobias Grosser 01aea5809f Use stringFromIslObj instead of isl_..._dump to print to dbgs()
This makes sure we consistently use dbgs() when printing debug output.
Previously, the code just mixed calls to isl_*_dump() with printing to dbgs()
and was relying for both methods to interact in predictable ways (same output
stream, no unexpected reordering of outputs).

llvm-svn: 220443
2014-10-22 23:16:28 +00:00
David Majnemer 51c8b3e9db Basic: Add ext_delete_void_ptr_operand to -Wdelete-incomplete
This fixes PR21340.

llvm-svn: 220442
2014-10-22 23:03:58 +00:00
Tobias Grosser f084edd0b4 Use braces in multi-statement DEBUG() code [NFC]
By adding braces into the DEBUG statement we can make clang-format format code
such as:

  DEBUG(stmt1(); stmt2())

as multi-line code:

  DEBUG({
    stmt1();
    stmt2();
  });

This makes control-flow in debug statements easier to read.

llvm-svn: 220441
2014-10-22 23:00:03 +00:00
David Majnemer ac7dc6e701 Attempt to fix the build after r220439
llvm-svn: 220440
2014-10-22 22:46:05 +00:00
Derek Schuff 5f708e5ec8 [MC] Attach labels to existing fragments instead of using a separate fragment
Summary:
Currently when emitting a label, a new data fragment is created for it if the
current fragment isn't a data fragment.
This change instead enqueues the label and attaches it to the next fragment
(e.g. created for the next instruction) if possible.

When bundle alignment is not enabled, this has no functionality change (it
just results in fewer extra fragments being created). For bundle alignment,
previously labels would point to the beginning of the bundle padding instead
of the beginning of the emitted instruction. This was not only less efficient
(e.g. jumping to the nops instead of past them) but also led to miscalculation
of the address of the GOT (since MC uses a label difference rather than
emitting a "." symbol).

Fixes https://code.google.com/p/nativeclient/issues/detail?id=3982

Test Plan: regression test attached

Reviewers: jvoung, eliben

Subscribers: jfb, llvm-commits

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

llvm-svn: 220439
2014-10-22 22:38:06 +00:00
Enrico Granata 2809b98c0e Reverting r220435. Jim Ingham and I discussed this for a bit, and we came up with a better command model for this feature
llvm-svn: 220437
2014-10-22 22:33:08 +00:00
Enrico Granata 83f231854a Add a 'type info' command, which can be fed one or more local variables - and it will spew out the list of formatters that apply to each of those variables, if any
llvm-svn: 220435
2014-10-22 22:04:40 +00:00
Zachary Turner 34eb943fb2 Fix C++ compliance issue. string literals must be const char *
llvm-svn: 220434
2014-10-22 21:48:56 +00:00
Enrico Granata 6714a0fd09 More cleanup of the CXXFormatterFunctions header
llvm-svn: 220433
2014-10-22 21:47:27 +00:00
Greg Clayton c3795409c9 Fixed name lookups for names that contain "::" but aren't actually C++ qualified C++ names.
To do this, I fixed the  CPPLanguageRuntime::StripNamespacesFromVariableName() function to use a regular expression that correctly determines if the name passed to it is a qualfied C++ name like "a:🅱️:c" or "b::c". The old version of this function was treating '__54-[NSUserScriptTask executeWithInterpreter:arguments::]_block_invoke' as a match with a basename of ']_block_invoke'.

Also fixed a case in the by name lookup of functions where we wouldn't look for the full name if we actually tried to call CPPLanguageRuntime::StripNamespacesFromVariableName() and got an empty basename back.

<rdar://problem/18527866>

llvm-svn: 220432
2014-10-22 21:47:13 +00:00
Greg Clayton fa226b74d1 Re-use the GetMatchAtIndex() that uses the StringRef to avoid code duplication and properly detect when a capture is invalid and return false.
llvm-svn: 220431
2014-10-22 21:43:15 +00:00
Zachary Turner b5c4971a4c Fix CMake build broken after r220421.
llvm-svn: 220430
2014-10-22 21:18:29 +00:00
David Majnemer 48c28fa6db Parse: Ignore "long" and "short" in #pragma section
This fixes PR21337.

llvm-svn: 220429
2014-10-22 21:08:43 +00:00
Aaron Ballman ce6c67e040 Removing the setLBracLoc and setRBracLoc functions from CompoundStmt -- their only use was with the AST reader, and friendship can be used to handle that. Drive-by rename of "Brac" to "Brace" for the private data members. NFC.
llvm-svn: 220428
2014-10-22 21:06:18 +00:00
Colin LeMahieu 73a51a1a68 [Hexagon] Adding encoding bits for add opcode.
Adding llvm-mc tests.
Removing unit tests.

http://reviews.llvm.org/D5624

llvm-svn: 220427
2014-10-22 20:58:35 +00:00
Reid Kleckner 4f9c0eeff8 Fix up attribute documentation links to MSDN in a nicer way
llvm-svn: 220426
2014-10-22 20:54:25 +00:00
Zachary Turner 10d75b2f95 Make a good guess about where MSVC and Windows SDK libraries are for linking.
When a user has not configured a standard Visual Studio environment
by running vcvarsall, clang tries its best to find Visual Studio
include files and executables anyway.  This patch makes clang also
try to find system and Windows SDK libraries for linking against,
as well.

Reviewed by: Hans Wennborg
Differential Revision: http://reviews.llvm.org/D5873

llvm-svn: 220425
2014-10-22 20:40:43 +00:00
Zachary Turner 0eaf8fc4ac Resubmit "Improve Windows toolchain support for non-standard environments."
This resubmits change r220226.  That change broke the chromium
build bots because chromium it ships an hermetic MSVC toolchain
that it expects clang to fallback to by finding it on the path.

This patch fixes the issue by bumping up the prioritization of PATH
when looking for MSVC binaries.

Reviewed by: Hans Wennborg, Reid Kleckner
Differential Revision: http://reviews.llvm.org/D5892

llvm-svn: 220424
2014-10-22 20:40:28 +00:00
David Peixotto 8da2b93d9f Change the RegionSet type to a SetVector
This patch changes the RegionSet type used in ScopDetection from a
std::set to a llvm::SetVector. The reason for the change is to
ensure deterministic output when printing the result of the
analysis. We had a windows buildbot failure for the modified test
because the output was coming in a different order.

Only one test case needed to be modified for this change. We could
use CHECK-DAG directives instead of CHECK in the analysis test cases
because the actual order of scops does not matter, but I think that
change should be done in a separate patch that modifies all the
appliciable tests. I simply modified the test to reflect the
expected deterministic output.

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

llvm-svn: 220423
2014-10-22 20:39:07 +00:00
Chad Rosier dcd2a3014c [AArch64] Add support for the .inst directive.
This has been implement using the MCTargetStreamer interface as is done in the
ARM, Mips and PPC backends.

Phabricator: http://reviews.llvm.org/D5891
PR20964

llvm-svn: 220422
2014-10-22 20:35:57 +00:00
Enrico Granata e85fe3a4d1 Reorganize some of the data formatters code to simplify CXXFormattersFunction.h. Also, add a synthetic child provider for libc++'s version of std::initializer_list<T>
llvm-svn: 220421
2014-10-22 20:34:38 +00:00
Enrico Granata 4bd54a1544 Fixed a problem in the lldbinline logic where C++ files could not be validly compiled
llvm-svn: 220420
2014-10-22 20:33:34 +00:00
Aaron Ballman eab478c7a8 Create a documentation category for the new calling convention documentation. Drive-by fixing of duplicate target names from a previous commit.
llvm-svn: 220419
2014-10-22 20:33:24 +00:00
Samuel Benzaquen 43dcf2172a Add support for profiling the matchers used.
Summary:
Add support for profiling the matchers used.
This will be connected with clang-tidy to generate a report to determine
and debug slow checks.

Reviewers: alexfh

Subscribers: klimek, cfe-commits

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

llvm-svn: 220418
2014-10-22 20:31:05 +00:00
Reid Kleckner 2633341b4a Try to fix link errors in mingw cmake -DBUILD_SHARED_LIBS=ON
llvm-svn: 220417
2014-10-22 20:20:35 +00:00
Peter Collingbourne 04bca22822 Go: add binding for LLVMSetUnnamedAddr.
llvm-svn: 220416
2014-10-22 20:20:27 +00:00
Reid Kleckner e892ec7e46 Add documentation for calling convention attributes
llvm-svn: 220415
2014-10-22 20:14:27 +00:00
Enrico Granata 50bed5e86f Fix a problem where summary strings could not use a synthetically generated value as part of themselves
llvm-svn: 220414
2014-10-22 20:14:09 +00:00
Rafael Espindola ea1e86e80d Remove unused DiagnosticsEngine::NumErrorsSuppressed member.
Patch by Brad King!

llvm-svn: 220413
2014-10-22 20:09:12 +00:00
Benjamin Kramer 7ad22403fb Strength reduce constant-sized vectors into arrays. No functionality change.
llvm-svn: 220412
2014-10-22 19:55:26 +00:00
David Blaikie 3c7dd6be20 Correct importing of the type of a TemplateArgument
It's not clear how this would be tested - I imagine we should have an
ASTImporter test that RAVs the new AST and checks that all the elements
in it are from this ASTContext and not the foreign one... but I know
little about the ASTImporter and how/where that testing might be done.

(post-commit review feedback from Richard Smith on r219900)

llvm-svn: 220411
2014-10-22 19:54:16 +00:00
Peter Collingbourne a7d1751d98 Do not add -gsplit-dwarf to LLVM_DEFINITIONS.
This would cause the flag to appear in the output of "llvm-config --cppflags",
which should contain only preprocessor flags. The -gsplit-dwarf flag in
particular can cause problems with certain downstream users such as cgo.

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

llvm-svn: 220410
2014-10-22 19:49:19 +00:00