summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [CUDA] Implemented device-side support functions in <cmath>.Artem Belevich2016-01-263-1/+228
| | | | | | | | | | | | | | | | CUDA expects math functions in std:: namespace to work on device side. In order to make it work with clang without allowing device-side code generation for functions w/o appropriate target attributes, this patch provides device-side implementations for <cmath> functions. Most of them call global-scope math functions provided by CUDA headers. In few cases we use clang builtins. Tested out-of tree by compiling and running thrust's unit_tests. https://github.com/thrust/thrust/tree/master/testing Differential Revision: http://reviews.llvm.org/D16593 llvm-svn: 258880
* [WinEH] Annotate calls to __RTtypeid with a funclet bundleDavid Majnemer2016-01-262-3/+25
| | | | | | | | | | Clang's CodeGen has several paths which end up invoking or calling a function. The one that we used for calls to __RTtypeid did not appropriately annotate the call with a funclet bundle. This fixes PR26329. llvm-svn: 258877
* Remove autoconf supportChris Bieneman2016-01-2684-3413/+0
| | | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "This is the way [autoconf] ends Not with a bang but a whimper." -T.S. Eliot Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D16472 llvm-svn: 258862
* Do not define GXX_RTTI macro for C.Yunzhong Gao2016-01-262-6/+9
| | | | | | | | This is same as GCC behavior (tested with GCC 4.8.2). Differential Revision: http://reviews.llvm.org/D16365 llvm-svn: 258850
* [MS ABI] Allow a member pointers' converted type to changeDavid Majnemer2016-01-2613-9/+76
| | | | | | | | | | | | | | | | | | | | | | | | Member pointers in the MS ABI are tricky for a variety of reasons. The size of a member pointer is indeterminate until the program reaches a point where the representation is required to be known. However, *pointers* to member pointers may exist without knowing the pointee type's representation. In these cases, we synthesize an opaque LLVM type for the pointee type. However, we can be in a situation where the underlying member pointer's representation became known mid-way through the program. To account for this, we attempted to manicure CodeGen's type-cache so that we can replace the opaque member pointer type with the real deal while leaving the pointer types unperturbed. This, unfortunately, is a problematic approach to take as we will violate CodeGen's invariants. These violations are mostly harmless but let's do the right thing instead: invalidate the type-cache if a member pointer's LLVM representation changes. This fixes PR26313. llvm-svn: 258839
* Fix Clang-tidy modernize-use-nullptr warnings; other minor fixes.Eugene Zelenko2016-01-268-37/+30
| | | | | | Differential revision: http://reviews.llvm.org/D16567 llvm-svn: 258836
* Class Property: parse property attribute (class).Manman Ren2016-01-267-9/+87
| | | | | | | | | This is the third patch in a series of patches to support class properties in addition to instance properties in objective-c. rdar://23891898 llvm-svn: 258834
* [OpenMP] Parsing + sema for target parallel directive.Arpith Chacko Jacob2016-01-2638-6/+2219
| | | | | | | | | | | | | Summary: This patch adds parsing + sema for the target parallel directive and its clauses along with testcases. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D16553 Rebased to current trunk and updated test cases. llvm-svn: 258832
* Use instance_properties instead of properties. NFC.Manman Ren2016-01-2613-40/+45
| | | | | | | | | | | All current properties are instance properties. This is the second patch in a series of patches to support class properties in addition to instance properties in objective-c. rdar://23891898 llvm-svn: 258824
* [CUDA] Add -fcuda-allow-variadic-functions.Justin Lebar2016-01-265-9/+26
| | | | | | | | | | | | | | | | | Summary: Turns out the variadic function checking added in r258643 was too strict for some existing users; give them an escape valve. When -fcuda-allow-variadic-functions is passed, the front-end makes no attempt to disallow C-style variadic functions. Calls to va_arg are still not allowed. Reviewers: tra Subscribers: cfe-commits, jhen, echristo, bkramer Differential Revision: http://reviews.llvm.org/D16559 llvm-svn: 258822
* [OpenMP] Parsing + sema for defaultmap clause.Arpith Chacko Jacob2016-01-2617-0/+347
| | | | | | | | | | | Summary: This patch adds parsing + sema for the defaultmap clause associated with the target directive (among others). Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D16527 llvm-svn: 258817
* Revert "[Driver] Make sure -fno-math-builtin option is being passed by the ↵Chad Rosier2016-01-263-6/+3
| | | | | | | | driver." This reverts commit r258814. llvm-svn: 258815
* [Driver] Make sure -fno-math-builtin option is being passed by the driver.Chad Rosier2016-01-263-3/+6
| | | | | | | | | | Support for the -fno-math-builtin option was added in r186899. The codegen side is being tested in test/CodeGen/nomathbuiltin.c. The missing part was just passing the option through the driver. PR26317 llvm-svn: 258814
* [Driver] Update FIXME comment now that PR4941 has been addressed.Chad Rosier2016-01-261-1/+1
| | | | | | The actual fix should be addressed by someone who can test on Darwin. llvm-svn: 258813
* [OPENMP 4.5] Allow arrays in 'reduction' clause.Alexey Bataev2016-01-2615-137/+363
| | | | | | OpenMP 4.5, alogn with array sections, allows to use variables of array type in reductions. llvm-svn: 258804
* AMDGPU: Add amdgcn cube builtinsMatt Arsenault2016-01-262-0/+28
| | | | llvm-svn: 258794
* Recommit: R258773 [OpenCL] Pipe builtin functionsXiuli Pan2016-01-268-1/+511
| | | | | | | | | | | | | | | | | Fix arc patch fuzz error. Summary: Support for the pipe built-in functions for OpenCL 2.0. The pipe builtin functions may have infinite kinds of element types, one approach would be to just generate calls that would always use generic types such as void*. This patch is based on bader's opencl support patch on SPIR-V branch. Reviewers: Anastasia, pekka.jaaskelainen Subscribers: keryell, bader, cfe-commits Differential Revision: http://reviews.llvm.org/D15914 llvm-svn: 258782
* Fix -Wnull-conversion for long macros.Richard Trieu2016-01-265-45/+77
| | | | | | | | | Move the function to get a macro name from DiagnosticRenderer.cpp to Lexer.cpp so that other files can use it. Lexer now has two functions to get the immediate macro name, the newly added one is better for diagnostic purposes. Make -Wnull-conversion use this function for better NULL macro detection. llvm-svn: 258778
* Recommit the test for r258720 using -###Ehsan Akhgari2016-01-261-8/+30
| | | | llvm-svn: 258776
* Revert "[OpenCL] Pipe builtin functions"David Majnemer2016-01-268-510/+1
| | | | | | | This reverts commit r258773, it broke the build bots: http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/43853 llvm-svn: 258775
* [OpenCL] Pipe builtin functionsXiuli Pan2016-01-268-1/+510
| | | | | | | | | | | | | | | | Summary: Support for the pipe built-in functions for OpenCL 2.0. The pipe builtin functions may have infinite kinds of element types, one approach would be to just generate calls that would always use generic types such as void*. This patch is based on bader's opencl support patch on SPIR-V branch. Reviewers: Anastasia, pekka.jaaskelainen Subscribers: keryell, bader, cfe-commits Differential Revision: http://reviews.llvm.org/D15914 llvm-svn: 258773
* Revert the test for r258720 temporarilyEhsan Akhgari2016-01-261-15/+0
| | | | | | | This test is failing on a bot for reasons that are unclear to me. Reverting for now... llvm-svn: 258772
* [Sema] Remove stray semicolons.David Majnemer2016-01-261-2/+2
| | | | | | No functional change is intended. llvm-svn: 258769
* [Sema] Incomplete types are OK for covariant returnsDavid Majnemer2016-01-262-12/+25
| | | | | | | | | | Per C++14 [class.virtual]p8, it is OK for the return type's class type to be incomplete so long as the return type is the same between the base and complete classes. This fixes PR26297. llvm-svn: 258768
* [MS Compat] Don't crash if __GetExceptionInfo is in global scopeDavid Majnemer2016-01-263-4/+13
| | | | | | | | | | | __GetExceptionInfo triggered Sema::LazilyCreateBuiltin which tries to create a non-templated function decl. This is unnecessary and ill-advised, there is no need for us to create a declaration for such a builtin. This fixes PR26298. llvm-svn: 258762
* Fix use of constexpr std::pair that's not in C++11.Evgeniy Stepanov2016-01-251-1/+1
| | | | llvm-svn: 258749
* [cfi] Cross-DSO CFI diagnostic mode (clang part)Evgeniy Stepanov2016-01-259-56/+270
| | | | | | | | | | | | | | * Runtime diagnostic data for cfi-icall changed to match the rest of cfi checks * Layout of all CFI diagnostic data changed to put Kind at the beginning. There is no ABI stability promise yet. * Call cfi_slowpath_diag instead of cfi_slowpath when needed. * Emit __cfi_check_fail function, which dispatches a CFI check faliure according to trap/recover settings of the current module. * A tiny driver change to match the way the new handlers are done in compiler-rt. llvm-svn: 258745
* [CUDA] Add -target to cuda-constructor-alias.cu test so it doesn't fail on Mac.Justin Lebar2016-01-251-1/+1
| | | | | | | The test was checking that we passed -mconstructor-alias to host compilation, but that explicitly shouldn't happen on Mac. llvm-svn: 258737
* Update comments to match the implementation.Manman Ren2016-01-251-0/+1
| | | | llvm-svn: 258735
* [CUDA] Don't generate aliases for static extern "C" functions.Justin Lebar2016-01-252-0/+21
| | | | | | | | | | | | | | Summary: These aliases are done to support inline asm, but there's nothing we can do: NVPTX doesn't support aliases. Reviewers: tra Subscribers: cfe-commits, jhen, echristo Differential Revision: http://reviews.llvm.org/D16501 llvm-svn: 258734
* [CUDA] Disable ctor/dtor aliases in device code.Justin Lebar2016-01-252-3/+18
| | | | | | | | | | | | Summary: NVPTX doesn't support aliases, so don't generate them. Reviewers: tra Subscribers: cfe-commits, jhen, echristo Differential Revision: http://reviews.llvm.org/D16499 llvm-svn: 258733
* Move ObjCPropertyDecl to before ObjCContainerDecl.Manman Ren2016-01-251-191/+191
| | | | | | | | | | | | | After we add ObjCPropertyDecl::isClassProperty, we can use it in ObjCContainerDecl to define filter to iterate over instance properties and class properties. This is the first patch in a series of patches to support class properties in addition to instance properties in objective-c. rdar://23891898 llvm-svn: 258727
* [MSVC Compat] Only warn for unknown clang-cl argumentsEhsan Akhgari2016-01-258-7/+40
| | | | | | | | | | | | | | | | | Summary: MSVC's driver accepts all unknown arguments but warns about them. clang by default rejects all unknown arguments. This causes issues specifically with build systems such as autoconf which liberally pass things such as $LDFLAGS to the compiler and expect everything to work. This patch teaches clang-cl to ignore unknown driver arguments. Reviewers: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16511 llvm-svn: 258720
* LTO via the gold plugin needs to be told about debugger tuning.Paul Robinson2016-01-252-0/+20
| | | | | | Differential Revision: http://reviews.llvm.org/D16094 llvm-svn: 258712
* Pass --wrap=pthread_create to linker for -fsplit-stack.Rafael Espindola2016-01-252-0/+20
| | | | | | | | | | | | | From https://gcc.gnu.org/ml/gcc-patches/2010-09/msg01807.html -fsplit-stack should pass --wrap=pthread_create to linker for -fsplit-stack It is needed to initialize the stack guard. This fixes PR 20148. Patch by H.J Lu! llvm-svn: 258698
* Fix printing of types in initializers with suppressed tags.Benjamin Kramer2016-01-252-1/+14
| | | | | | | | | | | | | | | | | | Tag and specifier printing can be suppressed in Decl::printGroup, but these suppressions leak into the initializers. Thus int *x = ((void *)0), *y = ((void *)0); gets printed as int *x = ((void *)0), *y = ((*)0); And struct { struct Z z; } z = {(struct Z){}}; gets printed as struct { struct Z z; } z = {(){}}; The stops the suppressions from leaking into the initializers. Patch by Nick Sumner! Differential Revision: http://reviews.llvm.org/D16438 llvm-svn: 258679
* [Sema] Improve constnessDaniel Marjamaki2016-01-251-9/+9
| | | | llvm-svn: 258673
* Allow capture typedefs/type aliases for VLAs in lambdas/captured statements ↵Alexey Bataev2016-01-252-7/+21
| | | | | | | | chain. Previous it was allowed to capture VLAs/types with arrays of runtime bounds only inside the first lambda/capture statement in stack. Patch allows to capture these typedefs implicitly in chains of lambdas/captured statements. llvm-svn: 258669
* Fixed processing of GNU extensions to C99 designated initializersAlexey Bataev2016-01-252-6/+17
| | | | | | Clang did not handles correctly inner parts of arrays/structures initializers in GNU extensions to C99 designated initializers. llvm-svn: 258668
* [PGO] Windows buildbot failure fix. [NFC]Betul Buyukkurt2016-01-241-2/+3
| | | | llvm-svn: 258652
* Clang changes for value profilingBetul Buyukkurt2016-01-234-6/+109
| | | | | | Differential Revision: http://reviews.llvm.org/D8940 llvm-svn: 258650
* [CUDA] Disallow variadic functions other than printf in device code.Justin Lebar2016-01-233-13/+37
| | | | | | | | | | Reviewers: tra Subscribers: cfe-commits, echristo, jhen Differential Revision: http://reviews.llvm.org/D16484 llvm-svn: 258643
* [CUDA] Make printf work.Justin Lebar2016-01-237-0/+197
| | | | | | | | | | | | | | | | | | Summary: The code in CGCUDACall is largely based on a patch written by Eli Bendersky: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20140324/210218.html That patch implemented an LLVM pass lowering printf to vprintf; this one does something similar, but in Clang codegen. Reviewers: echristo Subscribers: cfe-commits, jhen, tra, majnemer Differential Revision: http://reviews.llvm.org/D16372 llvm-svn: 258642
* [CUDA] Reject the alias attribute in CUDA device code.Justin Lebar2016-01-233-0/+15
| | | | | | | | | | | | Summary: CUDA (well, strictly speaking, NVPTX) doesn't support aliases. Reviewers: echristo Subscribers: cfe-commits, jhen, tra Differential Revision: http://reviews.llvm.org/D16502 llvm-svn: 258641
* [CUDA] Use Triple::isNVPTX() instead of enumerating nvptx && nvptx64.Justin Lebar2016-01-231-4/+2
| | | | | | | | | | Summary: No functional changes. Subscribers: tra, echristo, jhen, cfe-commits Differential Revision: http://reviews.llvm.org/D16495 llvm-svn: 258640
* Improving documentation for the isMoveAssignmentOperator AST matcher.Aaron Ballman2016-01-232-10/+14
| | | | | | Patch by Jonathan Coe. llvm-svn: 258628
* SemaOpenMP.cpp: Fix a warning in r258543. [-Wunused-variable]NAKAMURA Takumi2016-01-231-0/+1
| | | | llvm-svn: 258598
* [cfi] Do not emit bit set entry for available_externally vtables.Evgeniy Stepanov2016-01-232-1/+16
| | | | | | | | In the Itanium ABI, vtable may be emitted speculatively as an available_externally global. Such vtable may not be present at the link time and should not have a corresponding CFI bit set entry. llvm-svn: 258596
* [analyzer] SATestBuild.py: Remove html and log when producing reference results.Devin Coughlin2016-01-231-7/+29
| | | | | | | | | | | The html reports are huge -- every issue in a given file results in a separate copy of the source code, in HTML form, for the file. This gets very large quickly and it doesn't make sense to check this into a reference repository. Also remove the log when generating reference results because it can leak absolute path names. We still keep both the html and the log around when producing non-reference results. llvm-svn: 258594
* [analyzer] Fixup r258572 Utility to match function calls.Anna Zaks2016-01-231-1/+1
| | | | | | Initialize the IdentifierInfo pointer. Hope this fixes the buildbot breakage. llvm-svn: 258591
OpenPOWER on IntegriCloud