Commit Graph

19866 Commits

Author SHA1 Message Date
Manman Ren f5d9d348f7 Turn struct-path aware TBAA on by default.
Use -no-struct-path-tbaa to turn it off.
This is the same as r191695, which was reverted because it depends on a
commit that has issues.

llvm-svn: 192497
2013-10-11 20:48:38 +00:00
Reid Kleckner fe56be5819 Use castAs instead of cast in thunk generation
Calling convention attributes can add sugar to methods that we have to
look through.  This fixes an assertion failure in the provided test
case.

llvm-svn: 192496
2013-10-11 20:46:27 +00:00
Warren Hunt 8f8bad723d Adds Microsoft compatiable C++ record layout code to clang.
llvm-svn: 192494
2013-10-11 20:19:00 +00:00
Argyrios Kyrtzidis adff3ae3c8 [libclang] Introduce clang_Type_getCXXRefQualifier whichexposes ref-qualifier information of function type.
Patch by Che-Liang Chiou!

llvm-svn: 192493
2013-10-11 19:58:38 +00:00
Fariborz Jahanian 1d27ffd697 ObjectiveC migrator: fixes a bug when in NS_ENUM/NS_OPTIONS
migration, the typedef has annotations.
// rdar://15200602

llvm-svn: 192468
2013-10-11 17:35:22 +00:00
Hans Wennborg 569e9b56a8 clang-cl: Mark /FA and /Fa as unsupported options
llvm-svn: 192465
2013-10-11 17:11:51 +00:00
Rafael Espindola f86925fa60 Don't hardcode the alias order in this test.
llvm-svn: 192464
2013-10-11 16:56:21 +00:00
Robert Lytton 8b1cf73c9a remove path separator from test/Driver/xcore-opts.c
llvm-svn: 192439
2013-10-11 10:55:53 +00:00
Robert Lytton cf1dd692ae XCore target: add an xcore toolchain implementation
llvm-svn: 192437
2013-10-11 10:29:40 +00:00
Robert Lytton 2d1969584a XCore : Fix bug in XCoreABIInfo::EmitVAArg()
Incorrect handling of 'double' and 'long long int'

llvm-svn: 192436
2013-10-11 10:29:34 +00:00
Douglas Gregor 71fe0e8a83 Diagnose by-copy captures of abstract classes.
Fixes <rdar://problem/14468891>.

llvm-svn: 192419
2013-10-11 04:25:21 +00:00
Nick Lewycky ce6a4aacb4 The emitted IR is the same, we need these flags to actually use the LLVM target.
Mark it as requiring the x86 target.

llvm-svn: 192417
2013-10-11 03:52:43 +00:00
Nick Lewycky 3a410fe085 Add -fno-function-sections and -fno-data-sections. Since
-f{function,data}-sections had no tests at all, add some, and verify that the
-fno variants work as well.

llvm-svn: 192413
2013-10-11 03:35:10 +00:00
Kevin Qin f22bf50443 Implemented aarch64 SIMD copy related ACLE intrinsic :
vget_lane, vset_lane, vcopy_lane, vcreate, vdup_n, vdup_lane, vmov_n.

llvm-svn: 192411
2013-10-11 02:34:30 +00:00
Fariborz Jahanian 9218f5178d ObjectiveC migrator. When migrating to NS_ENUM/NS_OPTIONS,
don't leave a blank line behind replacing the typedef
decl. // rdar://15200949

llvm-svn: 192407
2013-10-10 23:57:58 +00:00
Hans Wennborg 052807aa79 clang-cl: simplify the -m32 -m64 test
This was just broken.

llvm-svn: 192405
2013-10-10 23:04:06 +00:00
Hans Wennborg 65a008683f clang-cl: Expose the -m32 and -m64 command-line options
And add a test to check that they work.

llvm-svn: 192402
2013-10-10 22:36:20 +00:00
Fariborz Jahanian 8bcf182b9d ObjectiveC. ObjectiveC's collection selector expression in
the fereach loop must be a non-const lvalue expression as
it will be assigned to at the beginning of the loop.
// rdar://15123684

llvm-svn: 192399
2013-10-10 21:58:04 +00:00
Manman Ren 9935dc0592 Debug Info: update testing cases when the context field of subprogram is updated
to use DIScopeRef.

Paired commit with r192378.

llvm-svn: 192379
2013-10-10 18:40:16 +00:00
Fariborz Jahanian 7c87b43d28 ObjectiveC migrator: For 'default' and 'shared' family of
methods, infer their self's type as their result type.
// rdar://15145218

llvm-svn: 192377
2013-10-10 18:23:13 +00:00
Hao Liu 1eade6d927 Implement AArch64 vector load/store multiple N-element structure class SIMD(lselem).
Including following 14 instructions:
4 ld1 insts: load multiple 1-element structure to sequential 1/2/3/4 registers.
ld2/ld3/ld4: load multiple N-element structure to sequential N registers (N=2,3,4).
4 st1 insts: store multiple 1-element structure from sequential 1/2/3/4 registers.
st2/st3/st4: store multiple N-element structure from sequential N registers (N = 2,3,4).

llvm-svn: 192362
2013-10-10 17:01:49 +00:00
Timur Iskhodzhanov 780c7b5751 Disable RTTI in one test so clang doesn't assert behind the scenes
llvm-svn: 192359
2013-10-10 16:38:32 +00:00
Tim Northover 72ace5cf12 Revert "Implement AArch64 vector load/store multiple N-element structure class SIMD(lselem). "
This reverts commit r192351. The LLVM side broke the build and the Clang tests
will inevitably fail without it.

llvm-svn: 192356
2013-10-10 16:00:08 +00:00
Rafael Espindola 16311a9206 Revert "Use aliases for more constructors and destructors."
This reverts commit r192300.

The change itself looks correct, but it found issues on how we handle aliases
in llvm.

llvm-svn: 192353
2013-10-10 15:04:21 +00:00
Hao Liu c319193636 Implement AArch64 vector load/store multiple N-element structure class SIMD(lselem).
Including following 14 instructions:
4 ld1 insts: load multiple 1-element structure to sequential 1/2/3/4 registers.
ld2/ld3/ld4: load multiple N-element structure to sequential N registers (N=2,3,4).
4 st1 insts: store multiple 1-element structure from sequential 1/2/3/4 registers.
st2/st3/st4: store multiple N-element structure from sequential N registers (N = 2,3,4).

E.g. ld1(3 registers version) will load 32-bit elements {A, B, C, D, E, F} sequentially into the three 64-bit vectors list {BA, DC, FE}.
E.g. ld3 will load 32-bit elements {A, B, C, D, E, F} into the three 64-bit vectors list {DA, EB, FC}.

llvm-svn: 192351
2013-10-10 14:59:36 +00:00
Benjamin Kramer 5fc787fc2e Parser: Avoid a crash-on-invalid when trying to diagnose function calls with -> in it.
Use the existing convenience function.

llvm-svn: 192347
2013-10-10 12:24:40 +00:00
Benjamin Kramer 915d169c6a Sema: Taking the address of a dtor is illegal per C++ [class.dtor]p2.
Emit a proper error instead of crashing in CodeGen. PR16892.

llvm-svn: 192345
2013-10-10 09:44:41 +00:00
Simon Atanasyan a61b7ecb2f [Mips] Support FSF Mips toolchain directories tree in the Clang driver.
The patch reviewed by Rafael Espindola.
http://llvm-reviews.chandlerc.com/D1843

llvm-svn: 192343
2013-10-10 07:57:44 +00:00
Ted Kremenek e568574c81 Make test portable.
llvm-svn: 192338
2013-10-10 02:12:25 +00:00
Ted Kremenek e65ab9e80e Fix getIntegerTypeOrder() to properly handle enums by first unwrapping their underlying integer type. This is a precondition for calling getIntegerRank().
Fixes an assertion failure in a test case involving vectors.

Fixes <rdar://problem/15091442>

Please somebody check this.

llvm-svn: 192334
2013-10-10 00:54:01 +00:00
Ted Kremenek 197fee407e Refine string literal concatenation warning within an NSArray literal to not warn when the literal comes from a macro expansion. Fixes <rdar://problem/15147688>.
llvm-svn: 192328
2013-10-09 22:34:33 +00:00
Manman Ren 41f9f4a3c5 Debug Info: update testing cases when the context and type fields of
template_type and template_value are updated to use DIRef.

Paired commit with r192320.

llvm-svn: 192321
2013-10-09 19:47:05 +00:00
Fariborz Jahanian 20a1124ce5 ObjectiveC migrator. Introduce a new objcmt-atomic-property option
and use it to infer all properties as 'atomic'.
// rdar://14988132

llvm-svn: 192317
2013-10-09 19:06:08 +00:00
DeLesley Hutchins 3277a6129b Consumed analysis: improve loop handling. The prior version of the analysis
marked all variables as "unknown" at the start of a loop.  The new version
keeps the initial state of variables unchanged, but issues a warning if the
state at the end of the loop is different from the state at the beginning.
This patch will eventually be replaced with a more precise analysis.

Initial patch by chris.wailes@gmail.com.  Reviewed and edited by
delesley@google.com.

llvm-svn: 192314
2013-10-09 18:30:24 +00:00
Timur Iskhodzhanov b648732230 Initialize vtorDisp in class constructors and destructors
Reviewed at http://llvm-reviews.chandlerc.com/D1867

llvm-svn: 192312
2013-10-09 18:16:58 +00:00
Hans Wennborg 1e109804f5 Tighten diagnostics for calling conventions on variadic functions
Follow-up from r192240.

This makes it an error to use callee-cleanup conventions on variadic
functions, except for __fastcall and __stdcall, which we ignore with
a warning for GCC and MSVC compatibility.

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

llvm-svn: 192308
2013-10-09 18:10:25 +00:00
Fariborz Jahanian de557f84dd ObjectiveC migrator. Introduce a new print policy for
suppression of strong lifetime qualifiers when
inferring property. // rdar://15082812

llvm-svn: 192305
2013-10-09 17:37:28 +00:00
Rafael Espindola a25c79e704 Use aliases for more constructors and destructors.
With this patch we produce alias for cases like

template<typename T>
struct foobar {
  foobar() {
  }
};
template struct foobar<void>;

It is safe to use aliases to weak symbols, as long and the alias itself is also
weak.

llvm-svn: 192300
2013-10-09 16:13:15 +00:00
NAKAMURA Takumi f16acbbad3 clang/test/Coverage/codegen-next.m: Exclude this for targeting x86_64-win32.
llvm-svn: 192286
2013-10-09 09:45:27 +00:00
Timur Iskhodzhanov ad9d3b8fd1 Reland 192220 "Abstract out parts of thunk emission code, add support for simple thunks when using -cxx-abi microsoft" with relaxed assertions
llvm-svn: 192285
2013-10-09 09:23:58 +00:00
David Majnemer 767c1f8428 Make wording for certain invalid unary expressions more consistent.
An invalid decltype expression like 'decltype int' gives:
error: expected '(' after 'decltype'

This makes it so 'sizeof int' gives a similar one:
error: expected parentheses around type name in sizeof expression

llvm-svn: 192258
2013-10-09 00:22:23 +00:00
Manman Ren e4e12d0455 Debug Info: update testing cases when the context field of
DICompositeType is updated to use DIScopeRef.

Paired commit with r192256.

llvm-svn: 192257
2013-10-09 00:17:23 +00:00
Manman Ren b88adbf118 Debug Info: update testing cases when the derived-from field of
DICompositeType is updated to use DITypeRef.

Paired commit with r192251.

llvm-svn: 192252
2013-10-08 23:29:36 +00:00
Manman Ren 07ab3c381c Debug Info: update testing cases when the derived-from field of
DIDerivedType is updated to use DITypeRef.

Paired commit with r192246.

llvm-svn: 192247
2013-10-08 22:56:54 +00:00
Reid Kleckner be7a446637 -Wmicrosoft: Don't warn on non-inline pure virtual method definitions
MSVC and clang with -fms-extensions allow pure virtual methods to be
defined inline after the "= 0" tokens.  Clang warns on these because it
is not standard, but incorrectly warns on out-of-line definitions, which
are standard.

With this change, clang will only warn on inline definitions of pure
virtual methods.

Fixes some self-host warnings on out-of-line definitions of pure virtual
destructors.

llvm-svn: 192244
2013-10-08 22:45:29 +00:00
Chad Rosier 0a903478c6 [AArch64] Add support for NEON scalar floating-point reciprocal estimate,
reciprocal exponent, and reciprocal square root estimate instructions.

llvm-svn: 192243
2013-10-08 22:09:29 +00:00
Hans Wennborg 9112ac2136 Turn error about fastcall variadic function into warning in MS mode (PR12535)
MSVC allows this and silently falls back to __cdecl for variadic functions.
This patch turns Clang's error into a warning in MS mode and adds a test
to make sure we generate correct code.

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

llvm-svn: 192240
2013-10-08 21:52:56 +00:00
Fariborz Jahanian 3c593d63a1 ObjectiveC migrator: Add support for inferring
properties of function pointer type.
// rdar://15082812

llvm-svn: 192237
2013-10-08 21:32:16 +00:00
Chad Rosier 0babda4b9c [AArch64] Add support for NEON scalar signed/unsigned integer to floating-point
convert instructions.

llvm-svn: 192232
2013-10-08 20:43:46 +00:00
Fariborz Jahanian 02461d0218 ObjectiveC migration. Add support for inferring
properties of block pointer types. Also, remove
strong lifetime attribute from property type
in this migration. This is wip.
// rdar://15082818

llvm-svn: 192226
2013-10-08 20:14:24 +00:00