Commit Graph

60141 Commits

Author SHA1 Message Date
Aaron Ballman 02c6abc5dc Silencing a -Wreturn-type warning; NFC.
llvm-svn: 247693
2015-09-15 14:11:32 +00:00
Daniel Sanders 153010c52d Re-commit r247683: Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC.
Summary:
This is the first patch in the series to migrate Triple's (which are ambiguous)
to TargetTuple's (which aren't).

For the moment, TargetTuple simply passes all requests to the Triple object it
holds. Once it has replaced Triple, it will start to implement the interface in
a more suitable way.

This change makes some changes to the public C++ API. In particular,
InitMCSubtargetInfo(), createMCRelocationInfo(), and createMCSymbolizer()
now take TargetTuples instead of Triples. The other public C++ API's have
been left as-is for the moment to reduce patch size.

This commit also contains a trivial patch to clang to account for the C++ API
change. Thanks go to Pavel Labath for fixing LLDB for me.

Reviewers: rengolin

Subscribers: jyknight, dschuff, arsenm, rampitec, danalbert, srhines, javed.absar, dsanders, echristo, emaste, jholewinski, tberghammer, ted, jfb, llvm-commits, rengolin

Differential Revision: http://reviews.llvm.org/D10969

llvm-svn: 247692
2015-09-15 14:08:28 +00:00
Daniel Sanders c40de48041 Revert r247684 - Replace Triple with a new TargetTuple ...
LLDB needs to be updated in the same commit.

llvm-svn: 247686
2015-09-15 13:46:21 +00:00
Daniel Sanders 18d4b0dab7 Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC.
Summary:
This is the first patch in the series to migrate Triple's (which are ambiguous)
to TargetTuple's (which aren't).

For the moment, TargetTuple simply passes all requests to the Triple object it
holds. Once it has replaced Triple, it will start to implement the interface in
a more suitable way.

This change makes some changes to the public C++ API. In particular,
InitMCSubtargetInfo(), createMCRelocationInfo(), and createMCSymbolizer()
now take TargetTuples instead of Triples. The other public C++ API's have
been left as-is for the moment to reduce patch size.

This commit also contains a trivial patch to clang to account for the C++ API
change.

Reviewers: rengolin

Subscribers: jyknight, dschuff, arsenm, rampitec, danalbert, srhines, javed.absar, dsanders, echristo, emaste, jholewinski, tberghammer, ted, jfb, llvm-commits, rengolin

Differential Revision: http://reviews.llvm.org/D10969

llvm-svn: 247683
2015-09-15 13:17:40 +00:00
Alexey Bataev 25e5b44654 [OPENMP] Emit __kmpc_cancel_barrier() and code for 'cancellation point' only if 'cancel' is found.
Patch improves codegen for OpenMP constructs. If the OpenMP region does not have internal 'cancel' construct, a call to 'void __kmpc_barrier()' runtime function is generated for all implicit/explicit barriers. If the region has inner 'cancel' directive, then
```
if (__kmpc_cancel_barrier())
  exit from outer construct;
```
code is generated.
Also, the code for 'canellation point' directive is not generated if parent directive does not have 'cancel' directive.

llvm-svn: 247681
2015-09-15 12:52:43 +00:00
Alexey Bader bdf7c846f9 Run clang-format to unify the switch statement style as suggest here: http://reviews.llvm.org/D12855#246073.
NFC.

llvm-svn: 247678
2015-09-15 12:18:29 +00:00
Alexey Bader 9c8453fb4b [OpenCL] Add new types for OpenCL 2.0.
Patch by Pedro Ferreira.
Reviewers: pekka.jaaskelainen
Differential Revision: http://reviews.llvm.org/D12855

llvm-svn: 247676
2015-09-15 11:18:52 +00:00
Ismail Donmez a8d3a2e9a1 Doxygen fix InitializeBuiltins -> initializeBuiltins
llvm-svn: 247668
2015-09-15 09:53:14 +00:00
NAKAMURA Takumi f9c52dc3e7 Make clang/test/CodeGen/catch-undef-behavior.c* capable of -Asserts with "opt -instnamer".
It reverts r231717.

llvm-svn: 247667
2015-09-15 09:50:24 +00:00
Devin Coughlin 676a58c9b2 [analyzer] Restore behavior change introduced by r247657.
r247657 fixed warnings about unused variables when compiling without asserts
but changed behavior. This commit restores the old behavior but still suppresses
the warnings.

llvm-svn: 247660
2015-09-15 03:28:27 +00:00
David Majnemer 1cbe80408d [MS ABI] Restore our warning for overwide bitfields using the MS ABI
This restores a diagnostic lost in r247651.

llvm-svn: 247659
2015-09-15 02:36:41 +00:00
NAKAMURA Takumi f14c2508e4 ExprEngineObjC.cpp: Fix warnings. [-Wunused-variable]
llvm-svn: 247657
2015-09-15 01:53:27 +00:00
NAKAMURA Takumi e9621040e5 ItaniumCXXABI.cpp: Fix a warning. [-Wunused-variable]
llvm-svn: 247655
2015-09-15 01:39:27 +00:00
Richard Smith f091e129db [modules] A using-declaration doesn't introduce a new entity, just a new name
for an existing entity, and as such a using-declaration doesn't need to
conflict with a hidden entity (nor vice versa).

llvm-svn: 247654
2015-09-15 01:28:55 +00:00
Devin Coughlin ca5ab2b0d4 [analyzer] Skip Pre/Post handlers for ObjC calls when receiver is nil.
In Objective-C, method calls with nil receivers are essentially no-ops. They
do not fault (although the returned value may be garbage depending on the
declared return type and architecture). Programmers are aware of this
behavior and will complain about a false alarm when the analyzer
diagnoses API violations for method calls when the receiver is known to
be nil.

Rather than require each individual checker to be aware of this behavior
and suppress a warning when the receiver is nil, this commit
changes ExprEngineObjC so that VisitObjCMessage skips calling checker
pre/post handlers when the receiver is definitely nil. Instead, it adds a
new event, ObjCMessageNil, that is only called in that case.

The CallAndMessageChecker explicitly cares about this case, so I've changed it
to add a callback for ObjCMessageNil and moved the logic in PreObjCMessage
that handles nil receivers to the new callback.

rdar://problem/18092611

Differential Revision: http://reviews.llvm.org/D12123

llvm-svn: 247653
2015-09-15 01:13:53 +00:00
David Majnemer d558aa8627 [MS ABI] Overwide bool bitfields should be permitted
Overwide bool bitfields have eight bits of storage size, make sure we
take the padding into account when determining whether or not they are
problematic.

llvm-svn: 247651
2015-09-15 01:00:55 +00:00
Piotr Padlewski d128fff5df small test bugfix
llvm-svn: 247650
2015-09-15 00:55:29 +00:00
Piotr Padlewski d679d7e924 Generating assumption loads of vptr after ctor call (fixed)
Generating call assume(icmp %vtable, %global_vtable) after constructor
call for devirtualization purposes.

For more info go to:
http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html

Edit:
Fixed version because of PR24479 and other bug caused in chrome.
After this patch got reverted because of ScalarEvolution bug (D12719)
Merged after John McCall big patch (Added Address).

http://reviews.llvm.org/D11859
http://reviews.llvm.org/D12865

llvm-svn: 247646
2015-09-15 00:37:06 +00:00
Stephen Canon ca8eefddb7 Prevent implicit re-interpret casts between ExtVector and Scalar types.
Previously, in certain cases lax vector conversions could occur between scalar floating-point values and ExtVector types; these conversions would be simple bitcasts.  We need to allow them with other vector types to support some common headers, but we don't need them for ExtVector.  Preventing them here makes them behave like other operations involving scalars and ExtVectors.

llvm-svn: 247643
2015-09-15 00:21:56 +00:00
NAKAMURA Takumi 500c1e1adf clang/test/CodeGenCXX/2009-04-23-bool2.cpp: Avoid -mms-bitfields to add explicit triple.
FIXME: Better way to cancel -mms-bitfields?
llvm-svn: 247640
2015-09-14 23:50:08 +00:00
Rafael Espindola fe71f3887c [Solaris] Default to -fno-cxa-finalize.
There is no __cxa_finalize symbol available on recent Solaris OS
versions, so we need this flag to make non trivial C++ programs run.

Also stop looking for cxa_finalize.o, since it won't be there.

Patch by Xan López!

llvm-svn: 247634
2015-09-14 23:21:31 +00:00
Dan Gohman f1c34e6731 [WebAssembly] Define the atomic type sizes
WebAssembly's spec has now been updated to specify some guarantees
about lock free atomic accesses. Update clang to match.

This also updates sig_atomic_t to be 64-bit on wasm64. WebAssembly
does not presently have asynchronous interrupts, but this change is
within the spirit of how they will work if they are added.

Differential Revision: http://reviews.llvm.org/D12862

llvm-svn: 247624
2015-09-14 21:56:37 +00:00
Dan Gohman 15707de865 [WebAssembly] Simplify code by avoiding duplicating the default behavior.
llvm-svn: 247623
2015-09-14 21:54:32 +00:00
Dan Gohman ab0e31fa35 [WebAssembly] Use "long long" for int_fast64_t and int_least64_t on wasm64
This makes int_fast64_t and int_least64_t the same type as int64_t, and
eliminates a difference between wasm32 and wasm64.

Differential Revision: http://reviews.llvm.org/D12861

llvm-svn: 247622
2015-09-14 21:49:41 +00:00
Evgeniy Stepanov 6b2a61d3a5 Revert "Always_inline codegen rewrite" and 2 follow-ups.
Revert "Update cxx-irgen.cpp test to allow signext in alwaysinline functions."
Revert "[CodeGen] Remove wrapper-free always_inline functions from COMDATs"
Revert "Always_inline codegen rewrite."

Reason for revert: PR24793.

llvm-svn: 247620
2015-09-14 21:35:16 +00:00
Andrey Bokhanko ddc04ef493 PR24595: Ignore calling convention modifiers for structors in MS ABI.
MS compiler ignores calling convention modifiers for structors. This patch makes
clang do the same (for MS ABI). This fixes PR24595 and makes vswriter.h header
(from Windows SDK 8.1) compilable.

Differential Revision: http://reviews.llvm.org/D12402

llvm-svn: 247619
2015-09-14 21:29:57 +00:00
Rachel Craik 022bdc7d73 C11 _Bool bitfield diagnostic
Summary: Implement DR262 (for C). This patch will mainly affect bitfields of type _Bool

Reviewers: fraggamuffin, rsmith

Subscribers: hubert.reinterpretcast, cfe-commits

Differential Revision: http://reviews.llvm.org/D10018

llvm-svn: 247618
2015-09-14 21:27:36 +00:00
Devin Coughlin bace032eb8 [analyzer] Update SATestBuild.py to set -isysroot for preprocessed files
Update the static analyzer buildbot script to set -isysroot to the OS X SDK path
when analyzing preprocessed files on OS X.

Differential Revision: http://reviews.llvm.org/D12769

llvm-svn: 247617
2015-09-14 21:22:24 +00:00
Gabor Horvath e30859959f [Static Analyzer] Turn on some nullability checks by default.
Differential Revision: http://reviews.llvm.org/D12858

llvm-svn: 247614
2015-09-14 20:34:06 +00:00
Gabor Horvath be87d5bb92 [Static Analyzer] Nullability checker optimization.
Differential Revision: http://reviews.llvm.org/D12848

llvm-svn: 247612
2015-09-14 20:31:46 +00:00
Douglas Katzman 553927a78a Driver should forward at most one gdwarf-N flag to cc1as.
llvm-svn: 247611
2015-09-14 20:31:28 +00:00
Rafael Espindola 8d4d9d2f67 [Solaris] Add -lc also when linking shared libraries
This is actually needed, otherwise libc won't be added at all. For
instance when building libclang.so all the libc symbols won't be
found, with ld warning about libc being an "implicit dependency".

Patch by Xan López!

llvm-svn: 247603
2015-09-14 19:30:53 +00:00
Gabor Horvath dc6be2453f [Static Analyzer] Relaxing a caching out related assert.
Differential Revision: http://reviews.llvm.org/D12818

llvm-svn: 247598
2015-09-14 19:00:08 +00:00
John McCall f0f0b7a0eb Fix a nasty bug with the partial destruction of nested arrays;
it escaped notice because it's only used for heterogeneous
initialization.

rdar://21397946

llvm-svn: 247597
2015-09-14 18:57:08 +00:00
Gabor Horvath dfedc0f884 [Static Analyzer] Moving nullability checkers out of alpha.
llvm-svn: 247595
2015-09-14 18:48:55 +00:00
David Blaikie 2a791d7d21 [opaque pointer type] Fix a few uses of PointerType::getElementType in favor of uses of types already available elsewhere
These are a few cleanups I happened to have from trying to go in a
different direction recently, so just flushing them out while I have
them.

llvm-svn: 247593
2015-09-14 18:38:22 +00:00
Gabor Horvath 2930735c1e [Static Analyzer] Moving nullability checkers to a top level package.
Differential Revision: http://reviews.llvm.org/D12852

llvm-svn: 247590
2015-09-14 18:31:34 +00:00
David Blaikie aff29d3031 Revert "[opaque pointer type] update for LLVM API change"
This was the wrong direction to take anyway (because ultimately the
GlobalValue needed the pointee type again and /it/ used
PointerType::getElementType eventually anyway)... let's go a different way.

This reverts commit r236161.

llvm-svn: 247586
2015-09-14 18:02:04 +00:00
Samuel Antao c23a8b2d39 Update cxx-irgen.cpp test to allow signext in alwaysinline functions.
This was causing an error in Power8 targets.

llvm-svn: 247584
2015-09-14 17:41:32 +00:00
Rachel Craik f55d058a98 Test commit
Remove some trailing whitespace

llvm-svn: 247560
2015-09-14 14:08:18 +00:00
NAKAMURA Takumi 10808274b8 [CMake] r247548 introduced llvm-readobj.
llvm-svn: 247554
2015-09-14 12:42:52 +00:00
NAKAMURA Takumi 0f1cbee00e [CMake] Reformat CLANG_TEST_DEPS.
llvm-svn: 247553
2015-09-14 12:41:53 +00:00
Simon Atanasyan 25be8761b9 [mips] Add test case to check ABI flag emissions in case of inline assembler
Follow up to r247546. The test case reproduces the problem fixed by this commit.

llvm-svn: 247548
2015-09-14 11:23:02 +00:00
David Majnemer 7eddcff8fa [Sema] Reject value-initialization of function types
T in the expression T() must be a non-array complete object type or
the void type.  Function types are neither.

This fixes PR24798.

llvm-svn: 247535
2015-09-14 07:05:00 +00:00
Gabor Horvath c0cc747ae8 [Static Analyzer] Remove a redundant file.
llvm-svn: 247533
2015-09-13 23:03:11 +00:00
Gabor Horvath c0c7a5df6e [Static Analyzer] Merge the Objective-C Generics Checker into Dynamic Type Propagation checker.
Differential Revision: http://reviews.llvm.org/D12381

llvm-svn: 247532
2015-09-13 23:02:24 +00:00
Vedant Kumar c5c7319fce [docs] NFC: Fix line formatting in INSTALL.txt
Patch by beltex!

Differential Revision: http://reviews.llvm.org/D12684

llvm-svn: 247530
2015-09-13 20:17:18 +00:00
Ted Kremenek 04d7b95ef3 Use -f instead of -d flag for testing existing of clang executable (http://reviews.llvm.org/D12827).
llvm-svn: 247510
2015-09-12 16:01:34 +00:00
Kelvin Li bc9c327f3f Test commit.
llvm-svn: 247503
2015-09-12 13:35:31 +00:00
David Majnemer 67cb9740f6 [CodeGen] Remove wrapper-free always_inline functions from COMDATs
always_inline functions without a wrapper don't need to be in a COMDAT.

llvm-svn: 247500
2015-09-12 06:37:42 +00:00