Commit Graph

50717 Commits

Author SHA1 Message Date
Warren Hunt 7281928be6 Updated to r201734. Removed unused declaration from lit test.
Also updating lit test to be more roboust (changing fixed offsets to 
flexible offsets)

llvm-svn: 201742
2014-02-19 23:57:54 +00:00
Reid Kleckner 588c937228 Use llvm::DeleteContainerSeconds when possible
llvm-svn: 201739
2014-02-19 23:44:52 +00:00
Chandler Carruth 7ce956ded4 Fix two pedantic issues with our builtin headers. The __STDC_VERSION__
for C99 is '199901L' and we shouldn't be comparing it with anything
else.

Neither of these should have had any impact in practice.

llvm-svn: 201738
2014-02-19 23:38:18 +00:00
Aaron Ballman 68893db056 Doing some temporary touch-up on the gnu namespace attribute documentation, from a post-commit review comment.
Ideally, this content will eventually find a home with the rest of the attribute documentation.

llvm-svn: 201736
2014-02-19 23:21:40 +00:00
Warren Hunt 40d6f29ad8 Add _mm_prefetch and some others as MS builtins
This patch adds several built-ins that are required for ms 
compatibility. _mm_prefetch must be a built-in because it takes a 
compile-time constant argument and our prior approach of using a #define 
to the current built-in doesn't work in the presence of re-declaration 
of _mm_prefetch. The others can be obtained by including the windows 
system headers. If a user includes the windows system headers but not 
intrin.h they still need to work and therefore must be built-in because 
we don't get a chance to implement them in intrin.h in this case.

llvm-svn: 201734
2014-02-19 23:20:20 +00:00
Aaron Ballman 5142a2c03a Until attribute documentation is implemented as a server-side feature, I will be manually committing AttributeReference.rst so that attribute documentation can be on the live server instead of simply disappearing from the language extensions page without obvious replacement.
This is a temporary stop-gap solution until server-side generation is implemented, at which point the AttributeReference.rst will go back to holding placeholder text.

llvm-svn: 201733
2014-02-19 23:09:37 +00:00
Aaron Ballman 4de1b584cd Refactored the way attribute category headers are handled so that it is possible to use custom categories. This allows for moving the consumable attributes (consumable, callable_when, return_typestate, etc) to be grouped together, with a content heading, like they were in the language extensions documentation. Moved the consumable attribute documentation from the language extensions into the attribute documentation table.
llvm-svn: 201732
2014-02-19 22:59:32 +00:00
Richard Smith 294e59a33b Remove a broken attempt to cope with someone #undef'ing __has_include_next.
This was broken because __has_include_next(...) would not be valid in a
preprocessor condition if __has_include_next is not defined.

llvm-svn: 201731
2014-02-19 22:53:42 +00:00
Joerg Sonnenberger ed3f0693cb Hook up NetBSD/sparc and NetBSD/sparc64 as and ld invocations.
llvm-svn: 201730
2014-02-19 22:40:18 +00:00
Chandler Carruth e813984b43 Teach Clang to provide ::max_align_t in C11 and C++11 modes.
This definition is not chosen idly. There is an unfortunate reality with
max_align_t -- the specific nature of its definition leaks into the ABI
almost immediately. Because it is part of C11 and C++11 it becomes
essential for it to match with other systems on that ABI. There is an
effort to discourage any further use of this construct as a consequence
-- using max_align_t introduces an immediate ABI problem. We can never
update it to have larger alignment even as the microarchitecture changes
to necessitate higher alignment. =/

The particular definition here exactly matches the ABI of GCC's chosen
::max_align_t definition, for better or worse. This was written with the
help of Richard Smith who was decoding the exact ABI implications of the
selected definition in GCC. Notably, in-register arguments are impacted
by the particular definition chosen. =/

No one is under the illusion that this is a "good" or "useful"
definition of max_align_t, and we are working with the standards
committee to specify a more useful interface to address this need.

llvm-svn: 201729
2014-02-19 22:35:01 +00:00
Joerg Sonnenberger bcee91805e GC now unused variable.
llvm-svn: 201728
2014-02-19 22:17:01 +00:00
Joerg Sonnenberger 25e1817787 Use a switch for the architecture specific logic in
netbsd::Assemble::ConstructJob.

llvm-svn: 201725
2014-02-19 22:16:19 +00:00
Reid Kleckner 6701de2abe MS ABI: Let non-virtual method overloads participate in vftable ordering
In the Microsoft ABI, the vftable is laid out as if all methods in every
overload set were declared in reverse order of declaration at the point
of declaration of the first overload in the set.

Previously we only considered virtual methods in an overload set, but
MSVC includes non-virtual methods for ordering purposes.

Fixes PR18902.

llvm-svn: 201722
2014-02-19 22:06:10 +00:00
Reid Kleckner c688dafe31 clang-cl: Pass /Z7 when we fallback to cl with debug info enabled
Clang itself only emits CodeView line tables, so it seems more
consistent to ask cl.exe for the same format.

llvm-svn: 201721
2014-02-19 22:05:59 +00:00
Joerg Sonnenberger c151b024dc Refactor -KPIC handling for as invocation.
llvm-svn: 201719
2014-02-19 21:58:52 +00:00
Aaron Ballman 0e4aa52e88 Moving the documentation for the ARM interrupt attribute into AttrDocs.
llvm-svn: 201716
2014-02-19 21:12:23 +00:00
Aaron Ballman 896bace47f Moving the documentation for the clang::fallthrough attribute into AttrDocs.
llvm-svn: 201715
2014-02-19 20:56:51 +00:00
Aaron Ballman c7962868a2 Added a documentation category for statement attributes so that things like clang::fallthrough can be documented.
llvm-svn: 201714
2014-02-19 20:55:42 +00:00
Aaron Ballman 0580cd4ff5 Some of these headings had the incorrect number of "underlines" and so would get warnings when generating the content from Sphinx. No functional changes intended.
llvm-svn: 201713
2014-02-19 20:43:58 +00:00
Aaron Ballman 9751a7285e Moving the documentation for the availability attribute into AttrDocs.
llvm-svn: 201712
2014-02-19 20:39:48 +00:00
Yunzhong Gao e3f902c32a Only print the selected multilib when something is actually found on the host.
llvm-svn: 201709
2014-02-19 19:06:58 +00:00
Jordan Rose 94008121fa [analyzer] Extend IdenticalExprChecker to check logical and bitwise expressions.
IdenticalExprChecker now warns if any expressions in a logical or bitwise
chain (&&, ||, &, |, or ^) are the same. Unlike the previous patch, this
actually checks all subexpressions against each other (an O(N^2) operation,
but N is likely to be small).

Patch by Daniel Fahlgren!

llvm-svn: 201702
2014-02-19 17:44:16 +00:00
Jordan Rose 70e7e8718e [analyzer] Extend IdenticalExprChecker to check the two branches of an if.
This extends the checks for identical expressions to handle identical
statements, and compares the consequent and alternative ("then" and "else")
branches of an if-statement to see if they are identical, treating a single
statement surrounded by braces as equivalent to one without braces.

This does /not/ check subsequent branches in an if/else chain, let alone
branches that are not consecutive. This may improve in a future patch, but
it would certainly take more work.

Patch by Daniel Fahlgren!

llvm-svn: 201701
2014-02-19 17:44:11 +00:00
Ben Langmuir 0eb999cacb Reduce verbosity in the virtual file system using LLVM.h
No functional change

llvm-svn: 201696
2014-02-19 16:36:49 +00:00
Alexander Kornienko aa7bca15f0 Updated tutorial code according to the changes in r197139.
Thanks to Konrad Kleine for reporting the inconsistency!

llvm-svn: 201693
2014-02-19 16:11:38 +00:00
Ben Langmuir ac7a74a836 Fix some test issues in VirtualFileSystemTest
Use camel-case names, remove some dead code, and fix a copy-and-pasted test.

llvm-svn: 201691
2014-02-19 15:58:49 +00:00
Aaron Ballman 840cef3e0d Moving the documentation for the objc_requires_super attribute into AttrDocs.
llvm-svn: 201687
2014-02-19 15:45:13 +00:00
Aaron Ballman c0331f5fe0 Moving the documentation for the objc_method_family attribute into AttrDocs.
llvm-svn: 201686
2014-02-19 15:38:02 +00:00
Ben Langmuir 62edd0a059 Remove typo from r201618
Fixes PR18895

llvm-svn: 201685
2014-02-19 15:36:37 +00:00
Aaron Ballman 683ea9cb12 Moving the documentation for the overloadable attribute into AttrDocs.
llvm-svn: 201678
2014-02-19 14:53:20 +00:00
Aaron Ballman 20750f591d Moving the documentation for the enable_if attribute into AttrDocs. Removed the "clang introduces" phrase for style consistency, but otherwise the documentation is identical.
llvm-svn: 201677
2014-02-19 14:48:31 +00:00
Tim Northover db3e5e2408 AArch64: look up EmitAArch64Scalar support before calling.
This fixes one immediate bug where an expression with side-effects
could be emitted twice during a NEON call.

It also prepares the way for folding CodeGen for many of the SISD
intrinsics into a table, reducing code size and hopefully increasing
performance eventually ("binary search + few switch cases" should be
better than "lots of switch cases").

llvm-svn: 201667
2014-02-19 11:55:06 +00:00
Tim Northover 2163a0e497 ARM & AArch64: move struct definition outside function.
Apparently it's not True C++.

rdar://problem/16035743 still.

llvm-svn: 201663
2014-02-19 10:56:23 +00:00
Renato Golin f4421f7e28 Add FreeBSD ARM EABI hard-float support
Patch by Andrew Turner.

llvm-svn: 201662
2014-02-19 10:44:07 +00:00
Tim Northover 0f6c9d0a9b ARM NEON: add vcvtX (with rounding mode) intrinsics to v8 ARM.
These instructions (well, the f32 ones) are supported on 32-bit ARMv8, not just
AArch64. Now that the arm_neon.td refactoring is complete, adding them is
surprisingly simple.

rdar://problem/16035743

llvm-svn: 201661
2014-02-19 10:37:13 +00:00
Tim Northover 544e79eb30 ARM NEON: use more flexible TableGen field for defs.
We used to have special handling for isCrypto and isA64 bits in the
NeonEmitter.cpp file (it knew the former was predicated on __ARM_FEATURE_CRYPTO
and the latter on __aarch64__ and went through various contortions to make sure
the correct intrinsics were emitted under the correct guard.

This is ugly and has obvious scalability problems (e.g. vcvtX intrinsics are
needed, which are ARMv8 only but available on both, yet another category). This
patch moves the #if predicate into the arm_neon.td file directly and makes
NeonEmitter.cpp agnostic about what goes in there.

It also deduplicates arm_neon.td so that each desired intrinsic is mentioned in
just one place (necessary because of the new mechanism for creating
arm_neon.h).

rdar://problem/16035743

llvm-svn: 201660
2014-02-19 10:37:09 +00:00
Tim Northover 12670418a3 ARM & AArch64: merge the semantic checking of NEON intrinsics
There are two kinds of automatically generated tests for NEON intrinsics, both
of which can be merged without adversely affecting users.

1. We check that a valid kind of __builtin_neon_XYZ overload is requested (e.g.
   we're not asking for a float32x4_t version when it only accepts integers. Since
   the __builtin_neon_XYZ intrinsics should only be used in arm_neon.h, relaxing
   this test and permitting AArch64 types for AArch32 should not cause a problem.
   The extra arm_neon.h definitions should be #ifdefed out anyway.
2. We check that intrinsics which take immediates are actually given
   compile-time constants within range. Since all NEON intrinsics should be
   backwards compatible, these tests should be identical on AArch64 and AArch32
   anyway.

This patch, therefore, merges the separate AArch64 and 32-bit checks.

rdar://problem/16035743

llvm-svn: 201659
2014-02-19 10:37:05 +00:00
Dmitri Gribenko 8850cdad34 libclang: ensure clang_createTranslationUnit2 always initializes *TU
llvm-svn: 201657
2014-02-19 10:24:00 +00:00
Ted Kremenek 2e25fbfc11 [analyzer] post analyzer build checker-276
llvm-svn: 201648
2014-02-19 08:09:22 +00:00
Ted Kremenek 8dd916d6b1 [analyzer] Move checker alpha.osx.cocoa.MissingSuperCall out of alpha category.
llvm-svn: 201640
2014-02-19 05:28:39 +00:00
Ben Langmuir 6f95efb683 Attempt to appease C++11 buildbots
Explicit operator bool doesn't not play nicely with gtest assertion
macros (i.e. it performs as advertised and I wish that gtest subverted
it for me).

llvm-svn: 201639
2014-02-19 04:17:47 +00:00
Ben Langmuir b50b23f9ac Pass VFS from CompilerInstance to FileManager
This change was somehow missed from r201618

llvm-svn: 201636
2014-02-19 03:34:59 +00:00
Ben Langmuir 87ba87bc4d Add an OverlayFileSystem class
Provides a way to merge multiple vfs::FileSystem objects into a single
filesystem.

llvm-svn: 201635
2014-02-19 03:29:17 +00:00
David Majnemer 141a7b5402 Remove gunk from cxx_dr_status.html
Accidentally piped the stdout from make_cxx_dr_status into
cxx_dr_status.html

llvm-svn: 201634
2014-02-19 03:21:27 +00:00
David Majnemer 49864d6676 Regenerate DR status page.
llvm-svn: 201632
2014-02-19 03:03:21 +00:00
David Majnemer f703b588b8 Implement DR577
DR18 previously forebode typedefs to be used as parameter types if they
were of type 'void'.  DR577 allows 'void' to be used as a function
parameter type regardless from where it came.

llvm-svn: 201631
2014-02-19 03:00:56 +00:00
Saleem Abdulrasool 909dce5fe2 CIndex: initialise TU
TU is not guaranteed to be initialised in all cases.  In particular if CIdx or
ast_filename is NULL (or if &TU is NULL), then clang_createTranslationUnit2 will
not initialise the out parameter out_TU.  This is followed by an assertion check
which may perform a branch based on unitialised memory.

Caught by scan-build.

llvm-svn: 201628
2014-02-19 02:56:55 +00:00
Rafael Espindola 43e4c52426 Remove dead code.
Clang never produces a linker private object, so this code is dead.

llvm-svn: 201627
2014-02-19 02:14:40 +00:00
Hans Wennborg 897a69b33e clang-cl /fallback: turn the note into a warning
llvm-svn: 201626
2014-02-19 02:10:19 +00:00
Richard Smith b32d009b4f Remove a C++11ism.
llvm-svn: 201621
2014-02-19 01:08:24 +00:00