Commit Graph

48242 Commits

Author SHA1 Message Date
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
Nick Lewycky 609dd6671d Fix typo in comment. No functionality change.
llvm-svn: 192412
2013-10-11 03:33:53 +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
Mark Lacey 2345575db3 Make CodeGenTypes data members private.
No functionality differences.

llvm-svn: 192390
2013-10-10 20:57:00 +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
Hans Wennborg d219231de5 Locate VS InstallDir in the presence of newer runtime
This fixes getSystemRegistryString() in WindowsToolChain.cpp to
make sure that the VS version that it picks has an InstallDir.
Previously we would look for the highest version os VS and check
for InstallDir afterwards.

Patch by Yaron Keren!

llvm-svn: 192374
2013-10-10 18:03:08 +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
Alexander Kornienko 60d1b046dd Correctly detect colon in bit fields. Fixes PR17333.
Summary: Colon was incorrectly detected as a start of inheritance list. Fixed.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

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

llvm-svn: 192349
2013-10-10 13:36:20 +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
Hans Wennborg 2a6e6bc41f Add a section about clang-cl to UsersManual.rst
Differential Revision: http://llvm-reviews.chandlerc.com/D1881

llvm-svn: 192337
2013-10-10 01:15:16 +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
Hans Wennborg 935d01d80a Use KEY_WOW64_32KEY when reading the registry in WindowsToolChain.cpp (PR17033)
This exposes a 32-bit view of the registry even when Clang is built as a 64-bit
program. Since Visual Studio is a 32-bit application, this is necessary for us
to find it.

llvm-svn: 192331
2013-10-09 23:41:48 +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
Sean Callanan c665c9ecf4 This patch addresses a problem encountered by the
ASTImporter when importing the following types:

typedef struct {
} A;

typedef struct {
  A a;
} B;

Suppose we have imported B, but we did not at that
time need to complete it.  Then later we want to
import A.  The struct is anonymous, so the first
thing we want to do is make sure no other anonymous
struct already matches it.  So we set up an
StructuralEquivalenceContext and compare B with A.

This happens at ASTImporter.cpp:2179.

Now, in this scenario, B is not complete.  So we go
and import its fields, including a, which causes A
to be imported.  The ASTImporter doesn’t yet have A
in its list of already-imported things, so we
import A.

After the StructuralEquivalenceContext is finished
determining that A and B are different, the
ASTImporter concludes that A must be imported
because no equivalent exists, so it imports a second
copy of A.  Now we have two different structs
representing A.  This is really bad news.

The patch allows the StructuralEquivalenceContext to
use the original version of B when making its
comparison, obviating the need for an import and
cutting this loop.

llvm-svn: 192324
2013-10-09 21:45:11 +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 95407c157b Fix warnings introduced in r192314.
llvm-svn: 192315
2013-10-09 18:38:53 +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
Ariel J. Bernal e7288fe233 Revert commit r192299 until find a way to account for simlinks in OS X.
llvm-svn: 192313
2013-10-09 18:27:27 +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
Ariel J. Bernal ee863cedc2 This patch fixes replacements that are not applied when relative paths are
specified.

In particular it makes sure that relative paths for non-virtual files aren't
made absolute.
Added unittest test.

llvm-svn: 192299
2013-10-09 16:09:23 +00:00
Daniel Jasper d3e014d404 clang-format: Fix template declaration line breaking with comment.
Before, clang-format would always insert a linebreak before the comment
in code like:
  template <typename T> // T can be A, B or C.
  struct S {};

llvm-svn: 192297
2013-10-09 15:06:17 +00:00
Simon Atanasyan 068e0fd52e [Mips] Group MIPS-related options checking function in one place.
llvm-svn: 192293
2013-10-09 12:12:39 +00:00
Simon Atanasyan 6736ad1222 [Mips] Make the isMipsR2Arch() function simpler - remove checking for
MIPS-arch.

llvm-svn: 192292
2013-10-09 12:12:34 +00:00
Simon Atanasyan 30b0127d4c [Mips] Remove unused mips_CPUs_Group options group. It's better to join
all MIPS-related options to the new m_mips_Features_Group later.

llvm-svn: 192291
2013-10-09 12:12:29 +00:00
Simon Atanasyan e0cc7c72be [Mips] Do not check for options from the OPT_mips_CPUs_Group. All these
options are aliases now.

llvm-svn: 192290
2013-10-09 12:12:24 +00:00
Simon Atanasyan 3e570f3766 [Mips] Make mips32/mips32r2/mips64/mips64r2 real aliases for appropriate
march options.

llvm-svn: 192289
2013-10-09 12:12:19 +00:00
Timur Iskhodzhanov e1ebc5fb66 Code cleanup: rename VTableContext to ItaniumVTableContext, VTableBuilder to ItaniumVTableBuilder and clang-format code around
llvm-svn: 192288
2013-10-09 11:33:51 +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