summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
...
* clang/test/CodeGenCXX/cfi-blacklist.cpp: Exclude ms targets. They would be ↵NAKAMURA Takumi2016-04-281-2/+2
| | | | | | non-cfi. llvm-svn: 267830
* Driver: only produce CFI -fvisibility= error when compiling.Peter Collingbourne2016-04-281-2/+4
| | | | | | | The -fvisibility= flag only affects compile jobs, so there's no need to error out because of it if we aren't compiling (e.g. if we are only linking). llvm-svn: 267824
* [OpenMP] Code generation for target exit data directiveSamuel Antao2016-04-271-0/+221
| | | | | | | | | | | | | | | Summary: This patch adds support for the target exit data directive code generation. Given that, apart from the employed runtime call, target exit data requires the same code generation pattern as target enter data, the OpenMP codegen entry point was renamed and reused for both. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: cfe-commits, fraggamuffin, caomhin Differential Revision: http://reviews.llvm.org/D17369 llvm-svn: 267814
* [OpenMP] Code generation for target enter data directiveSamuel Antao2016-04-271-0/+221
| | | | | | | | | | | | Summary: This patch adds support for the target enter data directive code generation. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: cfe-commits, fraggamuffin, caomhin Differential Revision: http://reviews.llvm.org/D17368 llvm-svn: 267812
* [OpenMP] Code generation for target data directiveSamuel Antao2016-04-271-0/+248
| | | | | | | | | | | | | | | Summary: This patch adds support for the target data directive code generation. Part of the already existent functionality related with data maps is moved to a new function so that it could be reused. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: cfe-commits, fraggamuffin, caomhin Differential Revision: http://reviews.llvm.org/D17367 llvm-svn: 267811
* [OpenMP] Map clause codegeneration.Samuel Antao2016-04-272-3/+3251
| | | | | | | | | | | | | | | Summary: Implement codegen for the map clause. All the new list items in 4.5 specification are supported. Fix bug in the generation of array sections that was exposed by some of the map clause tests: for pointer types the offsets have to be calculated from the pointee not the pointer. Reviewers: hfinkel, kkwli0, carlo.bertolli, arpith-jacob, ABataev Subscribers: ABataev, cfe-commits, caomhin, fraggamuffin Differential Revision: http://reviews.llvm.org/D16749 llvm-svn: 267808
* Minor test simplification (per David Blaikie suggestion).Paul Robinson2016-04-271-14/+5
| | | | llvm-svn: 267804
* [modules] When diagnosing a missing module import, suggest adding a #include ifRichard Smith2016-04-2718-0/+72
| | | | | | | the current language doesn't have an import syntax and we can figure out a suitable file to include. llvm-svn: 267802
* Rework interface for bitset-using features to use a notion of LTO visibility.Peter Collingbourne2016-04-2714-81/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bitsets, and the compiler features they rely on (vtable opt, CFI), only have visibility within the LTO'd part of the linkage unit. Therefore, only enable these features for classes with hidden LTO visibility. This notion is based on object file visibility or (on Windows) dllimport/dllexport attributes. We provide the [[clang::lto_visibility_public]] attribute to override the compiler's LTO visibility inference in cases where the class is defined in the non-LTO'd part of the linkage unit, or where the ABI supports calling classes derived from abstract base classes with hidden visibility in other linkage units (e.g. COM on Windows). If the cross-DSO CFI mode is enabled, bitset checks are emitted even for classes with public LTO visibility, as that mode uses a separate mechanism to cause bitsets to be exported. This mechanism replaces the whole-program-vtables blacklist, so remove the -fwhole-program-vtables-blacklist flag. Because __declspec(uuid()) now implies [[clang::lto_visibility_public]], the support for the special attr:uuid blacklist entry is removed. Differential Revision: http://reviews.llvm.org/D18635 llvm-svn: 267784
* Set the default C standard to C99 when targeting the PS4.Sunil Srivastava2016-04-275-3/+32
| | | | | | | | Patch by Douglas Yung! Differential Revision: http://reviews.llvm.org/D19003 llvm-svn: 267772
* PR21823: 'nodebug' attribute on global/static variables.Paul Robinson2016-04-271-0/+55
| | | | | | | | | | Make 'nodebug' on a global/static variable suppress all debug info for the variable. Previously it would only suppress info for the associated initializer function, if any. Differential Revision: http://reviews.llvm.org/D19567 llvm-svn: 267746
* Revert r267691, it caused PR27535.Nico Weber2016-04-274-77/+0
| | | | llvm-svn: 267744
* Module debugging: Fix the DWO filename for PCH in a relative path.Adrian Prantl2016-04-271-0/+76
| | | | | | | | | | | PCH in a relative location had a redundant relative path on the DWO filename and the DW_AT_compilation_dir. This patch fixes this and adds testcases for PCH in the same directory, in a relative, and an absolute location. rdar://problem/25537947 llvm-svn: 267740
* [Clang][Builtin][AVX512] Adding intrisnics for the vpconflict{q|d} ↵Michael Zuckerman2016-04-271-0/+72
| | | | | | | | instruction set Differential Revision: http://reviews.llvm.org/D19525 llvm-svn: 267728
* Expose cxx constructor and method properties through libclang and python ↵Jonathan Coe2016-04-278-13/+30
| | | | | | | | | | | | | | | | | | | | | | | bindings. Summary: I have exposed the following function through libclang and the clang.cindex python bindings: clang_CXXConstructor_isConvertingConstructor, clang_CXXConstructor_isCopyConstructor, clang_CXXConstructor_isDefaultConstructor, clang_CXXConstructor_isMoveConstructor, clang_CXXMethod_isDefaulted I need (some of) these methods for a C++ code model I am building in Python to drive a code generator. Reviewers: compnerd, skalinichev Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15469 llvm-svn: 267706
* [Clang][BuiltIn][AVX512] Adding intrinsics without mask for VBROADCAST and ↵Michael Zuckerman2016-04-273-0/+174
| | | | | | | | VPBROADCAST instruction set . Differential Revision: http://reviews.llvm.org/D19196 llvm-svn: 267696
* [OPENMP] Fix crash on initialization of classes with no init clause inAlexey Bataev2016-04-271-9/+21
| | | | | | | | | | declare reductions. If reduction clause is applied to instance of class with user-defined reduction operation without initialization clause, it may cause a crash. Patch fixes this issue. llvm-svn: 267695
* [modules] Fix Decl's Used invariant.Vassil Vassilev2016-04-274-0/+77
| | | | | | | | | | | | | | | | | | | | The Decl::isUsed has a value for every decl. In non-module builds it is very difficult (but possible) to break this invariant but when we walk up the redecl chain we find the neccessary information. When deserializing the decls from a module it is much more difficult to update correctly this invariant. The patch centralizes the information whether a decl is used in the canonical decl marking the entire entity as being used. Fixes https://llvm.org/bugs/show_bug.cgi?id=27401 Patch by Cristina Cristescu and me. Thanks to Richard Smith who helped to debug and understand the issue! Reviewed by Richard Smith. llvm-svn: 267691
* [Clang][BuiltIn][AVX512]Adding intrinsics for vmovntdqa vmovntpd vmovntps ↵Michael Zuckerman2016-04-271-0/+25
| | | | | | | | instruction set Differential Revision: http://reviews.llvm.org/D19529 llvm-svn: 267690
* [OPENMP] Fix for codegen of captured variables in inlined directives.Alexey Bataev2016-04-274-4/+18
| | | | | | | | Currently there is a problem with codegen of inlined directives inside lambdas, it may cause a crash during codegen because of incorrect capturing of variables. Patch fixes this problem. llvm-svn: 267677
* PR27513: When determining which declaration to put into an exported lookupRichard Smith2016-04-2612-0/+40
| | | | | | | | | | | table for a module / PCH, never map from a normal declaration of a class to an injected-class-name declaration (or vice versa). Those declarations live in distinct lookup tables and should not be confused. We really shouldn't be using a CXXRecordDecl to represent an injected-class-name in the first place; I've filed PR27532 so we don't forget. llvm-svn: 267632
* Module debugging: Also correctly handle typedef'd foward-declared members.Adrian Prantl2016-04-263-5/+21
| | | | | | Thanks again to Richard Smith for pointing this out. llvm-svn: 267630
* Check 'r' and 'y specifiers of freebsd_kernel_printf format strings on PS4Sunil Srivastava2016-04-261-1/+8
| | | | | | This is an addendum to r229921. llvm-svn: 267625
* Module debugging: Add testcase for member classes of class template ↵Adrian Prantl2016-04-262-1/+18
| | | | | | specializations. llvm-svn: 267612
* Module debugging: Use the definition to determine module-defined types.Adrian Prantl2016-04-261-0/+9
| | | | | | Follow-up to r267464. Thanks to Richard Smith for pointing this out! llvm-svn: 267611
* Try to get at_file_missing.c passing after LLVM r267556.Nico Weber2016-04-261-2/+2
| | | | | | | | | | r267556 made backslashes escape the next character unconditionally in rsp files. This test echos a path into a rsp file, and paths contain backslashes on Windows. Since it's not important for this test to get the filename from the rsp file, just pass it regularly. llvm-svn: 267601
* [OpenCL] Add predefined macros.Yaxun Liu2016-04-263-11/+46
| | | | | | | | | | | | OpenCL spec requires __OPENCL_C_VERSION__ to be defined based on -cl-std option. This patch implements that. The patch also defines __FAST_RELAXED_MATH__ based on -cl-fast-relaxed-math option. Also fixed a test using -std=c99 for OpenCL program. Limit allowed language standard of OpenCL to be OpenCL standards. Differential Revision: http://reviews.llvm.org/D19071 llvm-svn: 267590
* Update test after LLVM r267556.Nico Weber2016-04-262-3/+4
| | | | llvm-svn: 267557
* [MSVC] PR27337: allow static_cast from private base to derived for WTLDmitry Polukhin2016-04-261-0/+40
| | | | | | | | | MSVC doesn't report even warning for cast from private base class to derived. Differential Revision: http://reviews.llvm.org/D19477 llvm-svn: 267534
* [lanai] Update handling of structs in arguments to be passed in registers.Jacques Pienaar2016-04-261-5/+5
| | | | | | Previously aggregate types were passed byval, change the ABI to pass these in registers instead. llvm-svn: 267496
* driver: Add a `--rsp-quoting` flag to pick response file quoting.Nico Weber2016-04-252-0/+47
| | | | | | | | | | | | | | | | | | | | Currently, clang-cl always uses Windows style for unquoting, and clang always uses POSIX style for unquoting. With this flag, it's possible to change these defaults. In general, response file quoting should match the shell the response file is used in. On Windows, it's possible to run clang-cl in a bash shell, or clang in cmd.exe, so a flag for overriding the default behavior is natural there. On non-Windows, Windows quoting probably never makes sense (except maybe in Wine), but having clang-cl behave differently based on the host OS seems strange too. So require that people who want to use posix-style response files with clang-cl on non-Windows pass --rsp-quoting=posix. http://reviews.llvm.org/D19425 llvm-svn: 267474
* Module Debugging: Fix the condition for determining whether a templateAdrian Prantl2016-04-253-18/+119
| | | | | | | | | | | | | | | | | | instantiation is in a module. This patch fixes the condition for determining whether the debug info for a template instantiation will exist in an imported clang module by: - checking whether the ClassTemplateSpecializationDecl is complete and - checking that the instantiation was in a module by looking at the first field. I also added a negative check to make sure that a typedef to a forward-declared template (with the definition outside of the module) is handled correctly. http://reviews.llvm.org/D19443 rdar://problem/25553724 llvm-svn: 267464
* Implement support for conditional between xvalues of reference-compatibleRichard Smith2016-04-251-0/+9
| | | | | | types. Patch by Erik Pilkington! llvm-svn: 267454
* When deducing template parameters from base classes of an argument type, don'tRichard Smith2016-04-251-0/+14
| | | | | | | preserve any deduced types from a failed deduction to a subsequent attempt at deduction. Patch by Erik Pilkington! llvm-svn: 267444
* [Clang][Builtin][AVX512]Adding k-register logic intrinsics KAND, KANDN, KOR, ↵Michael Zuckerman2016-04-251-0/+48
| | | | | | | | KORTEST, KXNOR, KXOR, KUNPACK instruction set. Differential Revision: http://reviews.llvm.org/D19466 llvm-svn: 267425
* [Clang][Builtin][AVX512]Adding intrinsics for vfpclass{sd|ss} ↵Michael Zuckerman2016-04-252-0/+96
| | | | | | | | vfpclass{pd|ps} instruction set Differential Revision: http://reviews.llvm.org/D19476 llvm-svn: 267414
* [analyzer] Let TK_PreserveContents span across the whole base region.Artem Dergachev2016-04-252-0/+66
| | | | | | | | | | | | If an address of a field is passed through a const pointer, the whole structure's base region should receive the TK_PreserveContents trait and avoid invalidation. Additionally, include a few FIXME tests shown up during testing. Differential Revision: http://reviews.llvm.org/D19057 llvm-svn: 267413
* [Clang][AVX512][BUILTIN] Adding intrinsics for ↵Michael Zuckerman2016-04-252-0/+144
| | | | | | | | VSCATTERPF{1|0}{DPS|QPS|DPD|QPD} instruction set Differential Revision: http://reviews.llvm.org/D19313 llvm-svn: 267398
* [OPENMP 4.5] Codegen for 'taskloop' directive.Alexey Bataev2016-04-251-0/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The taskloop construct specifies that the iterations of one or more associated loops will be executed in parallel using OpenMP tasks. The iterations are distributed across tasks created by the construct and scheduled to be executed. The next code will be generated for the taskloop directive: #pragma omp taskloop num_tasks(N) lastprivate(j) for( i=0; i<N*GRAIN*STRIDE-1; i+=STRIDE ) { int th = omp_get_thread_num(); #pragma omp atomic counter++; #pragma omp atomic th_counter[th]++; j = i; } Generated code: task = __kmpc_omp_task_alloc(NULL,gtid,1,sizeof(struct task),sizeof(struct shar),&task_entry); psh = task->shareds; psh->pth_counter = &th_counter; psh->pcounter = &counter; psh->pj = &j; task->lb = 0; task->ub = N*GRAIN*STRIDE-2; task->st = STRIDE; __kmpc_taskloop( NULL, // location gtid, // gtid task, // task structure 1, // if clause value &task->lb, // lower bound &task->ub, // upper bound STRIDE, // loop increment 0, // 1 if nogroup specified 2, // schedule type: 0-none, 1-grainsize, 2-num_tasks N, // schedule value (ignored for type 0) (void*)&__task_dup_entry // tasks duplication routine ); llvm-svn: 267395
* [Clang][AVX512][BuiltIn] Adding support to intrinsics of VPERMD and VPERMW ↵Michael Zuckerman2016-04-256-1/+316
| | | | | | | | instruction set Differential Revision: http://reviews.llvm.org/D19195 llvm-svn: 267380
* Debug info: Apply an empty debug location for global OpenMP destructors.Adrian Prantl2016-04-241-2/+2
| | | | | | | | | | | | LLVM really wants a debug location on every inlinable call in a function with debug info, because it otherwise cannot set up inlining debug info. This change applies an artificial line 0 debug location (which is how DWARF marks automatically generated code that has no corresponding source code) to the .__kmpc_global_dtor_. functions to avoid the LLVM Verifier complaining. llvm-svn: 267369
* Improve diagnostic checking for va_start to also warn on other instances of ↵Aaron Ballman2016-04-244-14/+30
| | | | | | | | undefined behavior, such as a parameter declared with the register keyword in C, or a parameter of a type that undergoes default argument promotion. This helps cover some more of the CERT secure coding rule EXP58-CPP. Pass an object of the correct type to va_start (https://www.securecoding.cert.org/confluence/display/cplusplus/EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start). llvm-svn: 267338
* Make thinlto clang test more robust against LLVM changes.Mehdi Amini2016-04-241-7/+2
| | | | | | | | We should just test the effect of the clang level option here, i.e. that a summary is correctly emitted with -flto=thin From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 267321
* DebugInfo: DIGlobalVariables became 'distinct' in LLVM r267301Duncan P. N. Exon Smith2016-04-232-6/+6
| | | | | | Update testcases due to DIBuilder change. llvm-svn: 267302
* DebugInfo: Adapt to loss of DITypeRef in LLVM r267296Duncan P. N. Exon Smith2016-04-2324-305/+307
| | | | | | | | | | | | | LLVM stopped using MDString-based type references, and DIBuilder no longer fills 'retainedTypes:' with every DICompositeType that has an 'identifier:' field. There are just minor changes to keep the same behaviour in CFE. Leaving 'retainedTypes:' unfilled has a dramatic impact on the output order of the IR though. There are a huge number of testcase changes, which were unfortunately not really scriptable. llvm-svn: 267297
* [profile] Fix another use of the driver.Sean Silva2016-04-231-1/+1
| | | | | | Follow-on to r267262. llvm-svn: 267263
* [profile] Use cc1 in these tests instead of the driver.Sean Silva2016-04-235-9/+9
| | | | | | | I ran into this when seeing what tests would break if we make a driver-level decision about whether FEPGO or IRPGO is the default. llvm-svn: 267262
* Revert the bool portion of r267054Richard Trieu2016-04-223-35/+13
| | | | | | | Remove the floating point to bool conversion warnings. Some of these conversions will be caught by -Wliteral-conversion and -Wfloat-conversion llvm-svn: 267234
* Fix a bug involving deferred decl emission and PCHReid Kleckner2016-04-222-0/+18
| | | | | | | | | | | | | | | | For various reasons, involving dllexport and class linkage compuations, we have to wait until after the semicolon after a class declaration to emit inline methods. These are "deferred" decls. Before this change, finishing the tag decl would trigger us to deserialize some PCH so that we could make a "pretty" IR-level type. Deserializing the PCH triggered calls to HandleTopLevelDecl, which, when done, checked the deferred decl list, and emitted some dllexported decls that weren't ready. Avoid this re-entrancy. Deferred decls should not get emitted when a tag is finished, they should only be emitted after a real top level decl in the main file. llvm-svn: 267186
* [Hexagon] Add definitions for circular and bit-reverse loads/storesKrzysztof Parzyszek2016-04-221-0/+46
| | | | llvm-svn: 267159
OpenPOWER on IntegriCloud