summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [Refactor NFC] Rename the (non-CCE, fold-failure) Diag during constant ↵Faisal Vali2016-07-021-102/+112
| | | | | | | | | | | | expression evaluation as FFDiag. Currently, we have CCEDiags (C++11 core constant expression diags) and Fold failure diagnostics [I don't claim to yet fully understand exactly why we need the difference]. This patch explicitly replaces Info.Diag (whose use always represents a fold failure diag within the file) with Info.FFDiag. This makes it more easily greppable in the file, and just like the name Info.CCEDiag, it gives the reader slight further insight into the nature of the diagnostic (as opposed to Info.Diag). This patch is a preliminary refactoring step in an effort to allow support for compatibility-warnings and extensions (such as constexpr lambda) during constant expression evaluation. All regressions pass. llvm-svn: 274454
* fix two typos in the docSylvestre Ledru2016-07-022-2/+2
| | | | llvm-svn: 274447
* [X86][AVX512] Converted the MOVDDUP/MOVSLDUP/MOVSHDUP masked intrinsics to ↵Simon Pilgrim2016-07-025-118/+110
| | | | | | | | generic IR llvm companion patch imminent llvm-svn: 274442
* [CUDA] Move argument type lists to the stack. NFC.Benjamin Kramer2016-07-021-4/+4
| | | | llvm-svn: 274433
* Use arrays or initializer lists to feed ArrayRefs instead of SmallVector ↵Benjamin Kramer2016-07-027-86/+53
| | | | | | | | where possible. No functionality change intended llvm-svn: 274432
* [X86] Replace 128-bit and 256 masked vpermilps/vpermilpd builtins with ↵Craig Topper2016-07-024-47/+48
| | | | | | native IR. llvm-svn: 274425
* PR28394: For compatibility with c++11 and c++14, if a static constexpr dataRichard Smith2016-07-024-4/+83
| | | | | | | | member is redundantly redeclared outside the class definition in code built in c++17 mode, ensure we emit a non-discardable definition of the data member for c++11 and c++14 compilations to use. llvm-svn: 274416
* Add TargetInfo for 32-bit and 64-bit RenderScriptPirama Arumuga Nainar2016-07-022-0/+66
| | | | | | | | | | | | | | | | | | | Summary: The TargetInfo for 'renderscript32' and 'renderscript64' ArchTypes are subclasses of ARMleTargetInfo and AArch64leTargetInfo respectively. RenderScript32TargetInfo modifies the ARM ABI to set LongWidth and LongAlign to be 64-bits. Other than this modification, the underlying TargetInfo base classes is initialized as if they have "armv7" and "aarch64" architecture type respectively. Reviewers: rsmith, echristo Subscribers: aemerson, tberghammer, cfe-commits, danalbert, mehdi_amini, srhines Differential Revision: http://reviews.llvm.org/D21334 llvm-svn: 274409
* [CodeView] Include MSVC style names for unnamed typesDavid Majnemer2016-07-012-9/+65
| | | | | | | | The CodeView printer expects to be able to generate fully qualified names from the debug info graph. This means that we need to include the MSVC-style name in the debug info for anonymous types. llvm-svn: 274401
* Removes CHECKs for symbolic label names (as Debug Clang will generate).Tim Shen2016-07-011-5/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D20499 llvm-svn: 274396
* C++14 init-capture: error out instead of crashing.Manman Ren2016-07-012-1/+20
| | | | | | | | | | | | | | | | | | | When we have template arguments, we have a function and a pattern, the variable in init-capture belongs to the pattern decl when checking if the lhs of "max = current" is modifiable: auto find = [max = init](auto current) { max = current; }; In function isReferenceToNonConstCapture, we handle the case where the decl context for the variable is not part of the current context. Instead of crashing, we emit an error message: cannot assign to a variable captured by copy in a non-mutable lambda rdar://26997922 llvm-svn: 274392
* Remove unncessary CHECKs from r274385Tim Shen2016-07-011-2/+0
| | | | llvm-svn: 274387
* [Temporary, Lifetime] Add lifetime marks for temporariesTim Shen2016-07-018-50/+298
| | | | | | | | | With all MaterializeTemporaryExprs coming with a ExprWithCleanups, it's easy to add correct lifetime.end marks into the right RunCleanupsScope. Differential Revision: http://reviews.llvm.org/D20499 llvm-svn: 274385
* [Driver] Delete some dead code (NFC)Vedant Kumar2016-07-011-3/+0
| | | | llvm-svn: 274379
* [libclang] Sync-up the way top-level decls in an ASTUnit are handled with ↵Argyrios Kyrtzidis2016-07-013-33/+46
| | | | | | | | how decls in a DeclContext are handled. rdar://19775013 llvm-svn: 274378
* Emit more intrinsics for builtin functionsMatt Arsenault2016-07-012-39/+184
| | | | | | | | | | | | This is important for building libclc. Since r273039 tests are failing due to now emitting calls to these functions instead of emitting the DAG node. The libm function names are implemented for OpenCL, and should call the locally defined versions, so -fno-builtin is used. The IR Some functions use the __builtins and expect the intrinsics to be emitted. Without this we end up with nobuiltin calls to intrinsics or to unsupported library calls. llvm-svn: 274370
* Revert r274348 and r274349 until the Windows failures are fixed.Vassil Vassilev2016-07-013-215/+45
| | | | llvm-svn: 274359
* Driver: support -L for MSVC toolchain under the GNU driverSaleem Abdulrasool2016-07-012-0/+10
| | | | | | | When not using clang in the CL emulation mode, honour the -L flags as additional library paths to pass to the linker invocation. llvm-svn: 274356
* [OpenMP] Issue warning if a simd construct nested inside another simdKelvin Li2016-07-013-12/+39
| | | | | | construct llvm-svn: 274352
* Add forgotten test to r274348.Vassil Vassilev2016-07-011-0/+123
| | | | llvm-svn: 274349
* Add postorder traversal support to the RecursiveASTVisitor.Vassil Vassilev2016-07-012-45/+92
| | | | | | | | | | | This feature needs to be explicitly enabled by overriding shouldTraversePostOrder() as it has performance drawbacks for the iterative Stmt-traversal. Patch by Raphael Isemann! Reviewed by Richard Smith and Benjamin Kramer. llvm-svn: 274348
* [DebugInfo] Set DISubprogram ThisAdjustment in the MS ABIReid Kleckner2016-07-013-7/+17
| | | | llvm-svn: 274326
* [Feature] Add a builtin for indexing into parameter packs. Patch by Louis ↵Eric Fiselier2016-07-0114-11/+158
| | | | | | | | | | | | | Dionne. This patch adds a __nth_element builtin that allows fetching the n-th type of a parameter pack with very little compile-time overhead. The patch was inspired by r252036 and r252115 by David Majnemer, which add a similar __make_integer_seq builtin for efficiently creating a std::integer_sequence. Reviewed as D15421. http://reviews.llvm.org/D15421 llvm-svn: 274316
* [CodeCompletion] Allow system headers providing private symbols with a ↵Argyrios Kyrtzidis2016-07-013-15/+35
| | | | | | | | single underscore. rdar://24677150 llvm-svn: 274314
* [Sema] Implement C++14's DR1579: Prefer returning by converting move constructorErik Pilkington2016-06-305-50/+114
| | | | | | | | Fixes PR28096. Differential Revision: http://reviews.llvm.org/D21619 llvm-svn: 274291
* [OpenMP] Use fopenmp prefix for all options introduced by the offloading ↵Samuel Antao2016-06-3023-411/+411
| | | | | | | | | | | | | | implementation. Summary: This patch changes the options used by offloading to start with -fopenmp instead of -fomp. This makes the option naming more consistent and materializes a suggestion by Richard Smith in http://reviews.llvm.org/D9888. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, ABataev Subscribers: kkwli0, cfe-commits, caomhin Differential Revision: http://reviews.llvm.org/D21841 llvm-svn: 274283
* fix typo; NFCSanjay Patel2016-06-301-1/+1
| | | | llvm-svn: 274278
* Fix ASTMatchersNodeTest to work on Windows.Justin Lebar2016-06-301-7/+5
| | | | | | | | | | | It was failing because it had an explicit check for whether we're on Windows. There are a few other similar explicit checks in this file which I didn't remove because they serve as reasonable documentation that the test doesn't work with a Windows triple. llvm-svn: 274269
* Fix typo-correction crash if a typo occurs within the operand of aRichard Smith2016-06-304-5/+16
| | | | | | | | | function-style cast to a non-dependent type which is then used in an invalid way. We'd lose the "type dependent" bit here, and downstream Sema processing would then discard the expression if it was used in a context where its type rendered it invalid. llvm-svn: 274267
* [CUDA] Give templated device functions internal linkage, templated kernels ↵Justin Lebar2016-06-302-5/+14
| | | | | | | | | | | | | | | | | external linkage. Summary: This lets LLVM perform IPO over these functions. In particular, it allows LLVM to emit ld.global.nc for loads to __restrict pointers in kernels that are never written to. Reviewers: rsmith Subscribers: cfe-commits, tra Differential Revision: http://reviews.llvm.org/D21337 llvm-svn: 274261
* PR28373: fix crash-on-invalid if the condition of an if-statement fails ↵Richard Smith2016-06-302-1/+10
| | | | | | typo-correction. llvm-svn: 274260
* Don't instantiate a full host toolchain in ASTMatchersTest.Justin Lebar2016-06-301-15/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This test was stat()'ing large swaths of /usr/lib hundreds of times, as every invocation of matchesConditionally*() created a new Linux toolchain. In addition to being slow, perf indicated this was causing substantial contention in the kernel. Something is...interesting in the kernel, as without this patch I sometimes see ~11m spent in the kernel, and sometimes ~5m. This corresponds to bimodal ninja check-clang times of ~30s and ~20s. It's not clear to me exactly what causes the bimodality. In any case, this change makes this test run in 2.5s, down from 17s, and it seems to cause us to get the 20s ninja check-clang time unconditionally. Reviewers: chandlerc Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D21810 llvm-svn: 274257
* [codeview] Emit qualified display names if -gline-tables-only is onReid Kleckner2016-06-302-19/+49
| | | | | | | | | | | | | | | | | | When -gmlt is on, we don't emit namespace or class scope information, and the CodeView emission code in LLVM can't compute the fully qualified name. If we know LLVM won't be able to get the name right, go ahead and emit the qualified name in the frontend. We could change our -gmlt emission strategy to include those scopes when emitting codeview, but that would increase memory usage and slow down LTO and add more complexity to debug info emission. The same problem exists when you debug a -gmlt binary with GDB, so we should consider removing '&& EmitCodeView' from the condition here at some point in the future after evaluating the impact on object file size. llvm-svn: 274246
* Port some more debug info tests on WindowsReid Kleckner2016-06-303-10/+2
| | | | llvm-svn: 274245
* [AVX512][BUILTIN][vpermilps][intrinsics] Fixing two incorrect IMM check.Michael Zuckerman2016-06-301-3/+3
| | | | | | Differential Revision: http://reviews.llvm.org/D21836 llvm-svn: 274224
* Fix CodeGenCXX/mangle-abi-tag.cpp on clang-ppc64le-linux botDmitry Polukhin2016-06-301-5/+6
| | | | llvm-svn: 274223
* [GCC] PR23529 Mangler part of attrbute abi_tag supportDmitry Polukhin2016-06-305-96/+613
| | | | | | | | | | | | | | | | | Original patch by Stefan Bühler http://reviews.llvm.org/D12834 Difference between original and this one: - fixed all failing tests - fixed mangling for global variable outside namespace - emit ABI tags for guards and local names - clang-format + other stylistic changes - significantly reworked patch according to Richard's suggestions Sema part, committed before http://reviews.llvm.org/D17567 Differential revision: http://reviews.llvm.org/D18035 llvm-svn: 274222
* Enable opencl driver tests, which never ran.Benjamin Kramer2016-06-302-1/+2
| | | | | | | Then mark it as XFAIL because it always fails. I'll let OpenCL people figure this out. llvm-svn: 274221
* AMDGPU: Set amdgpu_kernel calling convention for OpenCL kernels.Nikolay Haustov2016-06-3015-20/+79
| | | | | | | | | | | | | | | | | | Summary: Summary: Change Clang calling convention SpirKernel to OpenCLKernel. Set calling convention OpenCLKernel for amdgcn as well. Add virtual method .getOpenCLKernelCallingConv() to TargetCodeGenInfo and use it to set target calling convention for AMDGPU and SPIR. Update tests. Reviewers: rsmith, tstellarAMD, Anastasia, yaxunl Subscribers: kzhuravl, cfe-commits Differential Revision: http://reviews.llvm.org/D21367 llvm-svn: 274220
* [Clang][Intrinsics][AVX512][BuiltIn] adding intrinsics for vrangesd ↵Michael Zuckerman2016-06-302-0/+48
| | | | | | | | instruction set Differential Revision: http://reviews.llvm.org/D21734 llvm-svn: 274218
* [ASTMatcher] Add a node matcher for EnumType.Haojian Wu2016-06-304-0/+38
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D21860 llvm-svn: 274217
* [cmake] Remove stale comment. NFC.Michael Gottesman2016-06-301-4/+0
| | | | llvm-svn: 274212
* [MS ABI] Pick an inheritance model if we resolve an overload setDavid Majnemer2016-06-302-0/+19
| | | | | | | | | | | | | We didn't assign an inheritance model for 'Foo' if the event an exrepssion like '&Foo::Bar' occured if 'Bar' could resolve to multiple functions. Once the overload set is resolved to a particular member, we enforce a specific inheritance model. This fixes PR28360. llvm-svn: 274202
* [CodeView] Implement support for bitfields in ClangDavid Majnemer2016-06-304-41/+77
| | | | | | | | | | | Emit the underlying storage offset in addition to the starting bit position of the field. This fixes PR28162. Differential Revision: http://reviews.llvm.org/D21783 llvm-svn: 274201
* Use the same type for adjacent bit field members.Akira Hatanaka2016-06-301-4/+4
| | | | | | | | | MSVC doesn't pack the bit field members if different types are used. This came up in a patch review. http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160627/163107.html llvm-svn: 274190
* [Tooling] Add optional argument to getFullyQualifiedName to prepend "::".Siva Chandra2016-06-293-49/+137
| | | | | | | | | | Reviewers: rsmith, saugustine, rnk Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D21666 llvm-svn: 274185
* [ClangConfig] Store all of the targets exported in the variable ↵Michael Gottesman2016-06-292-1/+2
| | | | | | CLANG_EXPORTED_TARGETS. llvm-svn: 274180
* [ClangConfig] Unset some variables after we are done using them to configure ↵Michael Gottesman2016-06-291-0/+5
| | | | | | | | | | ClangConfig.cmake.in files. This ensures that the values do not bleed over in between computations. It may make sense in the future to just refactor this code into functions to provide "true scoping". llvm-svn: 274179
* [ClangConfig] Instead of hard coding the ClangTargets location to ↵Michael Gottesman2016-06-292-1/+19
| | | | | | | | /ClangTargets.cmake, follow LLVM's example and use a pre-computed cmake variable @CLANG_CONFIG_EXPORTS_FILE@. This just makes ClangConfig more consistent with LLVMConfig. llvm-svn: 274178
* [ClangConfig] Follow LLVM's example and only install ↵Michael Gottesman2016-06-291-4/+6
| | | | | | Clang{Config,Target}.cmake when LLVM_INSTALL_TOOLCHAIN_ONLY is disabled. llvm-svn: 274177
OpenPOWER on IntegriCloud