summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Revert r254203: [mips] Interrupt attribute support.Daniel Sanders2015-11-272-94/+1
| | | | | | I forgot to credit the author. llvm-svn: 254204
* [mips] Interrupt attribute support.Daniel Sanders2015-11-272-1/+94
| | | | | | | | | | | | Summary: This patch adds support for the interrupt attribute for mips32r2+. Reviewers: dsanders, aaron.ballman Subscribers: aaron.ballman, cfe-commits Differential Revision: http://reviews.llvm.org/D10802 llvm-svn: 254203
* Revert Sparc and SparcV9 to external assembler. Now that the CPUJoerg Sonnenberger2015-11-271-3/+0
| | | | | | | | handling is corrected, the primary reason for forcing IAS as default is gone and the remaining issues are still somewhat problematic in common situations. llvm-svn: 254199
* [x86] Exclusion of incorrect include headers paths for MCU targetAndrey Bokhanko2015-11-272-20/+57
| | | | | | | | Exclusion of /usr/include and /usr/local/include headers paths for MCU target. Differential Revision: http://reviews.llvm.org/D14954 llvm-svn: 254195
* Test commitPierre Gousseau2015-11-261-2/+1
| | | | | | Remove tabs. llvm-svn: 254181
* [AArch64] Add command-line options for Statistical Profiling ExtensionOliver Stannard2015-11-261-0/+2
| | | | | | | | | | This adds the "+profile" and +noprofile" suffixes for the -march and -mcpu options, to allow enabling or disabling the options Statistical Profiling Extension to ARMv8.2-A. Differential Revision: http://reviews.llvm.org/D15023 llvm-svn: 254161
* [AArch64] Add command-line options for ARMv8.2-AOliver Stannard2015-11-261-0/+4
| | | | | | | | | | | This adds new values for the -march option (armv8.2a and armv8.2-a, which are aliases of each other), and new suffixes for the -march and -mcpu options (+fp16 and +nofp16), to allow targeting the ARMv8.2-A architecture and it's optional half-precision floating-point extension. Differential Revision: http://reviews.llvm.org/D15022 llvm-svn: 254160
* Fix for merging decls in pragma weakAlexander Musman2015-11-261-8/+13
| | | | | | | Calling CheckFunctionDeclaration so that 2 decls for the 'weak' are merged. Differential Revision: http://reviews.llvm.org/D13048 llvm-svn: 254143
* [OPENMP 4.5] Fixed rules for 'ordered' clause.Alexey Bataev2015-11-261-10/+16
| | | | | | According to OpenMP 4.5 the parameter of 'ordered' clause must be greater than or equal to the parameter of 'collapse' clause. Patch adds this rule. llvm-svn: 254141
* [Diagnostics] Call setMapping on the correct diagnostic states in a few ↵Craig Topper2015-11-261-3/+3
| | | | | | | | | | | | places. GetCurDiagState() was being used when it shouldn't be. I spotted this by inspection in the for loop that wasn't using its iterator and was just acting on the current state repeatedly. This appears to have been introduced as a copy and paste bug in r140763 over 4 years ago. I have no idea how to test this. I just went back to the original commit and tried to use the variables it was using before that. llvm-svn: 254134
* Use range-based for loops. NFCCraig Topper2015-11-261-7/+7
| | | | llvm-svn: 254133
* P0002R1: increment on expressions of type bool is no longer allowed in C++1z.Richard Smith2015-11-261-1/+3
| | | | llvm-svn: 254122
* [modules] Refactor handling of -fmodules-embed-*. Track this properly ratherRichard Smith2015-11-265-38/+45
| | | | | | | than reusing the "overridden buffer" mechanism. This will allow us to make embedded files and overridden files behave differently in future. llvm-svn: 254121
* Driver: protect from empty -L argsMartell Malone2015-11-261-1/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D12466 llvm-svn: 254117
* [analyzer] Include block capture copy expressions in the CFG.Devin Coughlin2015-11-251-1/+14
| | | | | | | | | | | This prevents spurious dead store warnings when a C++ lambda is casted to a block. I've also added several tests documenting our still-incomplete support for lambda-to-block casts. rdar://problem/22236293 llvm-svn: 254107
* P0001R1: 'register' storage class specifier is no longer permitted in C++1z.Richard Smith2015-11-251-1/+2
| | | | | | | We will still allow it in system headers, in macros from system headers, when combined with an 'asm' label, and under the flag -Wno-register. llvm-svn: 254097
* [MSVC] 'property' with an empty array in array subscript expression.Alexey Bataev2015-11-2513-113/+217
| | | | | | | | | | | | MSVC supports 'property' attribute and allows to apply it to the declaration of an empty array in a class or structure definition. For example: ``` __declspec(property(get=GetX, put=PutX)) int x[]; ``` The above statement indicates that x[] can be used with one or more array indices. In this case, i=p->x[a][b] will be turned into i=p->GetX(a, b), and p->x[a][b] = i will be turned into p->PutX(a, b, i); Differential Revision: http://reviews.llvm.org/D13336 llvm-svn: 254067
* [X86] Support for C calling convention only for MCU target.Alexey Bataev2015-11-251-10/+23
| | | | | | | For MCU only C calling convention is allowed, all other calling conventions are not supported. Differential Revision: http://reviews.llvm.org/D14864 llvm-svn: 254063
* [OpenMP] Parsing and sema support for num_teams clauseKelvin Li2015-11-249-2/+84
| | | | | | http://reviews.llvm.org/D14802 llvm-svn: 254019
* Replace [=] lambda capture with [&] per David Blaikieþ suggestion.Yaron Keren2015-11-241-1/+1
| | | | llvm-svn: 254013
* [analyzer] Pass value expression for inlined defensive checks when binding ↵Devin Coughlin2015-11-241-1/+30
| | | | | | | | | | | | | | | | null to nonnull. The nullability checker was not suppressing false positives resulting from inlined defensive checks when null was bound to a nonnull variable because it was passing the entire bind statement rather than the value expression to trackNullOrUndefValue(). This commit changes that checker to synactically match on the bind statement to extract the value expression so it can be passed to trackNullOrUndefValue(). rdar://problem/23575439 llvm-svn: 254007
* Fix rewrite of reserved library name in case of -nodefaultlibsNirav Dave2015-11-241-1/+2
| | | | | | | | | | | | The Driver only checked if nostdlib was set when deciding to add reserved_lib_stdcxx, but as nostdlib is always exactly nodefaultlibs and nostartfiles we should be checking one (clearly nodefaultlibs in the case) as well. This appears to be the only such instance of this in the codebase. Differential Revision: http://reviews.llvm.org/D14935 llvm-svn: 253990
* [OPENMP] Fix crash on codegen for 'task' directive with no shared variables.Alexey Bataev2015-11-241-1/+1
| | | | | | If 'task' region does not have shared variables codegen could crash on calculation of size of list of shared variables. llvm-svn: 253977
* [modules] Add -cc1 flag -fmodules-embed-all-files.Richard Smith2015-11-243-1/+5
| | | | | | | | | | | | | | This flag causes all files that were read by the compilation to be embedded into a produced module file. This is useful for distributed build systems that use an include scanning system to determine which files are "needed" by a compilation, and only provide those files to remote compilation workers. Since using a module can require any file that is part of that module (or anything it transitively includes), files that are not found by an include scanner can be required in a regular build using explicit modules. With this flag, only files that are actually referenced by transitively-#included files are required to be present on the build machine. llvm-svn: 253950
* Remove DataRecursiveASTVisitor; it no longer serves any purpose, since it's ↵Richard Smith2015-11-242-4/+4
| | | | | | just an alias for RecursiveASTVisitor. llvm-svn: 253949
* Use data recursion in RecursiveASTVisitor when traversing Stmt and Expr nodes.Richard Smith2015-11-242-21/+16
| | | | | | | | | | | | | | | | | | When RAV traverses a Stmt or Expr node, if the corresponding Traverse* functions have not been overridden, it will now use data recursion to walk those nodes. We arrange this to be an unobservable optimization to RAV subclasses, and to gracefully degrade as parts of the visitation are overridden with functions that might observe the visitation. For instance, if an RAV subclass overrides TraverseUnaryNot, we will ensure that there are real recursive stack frames for those traversals, but we'll use data recursion for all other traversals. This removes the need for DataRecursiveASTVisitor, and for the 'shouldUseDataRecursionFor' extension point, both of which are removed by this change. llvm-svn: 253948
* [coroutines] Build a CoroutineBodyStmt when finishing parsing a coroutine, ↵Richard Smith2015-11-241-4/+65
| | | | | | and form the initial_suspend, final_suspend, and get_return_object calls. llvm-svn: 253946
* CodeGenFunction.h: Prune a \param in r253926. [-Wdocumentation]NAKAMURA Takumi2015-11-231-3/+0
| | | | llvm-svn: 253938
* Preserve exceptions information during calls code generation.Samuel Antao2015-11-238-41/+73
| | | | | | | | | | | This patch changes the generation of CGFunctionInfo to contain the FunctionProtoType if it is available. This enables the code generation for call instructions to look into this type for exception information and therefore generate better quality IR - it will not create invoke instructions for functions that are know not to throw. llvm-svn: 253926
* Replace loop with std::any_of, NFC.Yaron Keren2015-11-231-6/+2
| | | | | | Inspired by similar commits from Craig Topper. llvm-svn: 253904
* clang-format: Re-add code path deleted in r253873 and add missing test.Daniel Jasper2015-11-231-0/+9
| | | | llvm-svn: 253900
* Fix alignment of r253898Martell Malone2015-11-231-10/+8
| | | | llvm-svn: 253899
* Driver: fallback to the location of clang if no sysroot,Martell Malone2015-11-231-15/+11
| | | | | | | | | | | | | | hard coding /usr makes little sense for mingw-w64. If we have portable toolchains having /usr breaks that. If the clang we use is in /usr/bin or /usr/sbin etc this will still detect as though it was hard coded to /usr This makes the most sense going forward for mingw-w64 toolchains on both linux and mac Differential Revision: http://reviews.llvm.org/D14164 llvm-svn: 253898
* Disable frame pointer elimination when using -pg Xinliang David Li2015-11-232-1/+6
| | | | | | | | | | | | | | | | (Re-apply patch after bug fixing) This diff makes sure that the driver does not pass -fomit-frame-pointer or -momit-leaf-frame-pointer to the frontend when -pg is used. Currently, clang gives an error if -fomit-frame-pointer is used in combination with -pg, but -momit-leaf-frame-pointer was forgotten. Also, disable frame pointer elimination in the frontend when -pg is set. Patch by Stefan Kempf. llvm-svn: 253886
* Add an AST matcher for narrowing when a type is volatile-qualified.Aaron Ballman2015-11-231-0/+1
| | | | llvm-svn: 253882
* Revert part of r253813Martell Malone2015-11-231-7/+0
| | | | | | The new lld gnu frontend does not support the -target option llvm-svn: 253874
* clang-format: Signficantly refactor the cast detection.Daniel Jasper2015-11-231-49/+60
| | | | | | No functional changes intended. llvm-svn: 253873
* clang-format: Fix incorrect cast detection.Daniel Jasper2015-11-231-17/+15
| | | | | | | | | | Before: bool b = f(g<int>)&&c; After: bool b = f(g<int>) && c; llvm-svn: 253872
* clang-format: If the template list of a variable declaration spansDaniel Jasper2015-11-231-0/+1
| | | | | | | | | | | | | | | multiple lines, also break before the variable name. Before: std::vector<aaaaaa, // wrap aa> aaa; After: std::vector<aaaaaa, // wrap aa> aaa; llvm-svn: 253871
* [OPENMP] 'out' dependency for 'task' directives must be the same as 'inout'.Alexey Bataev2015-11-231-3/+2
| | | | | | Runtime library requires, that codegen for 'depend' clause for 'out' dependency kind must be the same as codegen for 'depend' clause with 'inout' dependency. llvm-svn: 253866
* [OpenCL 2.0] Apply default address space (AS).Anastasia Stulova2015-11-231-12/+44
| | | | | | | | | | | | If AS of a variable/parameter declaration is not set by the source, OpenCL v2.0 s6.5 defines explicit rules for default ASes: - The AS of global and local static variables defaults to global; - All pointers point to generic AS. http://reviews.llvm.org/D13168 llvm-svn: 253863
* clang-format: Make moving of the Cursor work properly when sorting #includes.Daniel Jasper2015-11-231-8/+20
| | | | llvm-svn: 253860
* Fix calculation of shifted cursor/code positions. Specifically supportDaniel Jasper2015-11-231-21/+19
| | | | | | | | | the case where a specific range is replaced by new text. Previously, the calculation would shift any position from within a replaced region to the first character after the region. This is undersirable, e.g. for clang-format's include sorting. llvm-svn: 253859
* Revert r253846 (build bot failure))Xinliang David Li2015-11-232-6/+1
| | | | llvm-svn: 253851
* [OpenMP] Parsing and sema support for map clauseKelvin Li2015-11-2310-12/+427
| | | | | | http://reviews.llvm.org/D14134 llvm-svn: 253849
* Disable frame pointer elimination when using -pgXinliang David Li2015-11-232-1/+6
| | | | | | | | | | | | | | This diff makes sure that the driver does not pass -fomit-frame-pointer or -momit-leaf-frame-pointer to the frontend when -pg is used. Currently, clang gives an error if -fomit-frame-pointer is used in combination with -pg, but -momit-leaf-frame-pointer was forgotten. Also, disable frame pointer elimination in the frontend when -pg is set. Patch by Stefan Kempf. llvm-svn: 253846
* [MS ABI] Tolerate invokes of __RTDynamicCastDavid Majnemer2015-11-231-0/+1
| | | | | | | | | | | | The pointer returned by __RTDynamicCast must be bitcasted. However, it was not expected that __RTDynamicCast would be invoked, resulting in the bitcast occuring in a different BasicBlock than the invoke. This caused a down-stream PHI to get confused about which BasicBlock the incomming value was from. This fixes PR25606. llvm-svn: 253843
* [coroutines] Check for overload sets in co_yield / co_return operands being ↵Richard Smith2015-11-221-11/+8
| | | | | | resolved by a call to yield_value / return_value before rejecting them. llvm-svn: 253817
* [coroutines] Build implicit return_value / return_void calls for co_return.Richard Smith2015-11-221-6/+22
| | | | llvm-svn: 253816
* Driver: Specifically tell the linker the target for mingw-w64Martell Malone2015-11-221-1/+8
| | | | | | | | | Cross compiling from linux and OSX results in Error: Exec format. This is because the linker is expecting ELF formated objects. By passing the target we can explicitly tell the linker that it should be linking COFF objects regardless of the host. llvm-svn: 253813
OpenPOWER on IntegriCloud