]>
granicus.if.org Git - clang/log
Reid Kleckner [Wed, 13 Nov 2013 22:58:53 +0000 (22:58 +0000)]
-fms-extensions: Recognize _alloca as an alias for the alloca builtin
Differential Revision: http://llvm-reviews.chandlerc.com/D1989
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194617
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 13 Nov 2013 22:47:22 +0000 (22:47 +0000)]
Only provide MS builtins when -fms-extensions is on
We already have builtins that are only available in GNU mode, so this
mirrors that.
Reviewers: rsmith
Differential Revision: http://llvm-reviews.chandlerc.com/D2128
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194615
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Wed, 13 Nov 2013 22:26:04 +0000 (22:26 +0000)]
libclang does not depend directly on clangFormat; but clangIndex does
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194611
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Wed, 13 Nov 2013 22:16:51 +0000 (22:16 +0000)]
Documentation parsing: move comment-to-XML conversion routines to libIndex
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194610
91177308 -0d34-0410-b5e6-
96231b3b80d8
Warren Hunt [Wed, 13 Nov 2013 22:16:13 +0000 (22:16 +0000)]
No functional change. Renaming a variable in RecordLayoutBuilder and
improving comments to make documentation more accurate.
Differential Revision:http://llvm-reviews.chandlerc.com/D2172
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194609
91177308 -0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Wed, 13 Nov 2013 21:40:17 +0000 (21:40 +0000)]
Add test case for r194593
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194606
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Wed, 13 Nov 2013 20:19:22 +0000 (20:19 +0000)]
Make inline functions in a header file static.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194603
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 13 Nov 2013 20:05:44 +0000 (20:05 +0000)]
[AArch64] Tests for legacy AArch32 NEON scalar shift by immediate instructions.
A number of non-overloaded intrinsics have been replaced by thier overloaded
counterparts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194599
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 13 Nov 2013 18:46:32 +0000 (18:46 +0000)]
Drop windows specific handling of equivalent destructors.
Now that the relevant tests use -mconstructor-aliases and the missing
features have been implemented, we can just drop this.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194595
91177308 -0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Wed, 13 Nov 2013 18:31:23 +0000 (18:31 +0000)]
Adds ARM backend options: -mrestrict-it and -mno-restrict-it
To support the generation of IT block in Thumbv7 way or
Thumbv8 way
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194593
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 13 Nov 2013 18:20:31 +0000 (18:20 +0000)]
[objcmt] Use FileIDs directly instead of their hash value.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194590
91177308 -0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Wed, 13 Nov 2013 16:03:43 +0000 (16:03 +0000)]
No need to use CGM.getCXXABI() from CXXABI
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194584
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Wed, 13 Nov 2013 14:04:17 +0000 (14:04 +0000)]
Correctly mark first token in the presence of UTF-8 BOM.
Summary: Fixes http://llvm.org/PR17753
Reviewers: klimek
Reviewed By: klimek
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D2159
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194576
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Wed, 13 Nov 2013 13:23:27 +0000 (13:23 +0000)]
Add an optional mapping from source paths to source contents.
This allows compilation database implementations for distributed build
systems to hand all data to the client to make parsing independent of
the file system.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194571
91177308 -0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Wed, 13 Nov 2013 12:22:39 +0000 (12:22 +0000)]
Add -fprofile-sample-use to Clang's driver.
This adds a new option -fprofile-sample-use=filename to Clang. It
tells the driver to schedule the SampleProfileLoader pass and passes
on the name of the profile file to use.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194567
91177308 -0d34-0410-b5e6-
96231b3b80d8
Serge Pavlov [Wed, 13 Nov 2013 06:57:53 +0000 (06:57 +0000)]
Warn on duplicate function specifier
This patch fixes PR8264. Duplicate qualifiers already are diagnozed,
now the same diagnostics is issued for duplicate function specifiers.
Differential Revision: http://llvm-reviews.chandlerc.com/D2025
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194559
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Wed, 13 Nov 2013 02:01:24 +0000 (02:01 +0000)]
Fix closing namespace comment to reflect reality
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194543
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 13 Nov 2013 01:24:28 +0000 (01:24 +0000)]
PR10837: Warn if a null pointer constant is formed by a zero integer constant
expression that is not a zero literal, in C. Patch by Ivan A. Kosarev!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194540
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 13 Nov 2013 00:18:50 +0000 (00:18 +0000)]
unittests/Tooling/ToolingTest.cpp: Suppress new tests on win32, due to handling of virtual file, such "/a.cc".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194534
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 13 Nov 2013 00:08:36 +0000 (00:08 +0000)]
ObjectiveC migrator. Place use of NS_NONATOMIC_IOSONLY
on inferred property attribute under
-objcmt-ns-nonatomic-iosonly option.
// rdar://
15442742
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194532
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 12 Nov 2013 22:35:26 +0000 (22:35 +0000)]
clang-cl: parse the /Yc flag (PR17895)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194523
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Tue, 12 Nov 2013 22:16:08 +0000 (22:16 +0000)]
Documentation parsing: add support for \throws \throw \exception commands
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194521
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 12 Nov 2013 22:06:46 +0000 (22:06 +0000)]
Avoid producing mismatched comdats.
The problem was that given
template<typename T>
struct foo {
~foo() {}
};
template class foo<int>;
We would produce a alias, creating a comdat with D0 and D1, since the symbols
have to be weak. Another TU is not required to have a explicit template
instantiation definition or an explict template instantiation declaration and
for
template<typename T>
struct foo {
~foo() {}
};
foo<int> a;
we would produce a comdat with only one symbol in it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194520
91177308 -0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Tue, 12 Nov 2013 21:42:50 +0000 (21:42 +0000)]
add intrinsics: __builtin_arm_{dmb,dsb} for ARM
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194513
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 12 Nov 2013 20:50:26 +0000 (20:50 +0000)]
ObjectiveC. availability of Array/Dictionary subscripting
is further restricted in legacy runtime to deployment target
of 10.7 and later. // rdar://
15363492
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194507
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 12 Nov 2013 19:25:50 +0000 (19:25 +0000)]
ObjectiveC migrator. Another alternative to
"atomic" or "nonatomic" for properties is
NS_NONATOMIC_IOSONLY. Use it if available.
// rdar://
15442742
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194503
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 12 Nov 2013 19:21:50 +0000 (19:21 +0000)]
clang-cl: parse the /GT option
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194502
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Tue, 12 Nov 2013 18:07:35 +0000 (18:07 +0000)]
Remove trailing spaces
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194498
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Tue, 12 Nov 2013 17:53:18 +0000 (17:53 +0000)]
Add test for injecting diagnostic consumers into a ClangTool.
As suggested by pcc on 194226.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194494
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Tue, 12 Nov 2013 17:50:13 +0000 (17:50 +0000)]
Remove extra whitespace instead of breaking the line in comments when possible.
Summary: Solves the problem described in http://llvm.org/PR17756
Reviewers: klimek
Reviewed By: klimek
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D2131
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194493
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Tue, 12 Nov 2013 17:30:49 +0000 (17:30 +0000)]
Do not insert backslashes, when breaking line comments after preprocessor directives.
Summary: This solves http://llvm.org/PR17536
Reviewers: klimek, djasper
Reviewed By: klimek
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D2142
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194491
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 12 Nov 2013 17:08:46 +0000 (17:08 +0000)]
ObjectiveC driver change. re-apply patch reverted in
r194450 with a modified test. // rdar://
15363492
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194489
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Tue, 12 Nov 2013 17:01:53 +0000 (17:01 +0000)]
Upgrade the VS solution to 2012.
Now we can compile a VSPackage that works with VS 2010-2013 from within VS 2012.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194488
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Tue, 12 Nov 2013 15:25:18 +0000 (15:25 +0000)]
Fix key bindings for VS 2010.
Set the default key-binding only in the text editor; the
global binding of ctrl-r,ctrl-f was already taken in VS 2010.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194482
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Tue, 12 Nov 2013 15:02:53 +0000 (15:02 +0000)]
Recreated the ClangFormat VSPackage with VS 2010.
The generated package is now compatible with VS 2010 - 2013.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194480
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Tue, 12 Nov 2013 13:56:36 +0000 (13:56 +0000)]
Revert unintentional commit from r194477.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194478
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Tue, 12 Nov 2013 13:54:22 +0000 (13:54 +0000)]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194477
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 12 Nov 2013 12:56:01 +0000 (12:56 +0000)]
[mips][msa] Enable inlinse assembly for MSA.
Like GCC, this re-uses the 'f' constraint and a new 'w' print-modifier:
asm ("ldi.w %w0, 1", "=f"(result));
Unlike GCC, the 'w' print-modifer is not _required_ to produce the intended
output. This is a consequence of differences in the internal handling of
the registers in each compiler. To be source-compatible between the
compilers, users must use the 'w' print-modifier.
MSA registers (including control registers) are supported in clobber lists.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194476
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 12 Nov 2013 11:38:20 +0000 (11:38 +0000)]
[mips] Added fpu register tests to tests/CodeGen/mips-clobber-reg.c
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194474
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 12 Nov 2013 11:15:48 +0000 (11:15 +0000)]
[mips] Small fixes to test/CodeGen/mips-clobber-reg.c
Fixed the following:
- Whitespace at end of most lines
- $11 test actually testing $10
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194473
91177308 -0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Tue, 12 Nov 2013 10:09:34 +0000 (10:09 +0000)]
XCore target requires preferred alignment.
The xcore llvm backend does not handle 8 byte alignment viz:
"%BadAlignment = alloca i64, align 8"
So getPreferredTypeAlign() must never overalign.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194462
91177308 -0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Tue, 12 Nov 2013 10:09:30 +0000 (10:09 +0000)]
XCore target Type defines.
Change SizeType, PtrDiffType, IntPtrType, WCharType, WIntType
to follow the XMOS llvm-gcc front end's settings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194461
91177308 -0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Tue, 12 Nov 2013 10:09:22 +0000 (10:09 +0000)]
XCore target has -fno-use-cxa-atexit as default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194460
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 12 Nov 2013 09:16:15 +0000 (09:16 +0000)]
Tests for core issue 201-215.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194458
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 12 Nov 2013 04:53:19 +0000 (04:53 +0000)]
Keep the old function order in CodeGenModule::applyReplacements.
The original decls are created when used. The replacements are created at the
end of the TU in reverse order.
This makes the original order far better for testing. This is particularly
important since the replacement logic could be used even when
-mconstructor-aliases is not used, but that would make many tests hard to read.
This is a fixed version of r194357 which handles replacing a destructor with
another which is an alias to a third one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194452
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 12 Nov 2013 04:33:56 +0000 (04:33 +0000)]
This reverts commit r194435 and r194434.
Trying to get the bots green.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194450
91177308 -0d34-0410-b5e6-
96231b3b80d8
Faisal Vali [Tue, 12 Nov 2013 03:56:08 +0000 (03:56 +0000)]
COSMETIC: Fix 80 column overflow in some comments introduced in r194188
no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194449
91177308 -0d34-0410-b5e6-
96231b3b80d8
Faisal Vali [Tue, 12 Nov 2013 03:48:27 +0000 (03:48 +0000)]
A quick fix to PR17877 that was introduced by r194188 (generic-lambda-capturing) that broke libc++.
See http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-November/033369.html for discussion on cfe-dev.
This fix explicitly checks whether we are within the declcontext of a lambda's call operator - which is what I had intended to be true (and assumed would be true if getCurLambda returns a valid pointer) before checking whether a lambda can capture the potential-captures of the innermost lambda.
A deeper fix (that addresses why getCurLambda() returns a valid pointer when perhaps it shouldn't?) - as proposed by Richard Smith in http://llvm.org/bugs/show_bug.cgi?id=17877 - has been suggested as a FIXME.
Patch was LGTM'd by Richard (just barely :)
http://llvm-reviews.chandlerc.com/D2144
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194448
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 12 Nov 2013 02:58:11 +0000 (02:58 +0000)]
Remove C++11ism.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194446
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 12 Nov 2013 02:42:08 +0000 (02:42 +0000)]
Extra test for r194444.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194445
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 12 Nov 2013 02:41:45 +0000 (02:41 +0000)]
Rather than duplicating extension diagnostics to allow them to cause a
substitution failure, allow a flag to be set on the Diagnostic object,
to mark it as 'causes substitution failure'.
Refactor Diagnostic.td and the tablegen to use an enum for SFINAE behavior
rather than a bunch of flags.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194444
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 12 Nov 2013 02:22:34 +0000 (02:22 +0000)]
-fms-compatibility: Use C++98 null pointer constant rules
Patch by Will Wilson!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194441
91177308 -0d34-0410-b5e6-
96231b3b80d8
Faisal Vali [Tue, 12 Nov 2013 01:46:33 +0000 (01:46 +0000)]
COSMETIC: Right justify an asterix in the previous refactoring.
Hopefully Richard won't notice this terrible egregiocity - clearly the work of a malevolent poltergeist - fixed now ;)
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194439
91177308 -0d34-0410-b5e6-
96231b3b80d8
Faisal Vali [Tue, 12 Nov 2013 01:40:44 +0000 (01:40 +0000)]
REFACTOR: Have PushLambdaScope return the LambdaScopeInfo that it creates.
No Functionality change.
This refactoring avoids having to call getCurLambda right after PushLambdaScope, to obtain the LambdaScopeInfo that was created during the call to PushLambdaScope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194438
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 12 Nov 2013 00:08:23 +0000 (00:08 +0000)]
ObjectiveC. Try to unbreak buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194435
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 11 Nov 2013 23:44:52 +0000 (23:44 +0000)]
ObjectiveC. By default allow array/dictionary subscripting in
ObjectiveC legacy runtime too. // rdar://
15363492
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194434
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 11 Nov 2013 22:55:13 +0000 (22:55 +0000)]
Add a testcase where we replace a destructor with an alias.
This is a reduced testcase from a cast to Function failing during bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194430
91177308 -0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 11 Nov 2013 22:10:46 +0000 (22:10 +0000)]
[mips] Partially revert r193640. Stack alignment should not be determined by
the floating point register mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194426
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Mon, 11 Nov 2013 20:51:44 +0000 (20:51 +0000)]
Revert "Using an invalid -O falls back on -O3 instead of an error"
This reverts commit r194403.
Was breaking too many tests...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194420
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Mon, 11 Nov 2013 20:46:40 +0000 (20:46 +0000)]
Revert "Remove -### from the -O20 test, it was failing the test (?)"
This reverts commit r194414.
Was breaking too many tests...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194419
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Mon, 11 Nov 2013 19:54:40 +0000 (19:54 +0000)]
Remove -### from the -O20 test, it was failing the test (?)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194414
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Mon, 11 Nov 2013 19:39:37 +0000 (19:39 +0000)]
Improve the documentation (bis) with Arthur and Chandler's comments
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194412
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 11 Nov 2013 19:35:06 +0000 (19:35 +0000)]
Fix pr17875.
The assert this patch deletes was valid only when aliasing D2 to D1, not when
looking at a base class. Since the assert was in the path where we had already
decided to not produce an alias, just drop it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194411
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 11 Nov 2013 19:11:22 +0000 (19:11 +0000)]
Darwin(ish): we don't want __ARM_EABI__ even on v7a embedded targets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194408
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 11 Nov 2013 19:11:19 +0000 (19:11 +0000)]
[AArch64] The shift right/left and insert immediate builtins expect 3
source operands, a vector, an element to insert, and a shift amount.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194407
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Mon, 11 Nov 2013 19:04:47 +0000 (19:04 +0000)]
Improve the documentation of the optimization flags
Reviewers: rafael.espindola, rengolin, hfinkel
Reviewed By: rengolin
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2138
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194405
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Mon, 11 Nov 2013 19:01:05 +0000 (19:01 +0000)]
Using an invalid -O falls back on -O3 instead of an error
Summary:
Currently with clang:
$ clang -O20 foo.c
error: invalid value '20' in '-O20'
With the patch:
$ clang -O20 foo.c
warning: invalid value '20' in '-O20'. Fall back on value '3'
Reviewers: rengolin, hfinkel
Reviewed By: rengolin
CC: cfe-commits, hfinkel, rengolin
Differential Revision: http://llvm-reviews.chandlerc.com/D2125
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194403
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 11 Nov 2013 18:54:23 +0000 (18:54 +0000)]
ObjectiveC migrator. More testing of instancetype migration in
method implementations. // rdar://
15438505
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194402
91177308 -0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Mon, 11 Nov 2013 18:24:28 +0000 (18:24 +0000)]
Add test for r194350.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194396
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 11 Nov 2013 18:04:22 +0000 (18:04 +0000)]
[AArch64] Add support for NEON scalar floating-point convert to fixed-point instructions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194395
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 11 Nov 2013 14:00:37 +0000 (14:00 +0000)]
NetBSD 6.99.26 switched to default rounding mode, so adjust
__FLT_EVAL_METHOD__ accordingly. Add test case for this and the SSE2
variances on NetBSD.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194377
91177308 -0d34-0410-b5e6-
96231b3b80d8
Erik Schnetter [Mon, 11 Nov 2013 06:36:33 +0000 (06:36 +0000)]
Describe OpenCL C changes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194368
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 11 Nov 2013 00:37:22 +0000 (00:37 +0000)]
Revert "Keep the old function order in CodeGenModule::applyReplacements."
This reverts commit r194357.
Debugging a cast failure during bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194358
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 10 Nov 2013 19:04:30 +0000 (19:04 +0000)]
Keep the old function order in CodeGenModule::applyReplacements.
The original decls are created when used. The replacements are created at the
end of the TU in reverse order.
This makes the original order far better for testing. This is particularly
important since the replacement logic could be used even when
-mconstructor-aliases is not used, but that would make many tests hard to read.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194357
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 10 Nov 2013 16:55:11 +0000 (16:55 +0000)]
Avoid double StringMap lookups. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194355
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 10 Nov 2013 16:26:43 +0000 (16:26 +0000)]
CommentSema: Factor code better. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194354
91177308 -0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Sun, 10 Nov 2013 09:31:43 +0000 (09:31 +0000)]
Add gold plugin support to the FreeBSD link driver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194350
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 9 Nov 2013 23:05:07 +0000 (23:05 +0000)]
Add -mconstructor aliases to some tests.
clang-cl adds these, so this makes the tests a bit more realistic. These are the
tests where it would make a difference if the windows specific handling were
removed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194336
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 9 Nov 2013 20:07:19 +0000 (20:07 +0000)]
This reverts commit r194330, r194329 and r194328.
The test was still failing on OS X and mingw.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194334
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Sat, 9 Nov 2013 15:10:56 +0000 (15:10 +0000)]
Commit the changes to make libc++ the default on FreeBSD >= 10, rather than
just the test...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194333
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Sat, 9 Nov 2013 15:03:56 +0000 (15:03 +0000)]
FreeBSD 10 ships with only libc++, make sure it's the default when compiling
c++ code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194332
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Sat, 9 Nov 2013 14:43:08 +0000 (14:43 +0000)]
Correctly set the target in fuse_ld.c correctly...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194330
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Sat, 9 Nov 2013 14:35:29 +0000 (14:35 +0000)]
Add explicit target to the fuse_ld.c test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194329
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Sat, 9 Nov 2013 14:16:52 +0000 (14:16 +0000)]
Add support for -fuse-ld=.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194328
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sat, 9 Nov 2013 04:52:51 +0000 (04:52 +0000)]
Try to recover a bit better if a close brace is missing from the end of a class
definition. If we see something that looks like a namespace definition inside a
class, that strongly indicates that a close brace was missing somewhere.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194319
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Sat, 9 Nov 2013 03:50:37 +0000 (03:50 +0000)]
Comment parsing: recognize \def (but processing is a no-op, like the rest of
similar commands that duplicate the declaration name)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194312
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Sat, 9 Nov 2013 03:08:25 +0000 (03:08 +0000)]
clang-format: Fix alignment of ObjC string literals.
This used to interfere with AlwaysBreakBeforeMultilineStrings.
This fixes llvm.org/PR17856.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194310
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 9 Nov 2013 01:57:21 +0000 (01:57 +0000)]
Don't emit an internal destructor that is identical to an external one.
It is not safe to emit alias to undefined (not supported by ELF or COFF), but
it is safe to rauw when the alias would have been internal or linkonce_odr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194307
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 9 Nov 2013 00:23:58 +0000 (00:23 +0000)]
Use a StringRef. Saves 0.00000000000001s on execution time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194301
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 8 Nov 2013 23:52:29 +0000 (23:52 +0000)]
Update macro expansion diagnostic examples to say 'expanded from:'
instead of 'instantiated from:'. The actual wording of the note was
changed in r135135.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194297
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 8 Nov 2013 23:46:20 +0000 (23:46 +0000)]
Use rauw for all discardable aliases, not just linkonce_odr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194296
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 8 Nov 2013 23:31:14 +0000 (23:31 +0000)]
clang-format: Improve clang-format's detection about comment binding.
Before, existing code in the form of:
int a; // this is a.
// This is
// b.
int b;
Got turned into:
int a; // this is a.
// This is
// b.
int b;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194294
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 8 Nov 2013 23:06:10 +0000 (23:06 +0000)]
Fix name in test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194291
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 8 Nov 2013 23:00:12 +0000 (23:00 +0000)]
Remove an incorrect optimization inside Clang's IRGen. Its check to determine
whether we can safely lower a conditional operator to select was insufficient.
I've left a large comment in place to explaining the sort of problems that this
transform can encounter in clang in the hopes of discouraging others from
reimplementing it wrongly again in the future. (The test should also help with
that, but it's easy to work around any single test I might add and think that
your particular implementation doesn't miscompile any code.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194289
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 8 Nov 2013 22:59:46 +0000 (22:59 +0000)]
If a linkonce_odr dtor/ctor is identical to another one, just rauw.
Unlike an alias a rauw is always safe, so we don't need to avoid this
optimization when the replacement is not know to be available in every TU.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194288
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 8 Nov 2013 22:46:56 +0000 (22:46 +0000)]
Py3k compat for clang-format Sublime Text extension.
Sublime Text 2 uses Python 2.6
Sublime Text 3 uses Python 3.3
The `print` function has been available as a __future__ import since
2.6, so use it.
Patch by Johan Engelen!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194287
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 8 Nov 2013 22:15:02 +0000 (22:15 +0000)]
Fix grammar-o.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194283
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 8 Nov 2013 21:51:24 +0000 (21:51 +0000)]
Fix %select numbering confusion between diagnostic and Diag call.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194281
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 8 Nov 2013 21:28:00 +0000 (21:28 +0000)]
Make -fdump-vtable-layouts print to stdout, not stderr
This makes it consistent with -fdump-record-layouts, which was moved to
outs() in r186219. My reasoning for going with stdout is that when one
of these options is present, the layouts are really a program output,
and shouldn't be interleaved with diagnostics, which are on stderr.
Reviewers: timurrrr
Differential Revision: http://llvm-reviews.chandlerc.com/D2127
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194279
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 8 Nov 2013 19:56:28 +0000 (19:56 +0000)]
clang-format: Improve formatting of operators forced to new lines.
Before:
unsigned ContentSize =
sizeof(int16_t) // DWARF ARange version number
+
sizeof(int32_t) // Offset of CU in the .debug_info section
+
sizeof(int8_t) // Pointer Size (in bytes)
+
sizeof(int8_t); // Segment Size (in bytes)
After:
unsigned ContentSize =
sizeof(int16_t) // DWARF ARange version number
+ sizeof(int32_t) // Offset of CU in the .debug_info section
+ sizeof(int8_t) // Pointer Size (in bytes)
+ sizeof(int8_t); // Segment Size (in bytes)
This fixes llvm.org/PR17687.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194276
91177308 -0d34-0410-b5e6-
96231b3b80d8