summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* [MS ABI] Initialize "most general" member pointers which don't point at a vbaseDavid Majnemer2015-06-181-1/+1
| | | | | | | | | | The most general model has fields for the vbptr offset and the vbindex. Don't initialize the vbptr offset if the vbindex is 0: we aren't referencing an entity from a vbase. Getting this wrong can make member pointer equality fail. llvm-svn: 240043
* Wrap to 80 columns, no behavior change.Nico Weber2015-06-181-4/+4
| | | | llvm-svn: 240041
* R600: Add Volcanic Islands targetsTom Stellard2015-06-181-1/+5
| | | | | | | | | | Reviewers: arsenm Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D10316 llvm-svn: 240038
* Add missing overrides to MultiplexConsumer. Test coverage will beAdrian Prantl2015-06-181-0/+26
| | | | | | provided by an upcoming commit. llvm-svn: 240026
* clang-format: Row back on the AlwaysBreakBeforeMultilineStrings change.Daniel Jasper2015-06-181-1/+2
| | | | | | | | | | | | | | | It was a bit too aggressive. With this patch, we keep on breaking here: aaaaaaaaaaaaa(aaaaaaa, "aaaaaaa" "bbbbbbb"); But don't break in: aaaaaaaaaaaaa(aaaaaaa, aaaaaaaa("aaaaaaa" "bbbbbbb")); llvm-svn: 240024
* clang-format: Better support functions with elaborated enum return types.Daniel Jasper2015-06-181-0/+2
| | | | | | | | | Before, this wasn't formatted properly: enum ::C f() { return a; } llvm-svn: 240021
* Allow case-insensitive values for -march for AArch64 target in line with GCC.Gabor Ballabas2015-06-181-1/+2
| | | | | | | GCC allows case-insensitive values for -mcpu, -march and -mtune options. This patch implements the same behaviour for the -march option for the AArch64 target. llvm-svn: 240019
* [OPENMP] Codegen for 'proc_bind' clause (4.0).Alexey Bataev2015-06-183-0/+57
| | | | | | | Adds emission of the code for 'proc_bind(master|close|spread)' clause: call void @__kmpc_push_proc_bind(<loc>, i32 thread_id, i32 4|3|2) llvm-svn: 240018
* clang-format: [JS] Add a special case for indenting function literals.Daniel Jasper2015-06-181-1/+15
| | | | | | | | | | | | | | | | | | | | Before: var func = function() { doSomething(); }; After: var func = function() { doSomething(); }; This is a very narrow special case which fixes most of the discrepency with what our users do. In the long run, we should try to come up with a more generic fix for indenting these. llvm-svn: 240014
* [OPENMP] Support for '#pragma omp taskgroup' directive.Alexey Bataev2015-06-1815-5/+166
| | | | | | | | | | | | | Added parsing, sema analysis and codegen for '#pragma omp taskgroup' directive (OpenMP 4.0). The code for directive is generated the following way: #pragma omp taskgroup <body> void __kmpc_taskgroup(<loc>, thread_id); <body> void __kmpc_end_taskgroup(<loc>, thread_id); llvm-svn: 240011
* [clang] Refactoring of conditions so they use isOneOf() instead of multiple ↵Daniel Marjamaki2015-06-1815-224/+192
| | | | | | is(). llvm-svn: 240008
* [OPENMP] Add support for 'omp parallel for' directive.Alexey Bataev2015-06-183-10/+47
| | | | | | Codegen for this directive is a combined codegen for 'omp parallel' region with 'omp for simd' region inside. Clauses are supported. llvm-svn: 240006
* clang-format: Make AlwaysBreakBeforeMultilineStrings more conservative.Daniel Jasper2015-06-181-7/+9
| | | | | | | | | | | | | | | | | In essence this is meant to consistently indent multiline strings by a fixed amount of spaces from the start of the line. Don't do this in cases where it wouldn't help anyway. Before: someFunction(aaaaa, "aaaaa" "bbbbb"); After: someFunction(aaaaa, "aaaaa" "bbbbb"); llvm-svn: 240004
* [OPENMP] Add support for 'omp for simd' directive.Alexey Bataev2015-06-183-34/+68
| | | | | | Added codegen for combined 'omp for simd' directives, that is a combination of 'omp for' directive followed by 'omp simd' directive. Includes support for all clauses. llvm-svn: 239990
* [Driver] Remove unused class member. NFC.Alexey Samsonov2015-06-182-9/+0
| | | | llvm-svn: 239981
* [Driver] Simplify code choosing between MacOS and iOS platforms. NFC.Alexey Samsonov2015-06-181-12/+10
| | | | llvm-svn: 239980
* [modules] Ensure that if we merge the definitions of two enumerations, thatRichard Smith2015-06-172-18/+23
| | | | | | making either of them visible makes the merged definition visible. llvm-svn: 239969
* [Driver] Add an assert to Darwin::isTargetMacOS() for consistency.Alexey Samsonov2015-06-171-0/+1
| | | | llvm-svn: 239967
* Revert "[Sanitizers] Provide better diagnostic for sanitizers unsupported ↵Alexey Samsonov2015-06-175-90/+45
| | | | | | | | | for target triple." This reverts commit r239953, while I'm investigating assertion failure from http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/9994/ llvm-svn: 239958
* [modules] Fix typo in default argument merging.Richard Smith2015-06-171-3/+3
| | | | llvm-svn: 239954
* [Sanitizers] Provide better diagnostic for sanitizers unsupported for target ↵Alexey Samsonov2015-06-175-45/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | triple. Summary: Introduce ToolChain::getSupportedSanitizers() that would return the set of sanitizers available on given toolchain. By default, these are sanitizers which don't necessarily require runtime support (i.e. set from -fsanitize=undefined-trap). Sanitizers (ASan, DFSan, TSan, MSan etc.) which cannot function without runtime library are marked as supported only on platforms for which we actually build these runtimes. This would allow more fine-grained checks in the future: for instance, we have to restrict availability of -fsanitize=vptr to Mac OS 10.9+ (PR23539) Update test cases accrodingly: add tests for certain unsupported configurations, remove test cases for -fsanitize=vptr + PS4 integration, as we don't build the runtime for PS4 at the moment. Test Plan: regression test suite Reviewers: pcc Subscribers: cfe-commits, filcab, eugenis, thakis, kubabrecka, emaste, rsmith Differential Revision: http://reviews.llvm.org/D10467 llvm-svn: 239953
* Update clang to take into account the changes to personality fnsDavid Majnemer2015-06-171-6/+11
| | | | llvm-svn: 239941
* [modules] If we merge a template, also track that its parameters are merged soRichard Smith2015-06-171-4/+12
| | | | | | that we know when its default arguments should be visible. llvm-svn: 239936
* [modules] Improve diagnostic for a template-id that's invalid because a defaultRichard Smith2015-06-173-20/+90
| | | | | | argument is not visible. llvm-svn: 239934
* CodeGen: Factor out some of the bitset entry creation code. NFC.Peter Collingbourne2015-06-173-18/+23
| | | | llvm-svn: 239927
* Move xtest to its own file to match the gcc header organization.Eric Christopher2015-06-173-9/+43
| | | | llvm-svn: 239926
* Update comments on HLE, RTM, and ADX support for intrinsics.Eric Christopher2015-06-171-3/+6
| | | | llvm-svn: 239925
* [fixit] Use overwriteChangedFiles() to deal with Windows mapped filesReid Kleckner2015-06-172-2/+10
| | | | | | Fixes one instance of PR17960. llvm-svn: 239920
* clang-format: clang-format (NFC)Daniel Jasper2015-06-179-46/+33
| | | | llvm-svn: 239903
* clang-format: Don't generate unnecessary replacements for \r\n line endings.Daniel Jasper2015-06-171-1/+1
| | | | | | Patch by Mathieu Champlon. Thank you. llvm-svn: 239900
* clang-format: [JS] Don't put top-level typescript enums on a single line.Daniel Jasper2015-06-171-27/+34
| | | | | | | | | | | This makes this consistent with non-typescript enums. Also shuffle the language-dependent stuff in mustBreakBefore to a single location. Patch initiated by Martin Probst. llvm-svn: 239894
* clang-format: [JS] Fix typescript enum formatting.Daniel Jasper2015-06-171-5/+13
| | | | | | | | | | | | | | | | | | | Patch by Martin Probst. Before: enum { A, B } var x = 1; After: enum { A, B } var x = 1; llvm-svn: 239893
* clang-format: NFC. Add a function to test whether an annotated lineDaniel Jasper2015-06-173-23/+39
| | | | | | | starts with a given sequence of tokens. Only the one-token version is used yet, but other usages are coming up momentarily. llvm-svn: 239892
* [OPENMP] Code reformatting for omp simd codegen, NFC.Alexey Bataev2015-06-172-104/+103
| | | | llvm-svn: 239889
* Update the intel intrinsic headers to use the target attribute support.Eric Christopher2015-06-1735-236/+48
| | | | | | | | | | | | | | | | | | | This involved removing the conditional inclusion and replacing them with target attributes matching the original conditional inclusion and checks. The testcase update removes the macro checks for each file and replaces them with usage of the __target__ attribute, e.g.: int __attribute__((__target__(("sse3")))) foo(int a) { _mm_mwait(0, 0); return 4; } This usage does require the enclosing function have the requisite __target__ attribute for inlining and code generation - also for any macro intrinsic uses in the enclosing function. There's no change for existing uses of the intrinsic headers. llvm-svn: 239883
* Use a define for per-file function attributes for the Intel intrinsic headers.Eric Christopher2015-06-1731-1660/+1802
| | | | | | | This is a precursor to changing them to use the new target attribute code. llvm-svn: 239882
* [OPENMP] Supported reduction clause in omp simd construct.Alexey Bataev2015-06-173-3/+20
| | | | | | | | | | | | | | | | The following code is generated for reduction clause within 'omp simd' loop construct: #pragma omp simd reduction(op:var) for (...) <body> alloca priv_var priv_var = <initial reduction value>; <loop_start>: <body> // references to original 'var' are replaced by 'priv_var' <loop_end>: var op= priv_var; llvm-svn: 239881
* Update for llvm api change.Rafael Espindola2015-06-161-2/+2
| | | | llvm-svn: 239859
* [modules] Fix merging of default template arguments onto friend templates.Richard Smith2015-06-161-3/+3
| | | | | | | | | Previously we'd complain about redefinition of default arguments when we instantiated a class with a friend template that inherits its default argument, because we propagate the default template arguemnt onto the friend when we reload the AST. llvm-svn: 239857
* Honor the objc_runtime_name attribute when encoding class/protocol names.Douglas Gregor2015-06-161-6/+5
| | | | | | | | While the rest of the Objective-C metadata seems to honor objc_runtime_name, the encoding strings produced by, e.g., @encode and property meta, were not. Fixes rdar://problem/21408305. llvm-svn: 239852
* parser: diagnose empty attribute blocksSaleem Abdulrasool2015-06-161-1/+3
| | | | | | | | | | | MS attributes do not permit empty attribute blocks. Correctly diagnose those. We continue to parse to ensure that we recover correctly. Because the block is empty, we do not need to skip any tokens. Bonus: tweak the comment that I updated but forgot to remove the function name in a previous commit. llvm-svn: 239846
* Remove duplicated alteration to getProgramPaths().Douglas Katzman2015-06-161-4/+0
| | | | | | | | This appears to have been accidental. Differential Revision: http://reviews.llvm.org/D10444 llvm-svn: 239844
* If/else looks nicer when both branches have (or don't have) braces. NFCDouglas Katzman2015-06-161-1/+2
| | | | llvm-svn: 239834
* [SystemZ] Mangle long double as __float128Ulrich Weigand2015-06-161-0/+4
| | | | | | | | | | | | | In r239421, the mangling of long double on PowerPC Linux targets was changed to use "g" instead of "e". This same change also needs to be done for SystemZ (all targets, since we support only Linux on SystemZ anyway). This is because an old ABI variant set "long double" to a 64-bit type equivalent to "double", and the "e" mangling code is still used to refer to that old ABI for compatibility reasons. llvm-svn: 239822
* [mips] Don't propagate -mfpxx by default if soft/single float were also set.Toma Tabacu2015-06-162-5/+27
| | | | | | | | | | | | | | | | | Summary: If the driver is only given -msoft-float/-mfloat-abi=soft or -msingle-float, we should refrain from propagating -mfpxx, unless it was explicitly given on the command line. Reviewers: atanasyan, dsanders Reviewed By: atanasyan, dsanders Subscribers: cfe-commits, mpf Differential Revision: http://reviews.llvm.org/D10387 llvm-svn: 239818
* [OPENMP] Support lastprivate clause in omp simd directive.Alexey Bataev2015-06-162-19/+33
| | | | | | Added codegen for lastprivate clauses within simd loop-based directives. llvm-svn: 239813
* Recommit r239721: Replace string GNU Triples with llvm::Triple in ↵Daniel Sanders2015-06-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | InitMCObjectFileInfo. NFC. Summary: This affects other tools so the previous C++ API has been retained as a deprecated function for the moment. Clang has been updated with a trivial patch (not covered by the pre-commit review) to avoid breaking -Werror builds. Other in-tree tools will be fixed with similar patches. This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. The first time this was committed it accidentally fixed an inconsistency in triples in llvm-mc and this caused a failure. This inconsistency was fixed in r239808. Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10366 llvm-svn: 239812
* [OPENMP] Remove last iteration separation for loop-based constructs.Alexey Bataev2015-06-166-30/+14
| | | | | | Previously the last iteration for simd loop-based OpenMP constructs were generated as a separate code. This feature is not required and codegen is simplified. llvm-svn: 239810
* Tooling: When applying a set of replacements, do deletions beforeDaniel Jasper2015-06-161-1/+6
| | | | | | | | insertions. It is unlikely to be the intention to delete parts of newly inserted code. To do so, changed sorting Replacements at the same offset to have decreasing length. llvm-svn: 239809
* InstrProf: Fix coverage mapping when "if" is a macroJustin Bogner2015-06-161-0/+3
| | | | | | | | | We were propagating the coverage map into the body of an if statement, but not into the condition thereafter. This is fine as long as the two locations are in the same virtual file, but they won't be when the "if" part of the statement is from a macro and the condition is not. llvm-svn: 239803
OpenPOWER on IntegriCloud