Commit Graph

56778 Commits

Author SHA1 Message Date
Richard Smith 52874ec5d5 [modules] Don't produce duplicate lookup results if the same declaration is
visible through multiple imported modules. No functionality change.

llvm-svn: 229147
2015-02-13 20:17:14 +00:00
Richard Smith 46598206b5 PR17938: This has already been fixed, add regression test.
llvm-svn: 229146
2015-02-13 19:49:59 +00:00
Richard Smith ec216500f2 [modules] Improve llvm-bcanalyzer output on AST files a little. No functionality change.
llvm-svn: 229145
2015-02-13 19:48:37 +00:00
Nico Weber 7ce96b853d Revert r229082 for a bit, it caused PR22577.
llvm-svn: 229123
2015-02-13 16:27:00 +00:00
Chandler Carruth 24f59101b6 Remove a stray blank line that my sort_include.py script found.
llvm-svn: 229093
2015-02-13 09:57:05 +00:00
Chandler Carruth 9828e69a3f [PM] Fix #include order here that I forgot to update before changing it.
llvm-svn: 229092
2015-02-13 09:57:03 +00:00
Chandler Carruth 8f4f5090b4 [PM] Move away from the old llvm/PassManager.h header and its using
declarations and just use the legacy namespace qualifier in this file
and the permanent header name.

The old wrapper header is going away to make LLVM's build more modular,
and without updating Clang I can't easily start to add usage of the new
pass manager to Clang. This should make it more clear in the code which
set of types is doing what.

llvm-svn: 229090
2015-02-13 09:47:49 +00:00
David Majnemer abc482effc MS ABI: Implement /volatile:ms
The /volatile:ms semantics turn volatile loads and stores into atomic
acquire and release operations.  This distinction is important because
volatile memory operations do not form a happens-before relationship
with non-atomic memory.  This means that a volatile store is not
sufficient for implementing a mutex unlock routine.

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

llvm-svn: 229082
2015-02-13 07:55:47 +00:00
Craig Topper 4fb4581716 [X86] Fix test cases that I foolishly copied and modified from another file that had optimizations on. This caused the check patterns to not quite match.
llvm-svn: 229073
2015-02-13 06:27:39 +00:00
Craig Topper 8dd7d0d9c1 [X86] Add range checking on immediate arguments on XOP vpcom builtins.
llvm-svn: 229067
2015-02-13 06:04:48 +00:00
Craig Topper a462482d98 [X86] Add _mm_bslli_si128 and _mm_bsrli_si128 as aliases of _mm_slli_si128 and _mm_srli_si128. This matches Intel documentation and gcc.
llvm-svn: 229066
2015-02-13 06:04:45 +00:00
Craig Topper 51e47418d4 [X86] Simplify some code and remove some -Wshadow disables from intrinsic header.
llvm-svn: 229065
2015-02-13 06:04:43 +00:00
NAKAMURA Takumi ed9b9f8e01 Mark clang/test/CodeGen/exceptions-seh-leave.c as REQUIRES:asserts, for now.
FIXME: Rewrite CHECKs for unnamed BBs and Insts.
llvm-svn: 228990
2015-02-13 00:24:21 +00:00
Reid Kleckner 11c033e8aa SEH: Use the SEHTryEpilogueStack instead of a separate bool
We don't need a bool to track this now that we have a stack for it.

llvm-svn: 228982
2015-02-12 23:40:45 +00:00
Richard Smith 8807e83037 [modules] When collecting declarations to complete a redeclaration chain for an
entity, put the originally-canonical decl IDs in the right places in the redecl
chain rather than reordering them all to the start. If we don't ensure that the
redecl chain order is consistent with the topological module order, we can fail
to make a declaration visible if later declarations are in more IDNSs than
earlier ones (for instance, because the earlier decls are invisible friends).

llvm-svn: 228978
2015-02-12 23:21:45 +00:00
Nico Weber 5779f84000 [ms] Implement codegen for __leave.
Reviewed at http://reviews.llvm.org/D7575

llvm-svn: 228977
2015-02-12 23:16:11 +00:00
Ben Langmuir 18dd78a8fd Mangle the IsSystem bit into the .pcm file name
When mangling the module map path into a .pcm file name, also mangle the
IsSystem bit, which can also depend on the header search paths. For
example, the user may change from -I to -isystem.  This can affect
diagnostics in the importing TU.

llvm-svn: 228966
2015-02-12 21:51:31 +00:00
Richard Smith 527473df0d Fix typoo.
llvm-svn: 228963
2015-02-12 21:23:20 +00:00
David Majnemer cf7d164ec1 Sema: Semantically check _Atomic-qualified pointers
This fixes PR22568.

llvm-svn: 228959
2015-02-12 21:07:34 +00:00
Greg Bedwell 421f669215 Fix dependency generation crash test to run clang and clean up after itself.
Previously the test did not have a RUN: prefix for the clang command.
In addition it was leaving behind a tmp file with no permissions causing issues when
deleting the build directory on Windows.

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

llvm-svn: 228919
2015-02-12 12:41:28 +00:00
Vasileios Kalintiris ea50312b84 [mips] Partially revert r223927: Removing __SIZEOF_INT128__ macro for MIPS64
Partially revert r223927 because LLVM gained support for 128-bit integers
in r227089. Modify and keep the tests that verify the definition of the
macro __SIZEOF_INT128__ for MIPS64 BE & LE in the preprocessor.

llvm-svn: 228918
2015-02-12 11:36:56 +00:00
Filipe Cabecinhas d0c6468a2b Fix tests so they work when the linker is gcc
If the linker is gcc (the default for Generic_ELF toolchains), we end up
passing most of the arguments to the linker.

Some tests were failing to account for this in their usage of *-NOT: lines
and would fail if compiled with
-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-unknown

llvm-svn: 228902
2015-02-12 03:37:55 +00:00
Steven Wu 15b385f854 Add InlineAsmDiagnosticHandler for bitcode input
Summary:
This patch installs an InlineAsmDiagnosticsHandler to avoid the crash
report when the input is bitcode and the bitcode contains invalid inline
assembly. The handler will simply print the same error message that will
print from the backend.

Add CHECK in test-case

Reviewers: echristo, rafael

Reviewed By: rafael

Subscribers: rafael, cfe-commits

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

llvm-svn: 228898
2015-02-12 02:06:55 +00:00
Richard Smith 3c567fce46 More for DR1467: In C++, when initializing an element of an aggregate,
always use the normal copy-initialization rules. Remove a special case that
tries to stay within the list initialization checker here; that makes us do the
wrong thing when list-initialization of an aggregate would not perform
aggregate initialization.

llvm-svn: 228897
2015-02-12 01:55:09 +00:00
Richard Smith 420fa12dfd Improve the "braces around scalar init" warning to determine whether to warn
based on whether "redundant" braces are ever reasonable as part of the
initialization of the entity, rather than whether the initialization is
"top-level". In passing, add a warning flag for it.

llvm-svn: 228896
2015-02-12 01:50:05 +00:00
Nico Weber 1bebad1b86 Wrap to 80 columns. No behavior change.
llvm-svn: 228880
2015-02-11 22:33:32 +00:00
Reid Kleckner a593000f01 Add the 'noinline' attribute to call sites within __try bodies
LLVM doesn't support non-call exceptions, so inlining makes it harder to
catch such asynchronous exceptions.

llvm-svn: 228876
2015-02-11 21:40:48 +00:00
Pete Cooper 05df16d809 Fix REQUIRES lines on tests from r228735. Thanks Kristof for pointing out the missing commas
llvm-svn: 228870
2015-02-11 19:45:13 +00:00
Benjamin Kramer ece036e5a8 CXXInheritance: Modernize removal of hidden virtual base class decls.
NFC.

llvm-svn: 228864
2015-02-11 19:09:16 +00:00
Reid Kleckner 4c209c7e1f Add a comdat to __clang_call_terminate
llvm-svn: 228863
2015-02-11 18:50:13 +00:00
Adrian Prantl 5f66bae411 Fix PR19351. While building up a composite type it is important to use
a non-uniqueable temporary node that is only turned into a permanent
unique or distinct node after it is finished.
Otherwise an intermediate node may get accidentally uniqued with another
node as illustrated by the testcase.

Paired commit with LLVM.

llvm-svn: 228855
2015-02-11 17:45:15 +00:00
Alex Denisov 793e0676f0 Fix amount of diagnostic classes
llvm-svn: 228814
2015-02-11 07:56:16 +00:00
Justin Bogner 2368c82de0 InstrProf: Add a test for PR22531
This is a test for the llvm change in r228793. We need to make sure
that names referred to by coverage end up in the right section, or the
coverage tools won't work.

llvm-svn: 228794
2015-02-11 02:53:03 +00:00
Richard Smith 215f423ff2 Add a warning for direct-list-initialization of a variable with a deduced type
(or of a lambda init-capture, which is sort-of such a variable). The semantics
of such constructs will change when we implement N3922, so we intend to warn on
this in Clang 3.6 then change the semantics in Clang 3.7.

llvm-svn: 228792
2015-02-11 02:41:33 +00:00
Richard Smith 8c37ab5ffd PR21857: weaken an incorrect assertion.
llvm-svn: 228785
2015-02-11 01:48:47 +00:00
Reid Kleckner e7b3f7c70d Emit landing pads for SEH even if nounwind is present
Disabling exceptions applies nounwind to lots of functions. SEH catches
asynch exceptions, so emit the landing pad anyway.

llvm-svn: 228769
2015-02-11 00:00:21 +00:00
Bill Schmidt 911b7b1de6 [PowerPC] Remove the --no-tls-optimize workaround from the clang driver
llvm-svn: 228739
2015-02-10 20:36:08 +00:00
Anton Yartsev b3fa86d6f3 [analyzer] Pass actual state to alloc/dealloc handling functions.
The state obtained from CheckerContext::getState() may be outdated by the time the alloc/dealloc handling function is called (e.g. the state was modified but the transition was not performed). State argument was added to all alloc/dealloc handling functions in order to get the latest state and to allow sequential calls to those functions.

llvm-svn: 228737
2015-02-10 20:13:08 +00:00
Pete Cooper 7dc8af5306 Check for backtraces in tests which are verifying pretty stack traces from a crashing clang.
PrettyStackTrace now requires the ENABLE_BACKTRACES option.  We need to check for that here or these tests fail llvm-lit.

Reviewed by chandlerc

llvm-svn: 228735
2015-02-10 19:53:38 +00:00
Bradley Smith 1a178c5663 [ARM] Add tests for armv6s[-]m being an alias to armv6[-]m
llvm-svn: 228697
2015-02-10 15:16:49 +00:00
Samuel Benzaquen ef621f43ff Add translationUnitDecl matcher.
Summary: Add translationUnitDecl matcher.

Reviewers: alexfh

Subscribers: klimek, cfe-commits

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

llvm-svn: 228694
2015-02-10 14:46:45 +00:00
James Molloy 256f7ecad4 Fix __ldrexd arm intrinsic.
The parameter definition of this API is const volatile __int64*, but it is not defined correctly in clang. Move the 'CD' to the correct location.

Bug tracked here: http://llvm.org/bugs/show_bug.cgi?id=21004

Patch by Daniel Jump!

llvm-svn: 228678
2015-02-10 09:09:04 +00:00
Bob Wilson 14ebd851d9 Do not force "-static" for aarch64 iOS kernel/kext assembly code.
Somehow a check for aarch64 was added to the Darwin toolchain's
isKernelStatic function as part of the initial commit for Apple's
arm64 target (r205100). That check was not in any of Apple's internal
code and no one here knows where it came from. It has been harmless
because "-static" does not change much, if anything, for arm64 iOS code,
but it makes no sense to keep this check.

llvm-svn: 228673
2015-02-10 06:33:04 +00:00
Richard Smith e8292b10a6 [modules] When determining whether a name from a module replaces a name we
already have, check whether the name from the module is actually newer than the
existing declaration. If it isn't, we might (say) replace a visible declaration
with an injected friend, and thus make it invisible (or lose a default argument
or an array bound).

llvm-svn: 228661
2015-02-10 03:28:10 +00:00
Larisse Voufo bcf327af7b A temporary fix for backward compatibility breakages caused by PR12117.
llvm-svn: 228654
2015-02-10 02:20:14 +00:00
Gabor Horvath c18a11397c [Static Analyzer] The name of the checker that reports a bug is added
to the plist output. This check_name field does not guaranteed to be the
same as the name of the checker in the future.

Reviewer: Anna Zaks

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

llvm-svn: 228624
2015-02-09 22:52:26 +00:00
Ben Langmuir 541c202be8 Be more conservative about gethostname()'s truncating behaviour
Don't assume it will provide an error or null-terminate the string on
truncation, since POSIX doesn't guarantee either behaviour (although
Linux and Darwin at least will do the 'right thing').

llvm-svn: 228613
2015-02-09 21:55:44 +00:00
Ben Langmuir 1daf480146 Diagnose timeouts in the LockFileManager and delete the dead lock file
If the lock file manager times out, we should give an error rather than
silently trying to load the existing module.  And delete the
(presumably) dead lock file, since it will otherwise prevent progress in
future invokations. This is unsound since we have no way to prove that
the lock file we are deleting is the same one we timed out on, but since
the lock is only to avoid excessive rebuilding anyway it should be okay.
Depends on llvm r228603.

llvm-svn: 228604
2015-02-09 20:35:13 +00:00
Ben Langmuir 9be5d1ece8 Update r228592 for when gethostname() returns an error
If gethostname() is not successful, just skip adding the hostname to the
module hash.  And don't bother setting hostname[255] = 0, since if
gethostname() is successful, it will be null-terminated already (and if
it's not successful we don't read the string now.

llvm-svn: 228601
2015-02-09 20:13:11 +00:00
Ben Langmuir 521954e813 Add missing include from r228592
llvm-svn: 228594
2015-02-09 19:30:29 +00:00