Alex Lorenz [Tue, 19 Aug 2014 17:32:30 +0000 (17:32 +0000)]
Add tests for coverage mapping generation.
This patch adds the tests for the coverage mapping generation.
Most of the tests check the mapping regions produced by
the generator, and one checks the llvm IR.
Differential Revision: http://reviews.llvm.org/D4847
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215995
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 19 Aug 2014 17:17:40 +0000 (17:17 +0000)]
ext_vector IRGen. Patch to allow indexing into
ext_vector_type's 'hi/lo' components when
used as lvalue. rdar://
18031917 pr20697
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215991
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Tue, 19 Aug 2014 15:55:55 +0000 (15:55 +0000)]
C++1y is now C++14!
Changes diagnostic options, language standard options, diagnostic identifiers, diagnostic wording to use c++14 instead of c++1y. It also modifies related test cases to use the updated diagnostic wording.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215982
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 19 Aug 2014 14:36:35 +0000 (14:36 +0000)]
Move the body out of line to try to fix a buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215980
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 19 Aug 2014 14:32:16 +0000 (14:32 +0000)]
Go back to having a takeModule instead of a getModule.
Returning a std::unique_ptr is more constrained. Thanks to David Blaikie for the
suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215979
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Musman [Tue, 19 Aug 2014 11:27:13 +0000 (11:27 +0000)]
[OPENMP] Extract common superclass from all the loop directives. No functional changes (having common superclass is convenient for future loop directives CodeGen implementation)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215975
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 19 Aug 2014 07:29:03 +0000 (07:29 +0000)]
MS ABI: Update alias template mangling for VC "14" CTP 3
MSVC "14" CTP 3 has fixed it's mangling for alias templates when used as
template-template arguments; update clang to be compatible with this
mangling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215972
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 19 Aug 2014 04:04:30 +0000 (04:04 +0000)]
Update for llvm api change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215968
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 18 Aug 2014 23:02:03 +0000 (23:02 +0000)]
Add a warning flag for an existing diagnostic.
One more, and the number of flags without a dedicated flag fits in two decimal
digits :-)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215946
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 18 Aug 2014 22:10:42 +0000 (22:10 +0000)]
Update link strategy for sanitizer runtime libraries on Linux:
1. Always put static sanitizer runtimes to the front of the linker
invocation line. This was already done for all sanitizers except UBSan:
in case user provides static libstdc++ we need to make sure that new/delete
operator definitions are picked from sanitizer runtimes instead of libstdc++.
We have to put UBSan runtime first for similar reasons: it depends on some
libstdc++ parts (e.g. __dynamic_cast function), and has to go first in
link line to ensure these functions will be picked up from libstdc++.
2. Put sanitizer libraries system dependencies (-ldl, -lpthread etc.) right
after sanitizer runtimes. This will ensure these libraries participate in
the link even if user provided -Wl,-as-needed flag. This should fix PR15823.
3. In case we link in several sanitizer runtimes (e.g. "ubsan", "ubsan_cxx"
and "san"), add system dependencies (-ldl, -lpthread, ...) only once.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215940
91177308-0d34-0410-b5e6-
96231b3b80d8
Ben Langmuir [Mon, 18 Aug 2014 19:32:45 +0000 (19:32 +0000)]
Fix the rececl chain for redeclarations of predefined decls
Predefined decls like 'Protocol' in objc are not loaded from AST files,
so we cannot rely on loading the canonical decl to complete the redecl
chain for redeclarations of these decls. The broken redecl chain was
non-circular, so looping over redecls() would hang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215929
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 18 Aug 2014 19:16:31 +0000 (19:16 +0000)]
Store std::unique_ptr in InMemoryBuffers. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215928
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 18 Aug 2014 18:47:08 +0000 (18:47 +0000)]
return a std::unique_ptr from getMainBufferWithPrecompiledPreamble. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215927
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 18 Aug 2014 18:33:41 +0000 (18:33 +0000)]
Use std::unique_ptr to simplify this code a bit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215926
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 18 Aug 2014 18:17:32 +0000 (18:17 +0000)]
Inline function into only use.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215925
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 18 Aug 2014 16:23:45 +0000 (16:23 +0000)]
Simplify ASTUnit::Parse a bit by passing a std::unique_ptr to it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215900
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Chupin [Mon, 18 Aug 2014 15:38:38 +0000 (15:38 +0000)]
[x32] Handle -m64/-m32 switches by Driver in x32 mode
Summary:
Adding remaining 2 cases handling:
* from x32 to 32 via -m32
* from x32 to 64 via -m64
Test Plan: linux-ld test updated
Reviewers: chandlerc, atanasyan
Subscribers: cfe-commits, zinovy.nis
Differential Revision: http://reviews.llvm.org/D4930
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215899
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Mon, 18 Aug 2014 15:18:56 +0000 (15:18 +0000)]
Fix a memory leak in one of the test unit. Silent coverity warning CID
1095912
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215898
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Mon, 18 Aug 2014 15:13:44 +0000 (15:13 +0000)]
Add the break in the switch case (even if there is llvm_unreachable. It will silent coverity warning CID
1231654
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215897
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Mon, 18 Aug 2014 15:00:11 +0000 (15:00 +0000)]
Update the call to llvm::sys::fs::UniqueID to match the definition: UniqueID(uint64_t Device, uint64_t File)
Fixes CID
1095247
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215896
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 17 Aug 2014 23:49:53 +0000 (23:49 +0000)]
Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215869
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 17 Aug 2014 23:31:27 +0000 (23:31 +0000)]
Use the pointer-like API of ErrorOr.
Thanks to David Blaikie for the suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215866
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 17 Aug 2014 23:27:13 +0000 (23:27 +0000)]
Create a std::unique_ptr earlier.
Thanks to David Blaikie for the suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215865
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 17 Aug 2014 23:12:27 +0000 (23:12 +0000)]
Use std::unique_ptr in a few methods that take ownership.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215864
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 17 Aug 2014 22:20:41 +0000 (22:20 +0000)]
Update for llvm api changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215856
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 17 Aug 2014 22:12:58 +0000 (22:12 +0000)]
Convert a few ownership comments with std::unique_ptr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215853
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Sun, 17 Aug 2014 19:11:18 +0000 (19:11 +0000)]
Do not rely on bin/ path prefix in tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215845
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 17 Aug 2014 16:22:16 +0000 (16:22 +0000)]
Add a test for -no-canonical-prefixes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215836
91177308-0d34-0410-b5e6-
96231b3b80d8
Olivier Goffart [Sun, 17 Aug 2014 13:19:48 +0000 (13:19 +0000)]
Fix assertion on asm register that are "%"
Name might be empty again after we removed the '%' prefix
and Name[0] would assert.
Found on code like
register int foo asm("%" MACRO);
where MACRO was supposed to be defined in a header file that was not found.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215834
91177308-0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Sat, 16 Aug 2014 08:29:27 +0000 (08:29 +0000)]
Uniformed parsing of GNU attributes at line beginnning and added GNU attributes parsing FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215814
91177308-0d34-0410-b5e6-
96231b3b80d8
Ben Langmuir [Sat, 16 Aug 2014 04:54:18 +0000 (04:54 +0000)]
When loading a module with no local entities, still bump the size of the
tables that correspond to ContinuousRangeMaps, since the keys to those
maps need to be unique, or we may map to the wrong offset.
This fixes a crash + malformed AST file seen when loading some modules
that import Cocoa on Darwin, which is a module with no contents except
imports of other modules. Unfortunately I have not been able to find a
reduced test case that reproduces this problem.
Also add an assert that we aren't mapping one key to multiple values
in CRM. We ought to be able to say there are no duplicate keys at all,
but there are a bunch of 0 -> 0 mappings that are showing up, probably
coming from the source location table.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215810
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 16 Aug 2014 02:14:37 +0000 (02:14 +0000)]
Clarify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215808
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 16 Aug 2014 02:11:54 +0000 (02:11 +0000)]
Try indenting to put all the text inside the block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215807
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 16 Aug 2014 02:09:42 +0000 (02:09 +0000)]
Document what's experimental about __attribute__((enable_if)). PR20392
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215806
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 16 Aug 2014 00:26:19 +0000 (00:26 +0000)]
[libclang] Introduce clang_File_isEqual for comparing CXFile handles.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215796
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 15 Aug 2014 23:39:12 +0000 (23:39 +0000)]
Revert "Update for LLVM change (StringSaver)"
This reverts commit r215785 /
170ebf4f19459ae51a9561d0e65c87ee4c9b2c97.
LLD has some StringSavers that need to be updated. One of which takes a
lock and I need to investigate that more closely.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215791
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Fri, 15 Aug 2014 23:21:41 +0000 (23:21 +0000)]
Make sure that vtables referenced from delay-parsed templates get referenced.
This fixes PR20671, see the bug for details. In short, ActOnTranslationUnit()
calls DefineUsedVTables() and only then PerformPendingInstantiations(). But
PerformPendingInstantiations() is what does delayed template parsing, so
vtables only references from late-parsed templates weren't marked used.
As a fix, move the SavePendingInstantiationsAndVTableUsesRAII in
PerformPendingInstantiations() up above the delayed template parsing code.
That way, vtables referenced from templates end up in the RAII object, and the
call to DefineUsedVTables() in PerformPendingInstantiations() marks them used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215786
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 15 Aug 2014 23:18:49 +0000 (23:18 +0000)]
Update for LLVM change (StringSaver)
There is more cleanup to be done here. Once
llvm::sys::Process::GetArgumentVector is switched over to StringSaver,
we can simplify this code a fair amount.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215785
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Fri, 15 Aug 2014 22:29:14 +0000 (22:29 +0000)]
Add a RAII class for saving and restoring instantiations and uses. No behavior change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215780
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Fri, 15 Aug 2014 22:15:00 +0000 (22:15 +0000)]
Wrap to 80 columns, no behavior change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215776
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 15 Aug 2014 21:40:51 +0000 (21:40 +0000)]
Rename as suggested by dblaikie
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215774
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 15 Aug 2014 21:38:36 +0000 (21:38 +0000)]
ArrayRef'ize
I've shied away from ArrayRef'izing CompilerInvocation::CreateFromArgs
in this commit because that is a less localized change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215773
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 15 Aug 2014 21:11:25 +0000 (21:11 +0000)]
DebugInfo: While loop backedge should be attribute to the start of the while statement.
A little test case simplification - this could be simplified further,
though there are certainly interesting connections to the if/else
construct so I'm hesitant to remove that entirely though it does appear
somewhat unrelated.
(similar fix to r215766, related to PR19864)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215768
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 15 Aug 2014 20:59:03 +0000 (20:59 +0000)]
Rename this function to better reflect its purpose
Thanks to dblaikie for the impetus to look for a better name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215767
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 15 Aug 2014 20:50:45 +0000 (20:50 +0000)]
DebugInfo: Fix PR19864 better - attribute the jump at the end of a range-for loop, to the start of the loop.
This avoids debuggers stepping to strange places (like the last
statement in the loop body, or the first statement in the if).
This is not the whole answer, though - similar bugs no doubt exist in
other loops (patches to follow) and attributing exception handling code
to the correct line is also tricky (based on the previous fix to
PR19864, exception handling is still erroneously attributed to the 'if'
line).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215766
91177308-0d34-0410-b5e6-
96231b3b80d8
James Dennett [Fri, 15 Aug 2014 20:04:40 +0000 (20:04 +0000)]
Typo fix in comments: definintion -> definition
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215764
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 15 Aug 2014 19:23:53 +0000 (19:23 +0000)]
[cleanup] Rename this function to better reflect its purpose. NFC.
This also suggests some refactoring to simplify this code. Basically, a
ton of complexity in this argument handling code comes from the need to
save const char *'s in stable storage for pushing onto argv.
It seems like llvm::cl::StringSaver can be improved to cover all the
needs here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215761
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 15 Aug 2014 19:23:50 +0000 (19:23 +0000)]
[cleanup] Range-for'ify this loop. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215760
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 15 Aug 2014 19:23:47 +0000 (19:23 +0000)]
[cleanup] Factor out handling CC1 tools. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215759
91177308-0d34-0410-b5e6-
96231b3b80d8
Samuel Benzaquen [Fri, 15 Aug 2014 19:13:27 +0000 (19:13 +0000)]
Add missing matchers to the dynamic registry.
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D4910
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215757
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 15 Aug 2014 18:58:15 +0000 (18:58 +0000)]
[cleanup] Factor out setting the driver's install dir. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215756
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 15 Aug 2014 18:58:12 +0000 (18:58 +0000)]
[cleanup] Factor out initializing the DianosticOptions. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215755
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 15 Aug 2014 18:58:09 +0000 (18:58 +0000)]
[cleanup] Factor out adjusting "cl.exe" to "clang-cl.exe". NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215754
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 15 Aug 2014 18:50:00 +0000 (18:50 +0000)]
[cleanup] Factor out some checks. NFC.
The core logic in main() is actually pretty simple, but there's lots of
stuff that has been added over time which obscures the flow of the code.
In upcoming patches, I'll be pulling more stuff out of the main
codepath.
I'm open to naming suggestions for these helper functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215751
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 15 Aug 2014 18:12:40 +0000 (18:12 +0000)]
MS ABI: Virtual member pointer thunks are not unnamed_addr
They can be compared for identity.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215745
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 15 Aug 2014 17:44:32 +0000 (17:44 +0000)]
R600: Add ldexp intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215738
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 15 Aug 2014 17:39:00 +0000 (17:39 +0000)]
Objective-C. Do not warn if user is using property-dox syntax to name a
user provided setter name (as declared in @property attribute declaration).
rdar://
18022762
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215736
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 15 Aug 2014 17:14:35 +0000 (17:14 +0000)]
Move some code into a helper function. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215731
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 15 Aug 2014 16:55:25 +0000 (16:55 +0000)]
Use a valid arch name in this triple.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215726
91177308-0d34-0410-b5e6-
96231b3b80d8
Samuel Benzaquen [Fri, 15 Aug 2014 14:20:59 +0000 (14:20 +0000)]
Add isDeleted() matcher for FunctionDecl nodes.
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D4911
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215714
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 15 Aug 2014 12:38:17 +0000 (12:38 +0000)]
Const-correctness, return-after-else, and formatting updates. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215706
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 15 Aug 2014 12:34:08 +0000 (12:34 +0000)]
There are no overloads of this virtual function, nor are there any callers of it. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215705
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 15 Aug 2014 12:29:39 +0000 (12:29 +0000)]
Adding const-qualifiers to auto declarations. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215704
91177308-0d34-0410-b5e6-
96231b3b80d8
Yi Kong [Fri, 15 Aug 2014 08:53:22 +0000 (08:53 +0000)]
arm_acle.h: Small cleanup
Since __SIZEOF_LONG_LONG__ is always defined as 8 on ARM targets,
there's no point in checking this. NFC.
Patch by Moritz Roth.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215697
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 15 Aug 2014 05:00:39 +0000 (05:00 +0000)]
clang-format: Prefer breaking after return type over template param
Before:
typename
aaaaaaaaaa<aaaaaa>::
aaaaaaaaaaa aaaaaaaaaa<
aaaaaa>::
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(bool *
aaaaaaaaaaaaaaaaaa,
bool *aa) {}
After:
typename
aaaaaaaaaa<aaaaaa>::
aaaaaaaaaaa
aaaaaaaaaa<aaaaaa>::
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
bool *
aaaaaaaaaaaaaaaaaa, bool *aa) {}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215693
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 15 Aug 2014 05:00:35 +0000 (05:00 +0000)]
clang-format: [proto] Understand text-format nesting without :
Before:
option (MyProto.options) = {
field_c : "OK" msg_field{field_d : 123}
};
After:
option (MyProto.options) = {
field_c : "OK"
msg_field{field_d : 123}
};
(Note that the colon after "msg_field" is optional).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215692
91177308-0d34-0410-b5e6-
96231b3b80d8
Keno Fischer [Fri, 15 Aug 2014 01:39:12 +0000 (01:39 +0000)]
Make sure CallExpr::getLocStart doesn't segfault
Summary:
When the CallExpr passed to Sema::ConvertArgumentsForCall has all default parameters, and the number of actual arguments passed is zero, this function will segfault in the call to Call->getLocStart() if the Callee has an invalid getLocStart(), the reason being that since ConvertArgumentsForCall has set the correct number of arguments, but has not filled them in yet, getLocStart() will try to access the first (not yet existent) argument and thus segfaults.
This fixes that by making getLocStart return an invalid source location if the queried argument is NULL rather than segfaulting.
Reviewers: rnk
Reviewed By: rnk
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4917
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215686
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 14 Aug 2014 23:34:52 +0000 (23:34 +0000)]
Limit our MSVC compat hack for nested names from dependent bases
Previously, any undeclared unqualified id starting a nested name
specifier in a dependent context would have its lookup retried during
template instantiation. Now we limit that retry hack to methods of a
class with dependent bases. Free function templates in particular are
no longer affected by this hack.
Also, diagnose this as a Microsoft extension. This has the downside that
template authors may see this warning *and* an error during
instantiation time about this identifier. Fixing that will probably
require formalizing some kind of "delayed" identifier, instead of our
ad-hoc solutions of forming dependent AST nodes when lookup fails.
Based on a patch by Kim Gräsman!
Differential Revision: http://reviews.llvm.org/D4854
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215683
91177308-0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Thu, 14 Aug 2014 21:54:34 +0000 (21:54 +0000)]
Thread Safety Analysis: Move -Wthread-safety-negative out of the
-Wthread-safety umbrella flag, pending updates to documentation. The flag
works, but is likely to be confusing to existing users of -Wthread-safety.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215679
91177308-0d34-0410-b5e6-
96231b3b80d8
Brad Smith [Thu, 14 Aug 2014 21:43:07 +0000 (21:43 +0000)]
Use a switch statement for IsIntegratedAssemblerDefault().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215678
91177308-0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Thu, 14 Aug 2014 21:40:15 +0000 (21:40 +0000)]
Thread safety analysis: add -Wthread-safety-verbose flag, which adds additional notes that are helpful when compiling statistics on thread safety warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215677
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 14 Aug 2014 20:30:52 +0000 (20:30 +0000)]
[modules] Turn off a broken optimization: we need to pick up implicit special
members from all redefinitions of a class that have them, in case the special
member is defined in one module but only declared in another.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215675
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 14 Aug 2014 19:47:06 +0000 (19:47 +0000)]
Don't Lex past EOF when lexing _Pragma
Fixes PR20662.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215672
91177308-0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Thu, 14 Aug 2014 19:17:06 +0000 (19:17 +0000)]
Thread Safety Analysis: fix to improve handling of references to guarded
data members and range based for loops.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215671
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Thu, 14 Aug 2014 19:12:41 +0000 (19:12 +0000)]
Use the big endian emulations for NetBSD/arm in EB mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215670
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Thu, 14 Aug 2014 17:17:57 +0000 (17:17 +0000)]
[AVX512] Add FMA intrinsics
Part of <rdar://problem/
17688758>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215666
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Thu, 14 Aug 2014 16:04:47 +0000 (16:04 +0000)]
Use the proper post-order traversal in LiveVariables analysis,
to recover the performance after r214064.
Also sorts out the naming for PostOrderCFGView, ReversePostOrderCFGView,
BackwardDataflowWorklist and ForwardDataflowWorklist, to match the accepted
terminology.
Also unifies BackwardDataflowWorklist and ForwardDataflowWorklist to share
the "worklist for prioritization, post-order traversal for fallback" logic,
and to avoid repetitive sorting.
Also cleans up comments in the affected area.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215650
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 14 Aug 2014 15:44:29 +0000 (15:44 +0000)]
Revert "CodeGen: When bitfields fall on natural boundaries, split them up"
It fits better with LLVM's memory model to try to do this in the
backend. Specifically, narrowing wide loads in the backends should be
relatively straightforward and is generally valuable, whereas widening
loads tends to be very constrained.
Discussion here:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-
20140811/112581.html
This reverts commit r215614.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215648
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 14 Aug 2014 15:14:51 +0000 (15:14 +0000)]
Delete support for AuroraUX.
auroraux.org is not resolving.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215644
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Thu, 14 Aug 2014 13:07:35 +0000 (13:07 +0000)]
Split a large unit-test, so that it doesn't exceed stack frame size in certain test environments
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215639
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Thu, 14 Aug 2014 11:36:03 +0000 (11:36 +0000)]
clang-format: Fix AlwaysBreakAfterDefinitionReturnType in Stroutrup style
Before:
template <class T>
T *f(T &c) // Problem here: no line break before f
{
return NULL;
}
After:
template <class T>
T *
f(T &c)
{
return NULL;
}
Patch by Marek Kurdej, thank you!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215633
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Thu, 14 Aug 2014 10:53:19 +0000 (10:53 +0000)]
clang-format: Support chained dereferenced assignments.
Before:
x = * a(x) = *a(y);
After:
x = *a(x) = *a(y);
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215632
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Thu, 14 Aug 2014 10:52:56 +0000 (10:52 +0000)]
Pekka Jaaskelainen [Thu, 14 Aug 2014 09:37:50 +0000 (09:37 +0000)]
Fix a crash when compiling blocks in OpenCL with multiple
address spaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215629
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 14 Aug 2014 06:35:08 +0000 (06:35 +0000)]
Parse: Don't attempt to act on #pragma init_seg when not targeting MSVC
It doesn't really make sense to try and do stuff with #pragma init_seg
when targeting non-Microsoft platforms; notions like library vs user
initializers don't exist for other targets.
This fixes PR20639.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215618
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 14 Aug 2014 04:11:33 +0000 (04:11 +0000)]
[modules] Factor .td-generated diagnostics stuff out into its own module; this
avoids users of AllDiagnostics.h from needing to pregenerate *all* generated
headers. Hopefully this will make my modules buildbot happier...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215617
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 14 Aug 2014 03:30:27 +0000 (03:30 +0000)]
[modules] Don't assert if the same imported class template specialization
declaration has its definition instantiated in two sibling modules and they use
a partial specialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215616
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 14 Aug 2014 02:42:10 +0000 (02:42 +0000)]
CodeGen: When bitfields fall on natural boundaries, split them up
Currently when laying out bitfields that don't need any padding, we
represent them as a wide enough int to contain all of the bits. This
can be hard on the backend since we'll do things like represent stores
to a few bits as loading an i144, masking it with a large constant,
and storing it back.
This turns up in less pathological cases where we load and mask 64 bit
word on a 32 bit platform when we actually only need to access 32 bits.
This leads to bad code being generated in most of our 32 bit backends.
In practice, there are often natural breaks in bitfields, and it's a
fairly simple and effective heuristic to split these fields into legal
integer sized chunks when it will be equivalent (ie, it won't force us
to add any extra padding).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215614
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 14 Aug 2014 02:21:01 +0000 (02:21 +0000)]
[modules] When we merge together multiple class template specialization
definitions (because some other declaration declares a special member that
isn't present in the canonical definition), we need to search *all* of them; we
can't just stop when we find the requested name in any of the definitions,
because that can fail to find things (and in particular, it can fail to find
the member of the canonical declaration and return a bogus ODR failure).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215612
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 14 Aug 2014 00:49:23 +0000 (00:49 +0000)]
Sema: Permit nullptr template args in MSVC compat mode
This fixes a regression I caused back in r211766.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215609
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 14 Aug 2014 00:23:30 +0000 (00:23 +0000)]
clang/test/Modules/cxx-irgen.cpp: Let it tolerant of x86_thiscallcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215607
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 13 Aug 2014 23:55:54 +0000 (23:55 +0000)]
Simplify some CodeGenTypes::arrangeXXX functions. No functionality change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215606
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 13 Aug 2014 23:38:04 +0000 (23:38 +0000)]
Objective-C. Handle case of multiple class methods
found in global pool as well. rdar://
16808765
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215603
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 13 Aug 2014 23:29:23 +0000 (23:29 +0000)]
Whitespace fix.
Sorry about the noise.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215601
91177308-0d34-0410-b5e6-
96231b3b80d8
Yi Kong [Wed, 13 Aug 2014 23:20:15 +0000 (23:20 +0000)]
ARM: Add mappings for ACLE prefetch intrinsics
Implement __pld, __pldx, __pli and __plix builtin intrinsics as specified in
ARM ACLE 2.0.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215599
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 13 Aug 2014 22:14:49 +0000 (22:14 +0000)]
clang/test/Index/index-module.m: Tweak expressions to meet dos path on win32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215592
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Wed, 13 Aug 2014 21:54:06 +0000 (21:54 +0000)]
test/CodeGen: Don't rely on a value's number in check lines
The tests in r215568 hard code a value as %0 in their checks. This
isn't correct in asserts builds.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215585
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 13 Aug 2014 21:24:14 +0000 (21:24 +0000)]
Objective-C. Minor refactoring of my last patch.
// rdar://
16808765
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215581
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 13 Aug 2014 21:15:09 +0000 (21:15 +0000)]
[modules] Fix a rejects-valid resulting from emitting an inline function
recursively within the emission of another inline function. This ultimately
led to us emitting the same inline function definition twice, which we then
rejected because we believed we had a mangled name conflict.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215579
91177308-0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 13 Aug 2014 21:07:35 +0000 (21:07 +0000)]
Objective-C. This patch is to resolve the method used in method
expression to the best method found in global method pools.
This is wip. // rdar://
16808765
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215577
91177308-0d34-0410-b5e6-
96231b3b80d8