summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Re-commit r247683: Replace Triple with a new TargetTuple in MCTargetDesc/* ↵Daniel Sanders2015-09-152-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert r247684 - Replace Triple with a new TargetTuple ...Daniel Sanders2015-09-152-8/+7
| | | | | | LLDB needs to be updated in the same commit. llvm-svn: 247686
* Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC.Daniel Sanders2015-09-152-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [OPENMP] Emit __kmpc_cancel_barrier() and code for 'cancellation point' only ↵Alexey Bataev2015-09-1525-193/+505
| | | | | | | | | | | | | | 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
* Run clang-format to unify the switch statement style as suggest here: ↵Alexey Bader2015-09-155-201/+539
| | | | | | | | http://reviews.llvm.org/D12855#246073. NFC. llvm-svn: 247678
* [OpenCL] Add new types for OpenCL 2.0.Alexey Bader2015-09-1523-16/+477
| | | | | | | | Patch by Pedro Ferreira. Reviewers: pekka.jaaskelainen Differential Revision: http://reviews.llvm.org/D12855 llvm-svn: 247676
* Doxygen fix InitializeBuiltins -> initializeBuiltinsIsmail Donmez2015-09-151-1/+1
| | | | llvm-svn: 247668
* Make clang/test/CodeGen/catch-undef-behavior.c* capable of -Asserts with ↵NAKAMURA Takumi2015-09-152-23/+21
| | | | | | | | "opt -instnamer". It reverts r231717. llvm-svn: 247667
* [analyzer] Restore behavior change introduced by r247657.Devin Coughlin2015-09-151-4/+6
| | | | | | | | 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
* [MS ABI] Restore our warning for overwide bitfields using the MS ABIDavid Majnemer2015-09-152-20/+27
| | | | | | This restores a diagnostic lost in r247651. llvm-svn: 247659
* ExprEngineObjC.cpp: Fix warnings. [-Wunused-variable]NAKAMURA Takumi2015-09-151-4/+4
| | | | llvm-svn: 247657
* ItaniumCXXABI.cpp: Fix a warning. [-Wunused-variable]NAKAMURA Takumi2015-09-151-2/+1
| | | | llvm-svn: 247655
* [modules] A using-declaration doesn't introduce a new entity, just a new nameRichard Smith2015-09-155-3/+112
| | | | | | | 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
* [analyzer] Skip Pre/Post handlers for ObjC calls when receiver is nil.Devin Coughlin2015-09-158-50/+230
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* [MS ABI] Overwide bool bitfields should be permittedDavid Majnemer2015-09-152-6/+9
| | | | | | | | 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
* small test bugfixPiotr Padlewski2015-09-151-2/+2
| | | | llvm-svn: 247650
* Generating assumption loads of vptr after ctor call (fixed)Piotr Padlewski2015-09-1514-151/+641
| | | | | | | | | | | | | | | | | | 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
* Prevent implicit re-interpret casts between ExtVector and Scalar types.Stephen Canon2015-09-152-0/+27
| | | | | | 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
* clang/test/CodeGenCXX/2009-04-23-bool2.cpp: Avoid -mms-bitfields to add ↵NAKAMURA Takumi2015-09-141-1/+1
| | | | | | | explicit triple. FIXME: Better way to cancel -mms-bitfields? llvm-svn: 247640
* [Solaris] Default to -fno-cxa-finalize.Rafael Espindola2015-09-142-6/+7
| | | | | | | | | | | 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
* [WebAssembly] Define the atomic type sizesDan Gohman2015-09-142-26/+25
| | | | | | | | | | | | | 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
* [WebAssembly] Simplify code by avoiding duplicating the default behavior.Dan Gohman2015-09-141-1/+0
| | | | llvm-svn: 247623
* [WebAssembly] Use "long long" for int_fast64_t and int_least64_t on wasm64Dan Gohman2015-09-143-22/+36
| | | | | | | | | 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
* Revert "Always_inline codegen rewrite" and 2 follow-ups.Evgeniy Stepanov2015-09-1416-365/+28
| | | | | | | | | | 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
* PR24595: Ignore calling convention modifiers for structors in MS ABI.Andrey Bokhanko2015-09-148-17/+68
| | | | | | | | | | 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
* C11 _Bool bitfield diagnosticRachel Craik2015-09-1412-39/+43
| | | | | | | | | | | | 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
* [analyzer] Update SATestBuild.py to set -isysroot for preprocessed filesDevin Coughlin2015-09-141-2/+19
| | | | | | | | | 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
* [Static Analyzer] Turn on some nullability checks by default.Gabor Horvath2015-09-141-0/+5
| | | | | | Differential Revision: http://reviews.llvm.org/D12858 llvm-svn: 247614
* [Static Analyzer] Nullability checker optimization.Gabor Horvath2015-09-141-1/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D12848 llvm-svn: 247612
* Driver should forward at most one gdwarf-N flag to cc1as.Douglas Katzman2015-09-142-15/+11
| | | | llvm-svn: 247611
* [Solaris] Add -lc also when linking shared librariesRafael Espindola2015-09-142-1/+18
| | | | | | | | | | 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
* [Static Analyzer] Relaxing a caching out related assert.Gabor Horvath2015-09-141-1/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D12818 llvm-svn: 247598
* Fix a nasty bug with the partial destruction of nested arrays;John McCall2015-09-143-2/+66
| | | | | | | | | it escaped notice because it's only used for heterogeneous initialization. rdar://21397946 llvm-svn: 247597
* [Static Analyzer] Moving nullability checkers out of alpha.Gabor Horvath2015-09-143-4/+4
| | | | llvm-svn: 247595
* [opaque pointer type] Fix a few uses of PointerType::getElementType in favor ↵David Blaikie2015-09-144-12/+10
| | | | | | | | | | 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
* [Static Analyzer] Moving nullability checkers to a top level package.Gabor Horvath2015-09-144-13/+117
| | | | | | Differential Revision: http://reviews.llvm.org/D12852 llvm-svn: 247590
* Revert "[opaque pointer type] update for LLVM API change"David Blaikie2015-09-145-10/+11
| | | | | | | | | | 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
* Update cxx-irgen.cpp test to allow signext in alwaysinline functions.Samuel Antao2015-09-141-1/+1
| | | | | | This was causing an error in Power8 targets. llvm-svn: 247584
* Test commitRachel Craik2015-09-141-2/+2
| | | | | | Remove some trailing whitespace llvm-svn: 247560
* [CMake] r247548 introduced llvm-readobj.NAKAMURA Takumi2015-09-141-1/+1
| | | | llvm-svn: 247554
* [CMake] Reformat CLANG_TEST_DEPS.NAKAMURA Takumi2015-09-141-1/+2
| | | | llvm-svn: 247553
* [mips] Add test case to check ABI flag emissions in case of inline assemblerSimon Atanasyan2015-09-141-0/+12
| | | | | | Follow up to r247546. The test case reproduces the problem fixed by this commit. llvm-svn: 247548
* [Sema] Reject value-initialization of function typesDavid Majnemer2015-09-143-0/+13
| | | | | | | | | 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
* [Static Analyzer] Remove a redundant file.Gabor Horvath2015-09-131-623/+0
| | | | llvm-svn: 247533
* [Static Analyzer] Merge the Objective-C Generics Checker into Dynamic Type ↵Gabor Horvath2015-09-134-58/+673
| | | | | | | | Propagation checker. Differential Revision: http://reviews.llvm.org/D12381 llvm-svn: 247532
* [docs] NFC: Fix line formatting in INSTALL.txtVedant Kumar2015-09-131-3/+3
| | | | | | | | Patch by beltex! Differential Revision: http://reviews.llvm.org/D12684 llvm-svn: 247530
* Use -f instead of -d flag for testing existing of clang executable ↵Ted Kremenek2015-09-121-2/+2
| | | | | | (http://reviews.llvm.org/D12827). llvm-svn: 247510
* Test commit.Kelvin Li2015-09-121-1/+0
| | | | llvm-svn: 247503
* [CodeGen] Remove wrapper-free always_inline functions from COMDATsDavid Majnemer2015-09-122-13/+17
| | | | | | always_inline functions without a wrapper don't need to be in a COMDAT. llvm-svn: 247500
* Clean up trailing whitespace in the builtin headersSean Silva2015-09-1213-103/+103
| | | | llvm-svn: 247498
OpenPOWER on IntegriCloud