summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [ASTMatchers] Add isLambda() matcher.Samuel Benzaquen2016-06-281-0/+1
| | | | llvm-svn: 274015
* [SPARC] Allows inlining of atomics for Sparc32 with appropriate store barrier.Chris Dewhurst2016-06-281-0/+1
| | | | | | The final change is required to extend the back-end's AtomicExpandPass that was implemented for Sparc (64 bit) and later extended for Sparc (32 bit). llvm-svn: 274012
* [Driver] Add method to redirect output of Compilation.Nikolay Haustov2016-06-281-0/+5
| | | | | | | | | | | | | | | | | Summary: Currently output of child process, however in my use case, it needs to be captured and presented to the user. Add Redirect method to Compilation and use existing infrastructure for redirecting output of commands. Reviewers: tstellarAMD Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21224 llvm-svn: 273997
* Revert r273950, (empty). Please recommit it with readable commit message.NAKAMURA Takumi2016-06-281-2/+0
| | | | llvm-svn: 273994
* [clang-cl] Define _MSVC_LANGDavid Majnemer2016-06-281-0/+7
| | | | | | | | | | | Recently, Microsoft added support for a flag, /std, which controls which version of the language rules MSVC should use. MSVC hasn't updated __cplusplus though. Instead, they added a new macro, _MSVC_LANG, which is defined in a similar fashion to __cplusplus. This is used to indicate which mode the compiler is in. llvm-svn: 273987
* [intrin.h] Certain _Interlocked intrinsics return the old valueDavid Majnemer2016-06-281-12/+12
| | | | | | This fixes PR28326. llvm-svn: 273986
* Avoid accessing an invalid PresumedLoc.Jordan Rose2016-06-281-1/+1
| | | | | | | | | | | | | | | | | | DiagnosticNoteRenderer asserts trying to emit its "while building module Foo imported from bar.h:5" note when the presumed location of the import is invalid. This assertion was added in r267914, where most uses of 'getFilename' were updated to test 'isValid' instead. This one must have been missed. I can't come up with a test because this location is always valid in C-based code, but external clients that manually import modules (*cough*Swift*cough*) sometimes provide invalid SourceLocations. rdar://problem/26099576 http://reviews.llvm.org/D21111 llvm-svn: 273976
* Frontend: clang-format a statement, NFCSaleem Abdulrasool2016-06-281-4/+4
| | | | llvm-svn: 273972
* AMDGPU: Add builtin to read exec maskMatt Arsenault2016-06-281-4/+14
| | | | llvm-svn: 273965
* (no commit message)Chris Dewhurst2016-06-271-0/+2
| | | | llvm-svn: 273950
* [ExprConstant] Fix PR28314 - crash while evluating objectsize.George Burgess IV2016-06-271-10/+18
| | | | | | | | | | | | | | | | | | | | | This fixes a crash in code like: ``` struct A { struct B b; char c[1]; } int foo(struct A* a) { return __builtin_object_size(a->c, 0); } ``` We wouldn't check whether the structs we were examining were invalid, and getting the layout of an invalid struct is (unsurprisingly) A Bad Thing. With this patch, we'll always return conservatively if we see an invalid struct, since I'm assuming the presence of an invalid struct means that our compilation failed (so having a conservative result isn't such a big deal). llvm-svn: 273911
* [OpenMP] Diagnose missing cases of statements between target and teams ↵Kelvin Li2016-06-271-0/+3
| | | | | | | | | | | | | | | directives Clang fails to diagnose cases such as #pragma omp target while(0) { #pragma omp teams {} } A patch by David Sheinkman. llvm-svn: 273908
* Resubmission of http://reviews.llvm.org/D21564 after fixes.Carlo Bertolli2016-06-2713-21/+371
| | | | | | | | | | | | | [OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for' This patch is an initial implementation for #distribute parallel for. The main differences that affect other pragmas are: The implementation of 'distribute parallel for' requires blocking of the associated loop, where blocks are "distributed" to different teams and iterations within each block are scheduled to parallel threads within each team. To implement blocking, sema creates two additional worksharing directive fields that are used to pass the team assigned block lower and upper bounds through the outlined function resulting from 'parallel'. In this way, scheduling for 'for' to threads can use those bounds. As a consequence of blocking, the stride of 'distribute' is not 1 but it is equal to the blocking size. This is returned by the runtime and sema prepares a DistIncrExpr variable to hold that value. As a consequence of blocking, the global upper bound (EnsureUpperBound) expression of the 'for' is not the original loop upper bound (e.g. in for(i = 0 ; i < N; i++) this is 'N') but it is the team-assigned block upper bound. Sema creates a new expression holding the calculation of the actual upper bound for 'for' as UB = min(UB, PrevUB), where UB is the loop upper bound, and PrevUB is the team-assigned block upper bound. llvm-svn: 273884
* [clang-cl] Implement support for /stdDavid Majnemer2016-06-271-4/+19
| | | | | | | /std: supports two arguments, c++14 and c++latest. Currently, c++latest maps to c++1z but this might change down the road. llvm-svn: 273841
* [X86] add _mm_loadu_si64Asaf Badouh2016-06-261-0/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D21504 llvm-svn: 273812
* Fix unused variable warning after r273754.James Y Knight2016-06-251-0/+1
| | | | llvm-svn: 273783
* [X86] Fix pslldq/psrldq intrinsics to not fail compilation with immediates ↵Craig Topper2016-06-253-250/+244
| | | | | | larger than 16. This was accidentally broken in r272246. llvm-svn: 273775
* CodeGen: Start emitting checked loads when both trapping CFI and ↵Peter Collingbourne2016-06-254-11/+69
| | | | | | | | -fwhole-program-vtables are enabled. Differential Revision: http://reviews.llvm.org/D21122 llvm-svn: 273757
* Implement C++17 P0386R2, inline variables. (The 'inline' specifier gives aRichard Smith2016-06-2513-54/+173
| | | | | | | variable weak discardable linkage and partially-ordered initialization, and is implied for constexpr static data members.) llvm-svn: 273754
* Add support for musl-libc on ARM Linux.Rafael Espindola2016-06-244-2/+27
| | | | | | Patch by Lei Zhang! llvm-svn: 273735
* CodeGen: Update Clang to use the new type metadata.Peter Collingbourne2016-06-248-124/+83
| | | | | | Differential Revision: http://reviews.llvm.org/D21054 llvm-svn: 273730
* [CMake] Remove CLANG_APPEND_VC_REV optionChris Bieneman2016-06-241-0/+7
| | | | | | | | | | | | I added this option in r257827 to try and add compatibility with autoconf. At the time I misunderstood the problem. Our CMake automatically generates the SVN revision information and generates a build action to update it so builds don't need to be re-configured on SCM update (which is a better solution than we had in autoconf). The problem I was actually seeing was isolated cases where SVN revision information isn't available because the repository structures have been removed. This happens in some automated testing systems. This patch allows SVN_REVISION to be overridden if the build configuration could not find the SCM repository structures, and removes the code from my original patch because it is unnecessary. llvm-svn: 273714
* Revert r273705Carlo Bertolli2016-06-2413-369/+21
| | | | | | [OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for' llvm-svn: 273709
* [OpenMP] Initial implementation of parse and sema for composite pragma ↵Carlo Bertolli2016-06-2413-21/+369
| | | | | | | | | | | | | | | 'distribute parallel for' http://reviews.llvm.org/D21564 This patch is an initial implementation for #distribute parallel for. The main differences that affect other pragmas are: The implementation of 'distribute parallel for' requires blocking of the associated loop, where blocks are "distributed" to different teams and iterations within each block are scheduled to parallel threads within each team. To implement blocking, sema creates two additional worksharing directive fields that are used to pass the team assigned block lower and upper bounds through the outlined function resulting from 'parallel'. In this way, scheduling for 'for' to threads can use those bounds. As a consequence of blocking, the stride of 'distribute' is not 1 but it is equal to the blocking size. This is returned by the runtime and sema prepares a DistIncrExpr variable to hold that value. As a consequence of blocking, the global upper bound (EnsureUpperBound) expression of the 'for' is not the original loop upper bound (e.g. in for(i = 0 ; i < N; i++) this is 'N') but it is the team-assigned block upper bound. Sema creates a new expression holding the calculation of the actual upper bound for 'for' as UB = min(UB, PrevUB), where UB is the loop upper bound, and PrevUB is the team-assigned block upper bound. llvm-svn: 273705
* clang-format: [JS] Fix build breakage.Martin Probst2016-06-241-1/+1
| | | | | | Checking Line.MustBeDeclaration does actually break the field and param initializer use case. llvm-svn: 273694
* DeadStoresChecker: Don't warn about dead stores into volatile variablesStephan Bergmann2016-06-241-0/+2
| | | | llvm-svn: 273689
* Using for attributes voted into C++17.Richard Smith2016-06-241-0/+27
| | | | llvm-svn: 273666
* This patch fixes problem with passing structures and unionsStrahinja Petrovic2016-06-241-1/+2
| | | | | | | | smaller than register as argument in variadic functions on big endian architectures. Differential Revision: http://reviews.llvm.org/D21611 llvm-svn: 273665
* IgnoringImplicit matcher.Cong Liu2016-06-241-0/+1
| | | | llvm-svn: 273659
* Use even more ArrayRefsDavid Majnemer2016-06-246-27/+20
| | | | | | No functional change is intended, just a small refactoring. llvm-svn: 273650
* Use more ArrayRefsDavid Majnemer2016-06-2435-140/+122
| | | | | | No functional change is intended, just a small refactoring. llvm-svn: 273647
* Parser::ParseCXXCondition(): Prune \param in r273548 [-Wdocumentation]NAKAMURA Takumi2016-06-231-3/+0
| | | | llvm-svn: 273624
* clang-format: [JS] handle conditionals in fields, default params.Martin Probst2016-06-231-2/+2
| | | | | | | | | | | | Summary: Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D21658 llvm-svn: 273619
* Invoke simplifycfg and sroa before instcombine.Dehao Chen2016-06-231-3/+9
| | | | | | | | | | | | Summary: InstCombine needs to be performed after simplifycfg and sroa, otherwise it may make bad optimization decisions. Reviewers: davidxl, wmi, dnovillo Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D21568 llvm-svn: 273606
* clang-format: [JS] recognize more type locations.Martin Probst2016-06-232-0/+13
| | | | | | | | | | | | Summary: Includes parenthesized type expressions and type aliases. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D21597 llvm-svn: 273603
* Implement p0292r2 (constexpr if), a likely C++1z feature.Richard Smith2016-06-2316-59/+198
| | | | llvm-svn: 273602
* Re-commit r273548, reverted in r273589, with a fix to not produceRichard Smith2016-06-239-333/+230
| | | | | | | | | | | | | | | | -Wfor-loop-analysis warnings for a for-loop with a condition variable. In such a case, the loop condition variable is modified on each iteration of the loop by definition. Original commit message: Rearrange condition handling so that semantic checks on a condition variable are performed before the other substatements of the construct are parsed, rather than deferring them until the end. This allows better error recovery from semantic errors in the condition, improves diagnostic order, and is a prerequisite for C++17 constexpr if. llvm-svn: 273600
* Revert r273548, "Rearrange condition handling so that semantic checks on a ↵Peter Collingbourne2016-06-239-229/+333
| | | | | | | | condition variable" as it caused a regression in -Wfor-loop-analysis. llvm-svn: 273589
* [Analyzer] Don't cache report generation ExplodedNodesBen Craig2016-06-232-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | During the core analysis, ExplodedNodes are added to the ExplodedGraph, and those nodes are cached for deduplication purposes. After core analysis, reports are generated. Here, trimmed copies of the ExplodedGraph are made. Since the ExplodedGraph has already been deduplicated, there is no need to deduplicate again. This change makes it possible to add ExplodedNodes to an ExplodedGraph without the overhead of deduplication. "Uncached" nodes also cannot be iterated over, but none of the report generation code attempts to iterate over all nodes. This change reduces the analysis time of a large .C file from 3m43.941s to 3m40.256s (~1.6% speedup). It should slightly reduce memory consumption. Gains should be roughly proportional to the number (and path length) of static analysis warnings. This patch enables future work that should remove the need for an InterExplodedGraphMap inverse map. I plan on using the (now unused) ExplodedNode link to connect new nodes to the original nodes. http://reviews.llvm.org/D21229 llvm-svn: 273572
* Restructure the propagation of -fPIC/-fPIE.Rafael Espindola2016-06-235-16/+11
| | | | | | | | | | | | | The PIC and PIE levels are not independent. In fact, if PIE is defined it is always the same as PIC. This is clear in the driver where ParsePICArgs returns a PIC level and a IsPIE boolean. Unfortunately that is currently lost and we pass two redundant levels down the pipeline. This patch keeps a bool and a PIC level all the way down to codegen. llvm-svn: 273566
* Fixing a FIXME related to Unicode support on Windows. Converted the Win32 ↵Aaron Ballman2016-06-231-18/+27
| | | | | | | | APIs to explicitly use the W version when it involves strings that can hold non-ASCII characters (like file paths). Now explicitly using the A version for strings that will always be ASCII (like registry key paths). No extra tests required as this is currently covered by existing testing, and this is basically impossible to write Unicode-specific tests for. llvm-svn: 273563
* CodeGen: support linker options on Windows ARMSaleem Abdulrasool2016-06-231-0/+10
| | | | | | | | We would incorrectly emit the directive sections due to the missing overridden methods. We now emit the expected "/DEFAULTLIB" rather than "-l" options for requested linkage llvm-svn: 273558
* clang-format: [Proto] Use more compact format for text-formatted optionsDaniel Jasper2016-06-231-3/+0
| | | | | | | | | | | | | | | | | Before: enum Type { UNKNOWN = 0 [(some_options) = { a: aa, b: bb }]; }; After: enum Type { UNKNOWN = 0 [(some_options) = {a: aa, b: bb}]; }; llvm-svn: 273553
* Rearrange condition handling so that semantic checks on a condition variableRichard Smith2016-06-239-333/+229
| | | | | | | | | are performed before the other substatements of the construct are parsed, rather than deferring them until the end. This allows better error recovery from semantic errors in the condition, improves diagnostic order, and is a prerequisite for C++17 constexpr if. llvm-svn: 273548
* [AVX512] Replace masked unpack builtins with shufflevector and selects.Craig Topper2016-06-234-550/+466
| | | | llvm-svn: 273533
* Use ranges to concisely express iterationDavid Majnemer2016-06-2315-127/+102
| | | | | | | No functional change is intended, this should just clean things up a little. llvm-svn: 273522
* [driver][mips] Factor out findMIPSMultilibs code into separate functions. NFCSimon Atanasyan2016-06-221-189/+185
| | | | | | | | The findMIPSMultilibs is too long. One more reason for splitting is to escape redundant calls of MultilibSet::FilterOut method which lead to disk access. llvm-svn: 273465
* [Coverage] Push a new region when handling CXXTryStmtsVedant Kumar2016-06-221-1/+6
| | | | | | | | Push a new region for the try block and propagate execution counts through it. This ensures that catch statements get a region counter distinct from the try block's counter. llvm-svn: 273463
* [codeview] Set the new IntroducedVirtual debug info flagReid Kleckner2016-06-221-0/+9
| | | | llvm-svn: 273454
* [analyzer] Teach ObjCDeallocChecker about XCTestCaseDevin Coughlin2016-06-221-9/+11
| | | | | | | | | | | Like with SenTestCase, subclasses of XCTestCase follow a "tear down" idiom to release instance variables and so typically do not release ivars in -dealloc. This commit applies the existing special casing for SenTestCase to XCTestCase as well. rdar://problem/25884696 llvm-svn: 273441
OpenPOWER on IntegriCloud