summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Adding a test for a compiler crash that was fixed in r248069.Douglas Yung2016-05-033-0/+13
| | | | | | Differential Revision: http://reviews.llvm.org/D19048 llvm-svn: 268344
* [CMake] Enable LIBCXX HEADERS in Apple-Stage2.cmakeChris Bieneman2016-05-021-1/+1
| | | | | | This enables installing the libcxx headers. llvm-svn: 268322
* Fix argument expansion of reference fields of structsReid Kleckner2016-05-023-1/+27
| | | | | | | | | | | | | | | | | | | r268261 made Clang "expand" more struct arguments on Windows. It removed the check for 'RD->isCLike()', which was preventing us from attempting to expand structs with reference type fields. Our expansion code was attempting to load and pass each field of the type in turn. We were accidentally doing one to many loads on reference type fields. On the function prologue side, we can use EmitLValueForFieldInitialization, which obviously gets the address of the field. On the call side, I tweaked EmitRValueForField directly, since this is the only use of this method. Fixes PR27607 llvm-svn: 268321
* [CMake] Install libcxx-headers as part of the Apple-stage2 distributionChris Bieneman2016-05-021-0/+1
| | | | | | This installs the clang headers as part of the install-distribution target. llvm-svn: 268320
* [CMake] Adding clang-headers to the Apple-stage2 distributionChris Bieneman2016-05-021-0/+1
| | | | | | This installs the clang headers as part of the install-distribution target. llvm-svn: 268319
* Remove unneeded test in tryCaptureAsConstant.Akira Hatanaka2016-05-021-4/+4
| | | | | | | | It isn't necessary to call hasDefaultArg because we can't rematerialize a captured variable that is a function parameter, regardless of whether or not it has a default argument. NFC. llvm-svn: 268318
* [CodeGenObjCXX] Don't rematerialize default arguments of functionAkira Hatanaka2016-05-022-0/+21
| | | | | | | | | | | | | | | | | | | | | | parameters in the body of a block. This fixes a bug where clang would materialize the default argument inside the body of a block instead of passing the value via the block descriptor. For example, in the code below, foo1 would always print 42 regardless of the value of argument "a" passed to foo1. void foo1(const int a = 42 ) { auto block = ^{ printf("%d\n", a); }; block(); } rdar://problem/24449235 llvm-svn: 268314
* [CUDA] Make sure device-side __global__ functions are always visible.Artem Belevich2016-05-022-8/+24
| | | | | | | | | | | | __global__ functions are a special case in CUDA. Even when the symbol would normally not be externally visible according to C++ rules, they still must be visible in CUDA GPU object so host-side stub can launch them. Differential Revision: http://reviews.llvm.org/D19748 llvm-svn: 268299
* Revert "[Driver] Quote clang full version in dwarf producer when invoking cc1as"Bruno Cardoso Lopes2016-05-022-4/+1
| | | | | | | | | | | | | | This reverts commit r264813 / 6484b95d634f53dd929c75265ef3c4decf397584. While using it in the shell is fine, this a problem when cc1as is invoked directly by the driver because single quoting the clang full version makes cc1as write out the version with the quotes in the final binary. If the user wants to copy-n-pastable output, it could use either -### or CC_PRINT_OPTIONS=1 clang -v ... llvm-svn: 268297
* Expand aggregate arguments more often on 32-bit WindowsReid Kleckner2016-05-026-98/+125
| | | | | | | | | | | | | | | | | | | | Before this change, we would pass all non-HFA record arguments on Windows with byval. Byval often blocks optimizations and results in bad code generation. Windows now uses the existing workaround that other x86_32 platforms use. I also expanded the workaround to handle C++ records with constructors on Windows. On non-Windows platforms, we have to keep generating the same LLVM IR prototypes if we want our bitcode to be ABI compatible. Otherwise we will encounter mismatch issues like PR21573. Essentially fixes PR27522 in Clang instead of LLVM. Reviewers: hans Differential Revision: http://reviews.llvm.org/D19756 llvm-svn: 268261
* [WebAssembly] Rename memory_size intrinsic to current_memoryDerek Schuff2016-05-023-7/+7
| | | | | | This follows the recent change in the wasm spec. llvm-svn: 268256
* [CLANG][AVX512][BUILTIN]movap{d|s}{128|256|512}Michael Zuckerman2016-05-025-0/+182
| | | | | | Differential Revision: http://reviews.llvm.org/D17818 llvm-svn: 268230
* [Clang][AVX512][BuiltIn] Adding intrinsics for cvtps2pd instruction setMichael Zuckerman2016-05-023-0/+85
| | | | | | Differential Revision: http://reviews.llvm.org/D19774 llvm-svn: 268217
* [Clang][avx512][builtin] Adding intrinsics for vexpand{d|q|ps|pd} instrctuon setMichael Zuckerman2016-05-023-0/+218
| | | | | | Differential Revision: http://reviews.llvm.org/D19467 llvm-svn: 268214
* [Clang][BuiltIn][avx512] Adding intrinsics for vpshufd instruction setMichael Zuckerman2016-05-025-0/+91
| | | | | | Differential Revision: http://reviews.llvm.org/D19580 llvm-svn: 268213
* [clang][Builtin][AVX512] Adding intrinsics for vmovshdup and vmovsldup ↵Michael Zuckerman2016-05-015-0/+210
| | | | | | | | instruction set Differential Revision: http://reviews.llvm.org/D19595 llvm-svn: 268196
* python: add bindings for children of diagnosticsSaleem Abdulrasool2016-04-302-0/+44
| | | | | | | | | | | | | This exposes the Clang API bindings clang_getChildDiagnostics (which returns a CXDiagnosticSet) and clang_getNumDiagnosticsInSet / clang_getDiagnosticInSet (to traverse the CXDiagnosticSet), and adds a helper children property in the Python Diagnostic wrapper. Also, this adds the missing OVERLOAD_CANDIDATE (700) cursor type. Patch by Hanson Wang! llvm-svn: 268167
* Stab in the dark to fix the PS4 botChris Bieneman2016-04-301-0/+3
| | | | | | r268127 is causing the PS4 bots to fail. Not sure what is causing it, but hopefully this will fix it. llvm-svn: 268156
* Reverting 268055 as it caused PR27579.Amjad Aboud2016-04-305-94/+22
| | | | llvm-svn: 268151
* Delete store to Target option PositionIndependentExecutable as PIE is now ↵Sriraman Tallam2016-04-291-1/+0
| | | | | | | | set in module flags. Differential Revision: http://reviews.llvm.org/D19749 llvm-svn: 268137
* [CUDA] Copy host builtin types to NVPTXTargetInfo.Justin Lebar2016-04-295-2/+102
| | | | | | | | | | | | | | | | | Summary: Host and device types must match, otherwise when we pass values back and forth between the host and device, we will get the wrong result. This patch makes NVPTXTargetInfo inherit most of its type information from the host's target info. Reviewers: rsmith Subscribers: cfe-commits, jhen, tra Differential Revision: http://reviews.llvm.org/D19346 llvm-svn: 268131
* [NFC] Initialize a variable to make buildbot green.Denis Zobnin2016-04-291-1/+1
| | | | | | | | | In r268085 "[MS] Make #pragma pack use PragmaStack<> class." there was an uninitialized variable 'Alignment', which caused the following failure: http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/1758 Zero-initialize the variable to fix this failure. llvm-svn: 268129
* Fix test case for incompatible sysroot warningChris Bieneman2016-04-291-5/+5
| | | | | | r268127 broke some bots because it needs to specify a darwin target. llvm-svn: 268128
* Add a new warning to notify users of mismatched SDK and deployment targetChris Bieneman2016-04-294-5/+59
| | | | | | | | | | | | | | | Summary: This patch adds a new driver warning -Wincompatible-sdk which notifies the user when they are mismatching the version min options and the sysroot. The patch works by checking the sysroot (if present) for an SDK name, then matching that against the target platform. In the case of a mismatch it logs a warning. Reviewers: bob.wilson, rsmith Subscribers: rsmith, edward-san, cfe-commits Differential Revision: http://reviews.llvm.org/D18088 llvm-svn: 268127
* [Sema] Specify the underlying type for an enum. NFC.George Burgess IV2016-04-291-1/+1
| | | | llvm-svn: 268113
* Add the ability to determine whether a format string argument is of a double ↵Aaron Ballman2016-04-291-0/+4
| | | | | | type or not. This change is tested by clang-tidy in r268100. llvm-svn: 268103
* Method Pool in modules: we make sure that if a module contains an entry forManman Ren2016-04-2915-0/+94
| | | | | | | | | | | | | | | a selector, the entry should be complete, containing everything introduced by that module and all modules it imports. Before writing out the method pool of a module, we sync up the out of date selectors by pulling in methods for the selectors, from all modules it imports. In ReadMethodPool, after pulling in the method pool entry for module A, this lets us skip the modules that module A imports. rdar://problem/25900131 llvm-svn: 268091
* Use the new path for coverage related headers and update CMakeLists.txtEaswaran Raman2016-04-292-3/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D19612 llvm-svn: 268090
* [MS] Make #pragma pack use PragmaStack<> class.Denis Zobnin2016-04-294-194/+66
| | | | | | | | | | | | | | | Make implementation of #pragma pack consistent with other "stack" pragmas. Use PragmaStack<> class instead of old representation of internal stack. Don't change compiler's behavior. TODO: 1. Introduce diagnostics on popping named slots from pragma stacks. Reviewer: rnk Differential revision: http://reviews.llvm.org/D19727 llvm-svn: 268085
* Fix crash in BuildCXXDefaultInitExpr.Reid Kleckner2016-04-292-2/+21
| | | | | | | | | | | Fix crash in BuildCXXDefaultInitExpr when member of template class has same name as the class itself. Based on patch by Raphael "Teemperor" Isemann! Differential Revision: http://reviews.llvm.org/D19721 llvm-svn: 268082
* [Concepts] Pass requires-clause to ActOnTemplateParameterList; NFCHubert Tong2016-04-295-16/+19
| | | | | | | | | | | | | | Summary: Prepare to store requires-clause expression for access via TemplateParameterList. Reviewers: aaron.ballman, faisalv, rsmith Subscribers: cfe-commits, nwilson Differential Revision: http://reviews.llvm.org/D19220 llvm-svn: 268081
* [Clang][Darwin] Define __ARM_DWARF_EH__ for WatchABIChris Bieneman2016-04-292-0/+5
| | | | | | | | | | | | Summary: The Darwin armv7k ABI uses Dwarf EH, so we need to set the OS define correctly. Without this the gcc_personality fails to build. Reviewers: t.p.northover Subscribers: aemerson, cfe-commits, rengolin Differential Revision: http://reviews.llvm.org/D19693 llvm-svn: 268078
* Improve test coverage of -Wdouble-promotionRobert Lougher2016-04-291-1/+41
| | | | | | | | | | This patch adds coverage for additional cases where implicit conversion can occur (assignment and return). It also adds tests for some cases where a warning should occur but none is produced. These are marked as FIXME. Differential Revision: http://reviews.llvm.org/D16298 llvm-svn: 268075
* Add a Subjects line to NoDebugAttr [NFC].Paul Robinson2016-04-295-16/+8
| | | | | | | | | | | The 'nodebug' attribute had hand-coded constraints; replace those with a Subjects line in Attr.td. Also add a missing test to verify the attribute is okay on an Objective-C method. Differential Revision: http://reviews.llvm.org/D19689 llvm-svn: 268065
* Recommitted r264281 "Supporting all entities declared in lexical scope in ↵Amjad Aboud2016-04-295-22/+94
| | | | | | | | LLVM debug info." After fixing PR26942 in r267004. llvm-svn: 268055
* [ARM] Guard the declarations of f16 to f32 vcvt intrinsics in arm_neon.h by ↵Silviu Baranga2016-04-292-2/+15
| | | | | | | | | | | | | | | | | | | testing __ARM_FP Summary: Conversions between float and half are only available when the taraget has the half-precision extension. Guard these intrinsics so that they don't cause crashes in the backend. Fixes PR27550. Reviewers: rengolin, t.p.northover Subscribers: cfe-commits, aemerson, t.p.northover, rengolin Differential Revision: http://reviews.llvm.org/D19665 llvm-svn: 268047
* Recommit "[MS] Improved implementation of stack pragmas (vtordisp, *_seg)"Denis Zobnin2016-04-297-86/+137
| | | | | | | | | | | | | | | | | | | | | | Slightly updated version, double-checked build and tests. Improve implementation of MS pragmas that use stack + compatibility fixes. This patch: 1. Changes implementation of #pragma vtordisp to use PragmaStack class that other stack pragmas use; 2. Fixes "#pragma vtordisp()" behavior - it shouldn't affect the stack; 3. Supports "save-restore" of pragma stacks on enter / exit a C++ method body, as MSVC does. TODO: 1. Change implementation of #pragma pack to use the same approach; 2. Introduce diagnostics on popping named stack slots, as MSVC does. Reviewers: rnk, thakis Differential revision: http://reviews.llvm.org/D19361 llvm-svn: 268029
* [clang][BuiltIn][AVX512]Adding intrinsics for cmp{ss|sd} instruction set.Michael Zuckerman2016-04-293-1/+102
| | | | | | Differential Revision: http://reviews.llvm.org/D19601 llvm-svn: 268028
* [OPENMP] Fix detection of explicit data-sharing attributes in templates.Alexey Bataev2016-04-292-0/+17
| | | | | | Fixes a bug with analysis of data-sharing attributes in templates. llvm-svn: 268020
* Implementation of VlA of GNU C++ extension, by Vladimir Yakovlev.Alexey Bataev2016-04-298-15/+199
| | | | | | | This enables GNU C++ extension "Variable length array" by default. Differential Revision: http://reviews.llvm.org/D18823 llvm-svn: 268018
* [Clang][AVX512][Builtin] Adding intrinsics for compress instruction setMichael Zuckerman2016-04-293-0/+119
| | | | | | Differential Revision: http://reviews.llvm.org/D19599 llvm-svn: 268013
* [Parser] Clear the TemplateParamScope bit of the current scope's flagAkira Hatanaka2016-04-297-6/+21
| | | | | | | | | | | | | | | | | | | | | | | if we are parsing a template specialization. This commit makes changes to clear the TemplateParamScope bit and set the TemplateParamParent field of the current scope to null if a template specialization is being parsed. Before this commit, Sema::ActOnStartOfLambdaDefinition would check whether the parent template scope had any decls to determine whether or not a template specialization was being parsed. This wasn't correct since it couldn't distinguish between a real template specialization and a template defintion with an unnamed template parameter (only template parameters with names are added to the scope's decl list). To fix the bug, this commit changes the code to check the pointer to the parent template scope rather than the decl list. rdar://problem/23440346 Differential Revision: http://reviews.llvm.org/D19175 llvm-svn: 267975
* [OPENMP] Enable correct generation of runtime call when target directive is ↵Carlo Bertolli2016-04-292-2/+22
| | | | | | | | | | separated from teams directive by multiple curly brackets http://reviews.llvm.org/D18474 This patch fixes a bug in code generation of the correct OpenMP runtime library call in presence of target and teams, when target is separated by teams with multiple curly brackets. The current implementation will not be able to see the teams directive inside target and issue a call to tgt_target instead of the correct one tgt_target_teams. llvm-svn: 267972
* PR27549: fix bug that resulted in us giving a translation-unit-scope variable aRichard Smith2016-04-293-5/+20
| | | | | | | | mangled name if it happened to be declared in an 'extern "C++"' context. This also causes us to use the '_ZL' mangling rather than the '_Z' mangling for internal-linkage entities that are wrapped in a language linkage construct. llvm-svn: 267969
* Avoid -Wshadow warnings about constructor parameters named after fieldsReid Kleckner2016-04-298-28/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | Usually these parameters are used solely to initialize the field in the initializer list, and there is no real shadowing confusion. There is a new warning under -Wshadow called -Wshadow-field-in-constructor-modified. It attempts to find modifications of such constructor parameters that probably intended to modify the field. It has some false negatives, though, so there is another warning group, -Wshadow-field-in-constructor, which always warns on this special case. For users who just want the old behavior and don't care about these fine grained groups, we have a new warning group called -Wshadow-all that activates everything. Fixes PR16088. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18271 llvm-svn: 267957
* [Sema] Fix a crash that occurs when a variable template is initializedAkira Hatanaka2016-04-282-3/+23
| | | | | | | | | | | | | | | with a generic lambda. This patch fixes Sema::InstantiateVariableInitializer to switch to the context of the variable before instantiating its initializer, which is necessary to set the correct type for VarTemplateSpecializationDecl. This is the first part of the patch that was reviewed here: http://reviews.llvm.org/D19175 rdar://problem/23440346 llvm-svn: 267956
* Differential Revision: http://reviews.llvm.org/D19687Sriraman Tallam2016-04-281-8/+6
| | | | | | Set module flag PIELevel. Simplify code that sets PICLevel flag. llvm-svn: 267948
* [clang][AVX512][Builtin] Adding intrinsics for the SAD instruction set.Michael Zuckerman2016-04-285-0/+143
| | | | | | Differential Revision: http://reviews.llvm.org/D19591 llvm-svn: 267942
* One more fix for use of invalid PresumedLocs missed by r267914.Richard Smith2016-04-281-2/+3
| | | | llvm-svn: 267926
* [analyzer] Add path note for localizability checker.Devin Coughlin2016-04-282-14/+93
| | | | | | | | | Add a path note indicating the location of the non-localized string literal in NonLocalizedStringChecker. rdar://problem/25981525 llvm-svn: 267924
OpenPOWER on IntegriCloud