Commit Graph

48872 Commits

Author SHA1 Message Date
Fariborz Jahanian 0a0a39708c ObjectiveC ARC. Introduce a new attribute, 'objc_bridge'
that teaches the compiler about a subset of toll-free 
bridging semantics. This is wip. // rdar://15454846

llvm-svn: 194633
2013-11-13 23:59:17 +00:00
Argyrios Kyrtzidis ee02a8a926 [objcmt] If no objcmt options were specified, default to enable literals+subscripting.
llvm-svn: 194629
2013-11-13 23:38:22 +00:00
Argyrios Kyrtzidis 55ecf99285 [objcmt] Transfer the objcmt flags from the driver to cc1 invocation and
instantiate ObjCMigrateASTConsumer with the specific options that were enabled.

llvm-svn: 194628
2013-11-13 23:38:20 +00:00
Argyrios Kyrtzidis 7a2645f91f [objcmt] If the frontend option is frontend::MigrateSource then we don't need to create
the arcmt wrappers.

llvm-svn: 194627
2013-11-13 23:38:17 +00:00
Rafael Espindola d967badc64 Don't use alias from derived dtor to base dtor at -O0.
This patch disables aliasing (and rauw) of derived dtors to base dtors at -O0.
This optimization can have a negative impact on the debug quality.

This was a latent bug for some time with local classes, but got noticed when it
was generalized and broke gdb's destrprint.exp.

llvm-svn: 194618
2013-11-13 23:20:45 +00:00
Reid Kleckner 59e4a6f5e2 -fms-extensions: Recognize _alloca as an alias for the alloca builtin
Differential Revision: http://llvm-reviews.chandlerc.com/D1989

llvm-svn: 194617
2013-11-13 22:58:53 +00:00
Reid Kleckner cf8933d1b7 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

llvm-svn: 194615
2013-11-13 22:47:22 +00:00
Dmitri Gribenko 7244bee1a8 libclang does not depend directly on clangFormat; but clangIndex does
llvm-svn: 194611
2013-11-13 22:26:04 +00:00
Dmitri Gribenko 9e6051135a Documentation parsing: move comment-to-XML conversion routines to libIndex
llvm-svn: 194610
2013-11-13 22:16:51 +00:00
Warren Hunt 486e71460d No functional change. Renaming a variable in RecordLayoutBuilder and
improving comments to make documentation more accurate.

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

llvm-svn: 194609
2013-11-13 22:16:13 +00:00
Weiming Zhao 2005b4816a Add test case for r194593
llvm-svn: 194606
2013-11-13 21:40:17 +00:00
Dmitri Gribenko ff43160208 Make inline functions in a header file static.
llvm-svn: 194603
2013-11-13 20:19:22 +00:00
Chad Rosier e714a962b5 [AArch64] Tests for legacy AArch32 NEON scalar shift by immediate instructions.
A number of non-overloaded intrinsics have been replaced by thier overloaded
counterparts.

llvm-svn: 194599
2013-11-13 20:05:44 +00:00
Rafael Espindola 7cf6f00f56 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.

llvm-svn: 194595
2013-11-13 18:46:32 +00:00
Weiming Zhao 580dcfbd27 Adds ARM backend options: -mrestrict-it and -mno-restrict-it
To support the generation of IT block in Thumbv7 way or
Thumbv8 way

llvm-svn: 194593
2013-11-13 18:31:23 +00:00
Argyrios Kyrtzidis 3e8547a5ca [objcmt] Use FileIDs directly instead of their hash value.
No functionality change.

llvm-svn: 194590
2013-11-13 18:20:31 +00:00
Timur Iskhodzhanov 4ddf59201a No need to use CGM.getCXXABI() from CXXABI
llvm-svn: 194584
2013-11-13 16:03:43 +00:00
Alexander Kornienko 393e3088a1 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

llvm-svn: 194576
2013-11-13 14:04:17 +00:00
Manuel Klimek 6192c93a53 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.

llvm-svn: 194571
2013-11-13 13:23:27 +00:00
Diego Novillo 5c29705c13 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.

llvm-svn: 194567
2013-11-13 12:22:39 +00:00
Serge Pavlov 750db65bac 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

llvm-svn: 194559
2013-11-13 06:57:53 +00:00
Dmitri Gribenko f686ed0e09 Fix closing namespace comment to reflect reality
llvm-svn: 194543
2013-11-13 02:01:24 +00:00
Richard Smith 7309f60b9e 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!

llvm-svn: 194540
2013-11-13 01:24:28 +00:00
NAKAMURA Takumi d3b07c6569 unittests/Tooling/ToolingTest.cpp: Suppress new tests on win32, due to handling of virtual file, such "/a.cc".
llvm-svn: 194534
2013-11-13 00:18:50 +00:00
Fariborz Jahanian 2e793d6124 ObjectiveC migrator. Place use of NS_NONATOMIC_IOSONLY
on inferred property attribute under
 -objcmt-ns-nonatomic-iosonly  option.
// rdar://15442742

llvm-svn: 194532
2013-11-13 00:08:36 +00:00
Hans Wennborg df01974817 clang-cl: parse the /Yc flag (PR17895)
llvm-svn: 194523
2013-11-12 22:35:26 +00:00
Dmitri Gribenko d9febeb884 Documentation parsing: add support for \throws \throw \exception commands
llvm-svn: 194521
2013-11-12 22:16:08 +00:00
Rafael Espindola 129d313c8d 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.

llvm-svn: 194520
2013-11-12 22:06:46 +00:00
Weiming Zhao 87bb4920e9 add intrinsics: __builtin_arm_{dmb,dsb} for ARM
llvm-svn: 194513
2013-11-12 21:42:50 +00:00
Fariborz Jahanian ff6c97c0d2 ObjectiveC. availability of Array/Dictionary subscripting
is further restricted in legacy runtime to deployment target
of 10.7 and later. // rdar://15363492

llvm-svn: 194507
2013-11-12 20:50:26 +00:00
Fariborz Jahanian bed1be926d ObjectiveC migrator. Another alternative to
"atomic" or "nonatomic" for properties is
NS_NONATOMIC_IOSONLY. Use it if available.
// rdar://15442742

llvm-svn: 194503
2013-11-12 19:25:50 +00:00
Hans Wennborg 63d18acc7f clang-cl: parse the /GT option
llvm-svn: 194502
2013-11-12 19:21:50 +00:00
Sylvestre Ledru f8ffda089e Remove trailing spaces
llvm-svn: 194498
2013-11-12 18:07:35 +00:00
Manuel Klimek 31cd3fc088 Add test for injecting diagnostic consumers into a ClangTool.
As suggested by pcc on 194226.

llvm-svn: 194494
2013-11-12 17:53:18 +00:00
Alexander Kornienko 875395f9f8 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

llvm-svn: 194493
2013-11-12 17:50:13 +00:00
Alexander Kornienko 3abbb8a433 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

llvm-svn: 194491
2013-11-12 17:30:49 +00:00
Fariborz Jahanian fd4ce193ba ObjectiveC driver change. re-apply patch reverted in
r194450 with a modified test. // rdar://15363492

llvm-svn: 194489
2013-11-12 17:08:46 +00:00
Manuel Klimek 8f5c84fb74 Upgrade the VS solution to 2012.
Now we can compile a VSPackage that works with VS 2010-2013 from within VS 2012.

llvm-svn: 194488
2013-11-12 17:01:53 +00:00
Manuel Klimek eff9a4d336 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.

llvm-svn: 194482
2013-11-12 15:25:18 +00:00
Manuel Klimek c51098d4aa Recreated the ClangFormat VSPackage with VS 2010.
The generated package is now compatible with VS 2010 - 2013.

llvm-svn: 194480
2013-11-12 15:02:53 +00:00
Manuel Klimek 25d69507dd Revert unintentional commit from r194477.
llvm-svn: 194478
2013-11-12 13:56:36 +00:00
Manuel Klimek 1445131092 (no commit message)
llvm-svn: 194477
2013-11-12 13:54:22 +00:00
Daniel Sanders 8b59af15ed [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.

llvm-svn: 194476
2013-11-12 12:56:01 +00:00
Daniel Sanders 9626df1eb2 [mips] Added fpu register tests to tests/CodeGen/mips-clobber-reg.c
llvm-svn: 194474
2013-11-12 11:38:20 +00:00
Daniel Sanders 923af19f29 [mips] Small fixes to test/CodeGen/mips-clobber-reg.c
Fixed the following:
- Whitespace at end of most lines
- $11 test actually testing $10

llvm-svn: 194473
2013-11-12 11:15:48 +00:00
Robert Lytton eaf6f36e6d 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.

llvm-svn: 194462
2013-11-12 10:09:34 +00:00
Robert Lytton cc4246614f XCore target Type defines.
Change SizeType, PtrDiffType, IntPtrType, WCharType, WIntType
to follow the XMOS llvm-gcc front end's settings.

llvm-svn: 194461
2013-11-12 10:09:30 +00:00
Robert Lytton 6b1deb4cf9 XCore target has -fno-use-cxa-atexit as default.
llvm-svn: 194460
2013-11-12 10:09:22 +00:00
Richard Smith 8c98c1e704 Tests for core issue 201-215.
llvm-svn: 194458
2013-11-12 09:16:15 +00:00
Rafael Espindola 0196a1d98f 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.

llvm-svn: 194452
2013-11-12 04:53:19 +00:00