summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Apply existing checks to C++1Z (has_feature_cxx0x); NFCFaisal Vali2015-05-221-43/+85
| | | | | | | | | | | | This applies the existing checks in has_feature_cxx0x to -std=c++1z. In addition, references to C++1y are updated to refer to C++14 No functional change. Testing of __has_feature for C++1z features is not added in this change. Patch by Hubert Tong! llvm-svn: 237992
* [OpenMP] Test AVX default SIMD alignment. NFC.Ahmed Bougacha2015-05-221-6/+16
| | | | llvm-svn: 237991
* [CodeGen] Use TargetInfo::getABI() throughout X86*TargetCodeGenInfo.Ahmed Bougacha2015-05-221-22/+21
| | | | | | | | | We already have the ABI, we don't need a "HasAVX" flag. This will also makes it easier to add an AVX512 ABI. No functional change intended. llvm-svn: 237989
* Fix assertion when assigning to object in OpenCL constant address space.Richard Smith2015-05-224-1/+15
| | | | | | Patch by John Garvin! llvm-svn: 237983
* "This adds -fconcepts-ts as a cc1 option for enabling theFaisal Vali2015-05-226-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | in-progress implementation of the Concepts TS. The recommended feature test macro __cpp_experimental_concepts is set to 1 (as opposed to 201501) to indicate that the feature is enabled, but the implementation is incomplete. The link to the Concepts TS in cxx_status is updated to refer to the PDTS (N4377). Additional changes related to __has_feature and __has_extension are to follow in a later change. Relevant tests include: test/Lexer/cxx-features.cpp The test file is updated with testing of the C++14 + Concepts TS mode. The expected behaviour is the same as that of the C++14 modes except for the case of __cpp_experimental_concepts." - Hubert Tong. Being committed for Hubert (as per his understanding with Richard Smith) as we start work on the concepts-ts following our preliminary strategy session earlier today. The patch is tiny and seems quite standard. Thanks Hubert! llvm-svn: 237982
* Debug info: Adapt to new DIBuilder interface.Adrian Prantl2015-05-211-0/+1
| | | | llvm-svn: 237948
* Itanium mangler: don't trip an assertion when unresolved members have ↵Douglas Gregor2015-05-212-5/+18
| | | | | | | | | | | | implicit bases. When we find a member of the current instantation, the base of the unresolved member expression is implicit; use nullptr for such bases. This is not a change in behavior: the AST already contains null in such cases, so non-asserts builds do the right thing already. Fixes rdar://problem/21020559. llvm-svn: 237929
* clang-format: [JS] Better support for fat arrows.Manuel Klimek2015-05-215-19/+94
| | | | | | | | | | | | Assigns a token type (TT_JsFatArrow) to => tokens, and uses that to more easily recognize and format fat arrow functions. Improves function parsing to better recognize formal parameter lists and return type declarations. Recognizes arrow functions and parse function bodies as child blocks. Patch by Martin Probst. llvm-svn: 237895
* [ARM] Restructure cpu handling in the driver to mostly use the tripleJohn Brawn2015-05-212-44/+96
| | | | | | | | | | | | | | | | | | Using the target cpu to determine some behaviour is sprinkled in several places in the driver, but in almost all the information that is needed can be found in the triple. Restructure things so that the triple is used, and the cpu is only used if the exact cpu name is needed. Also add a check that the -mcpu argument is valid, and correct the -march argument checking so that it handles -march=native correctly. I would have liked to move these checks into the computation of the triple, but the triple is calculated several times in several places and that would lead to multiple error messages for the same thing. Differential Revision: http://reviews.llvm.org/D9879 llvm-svn: 237894
* [OPENMP] Fixed codegen for parameters privatization.Alexey Bataev2015-05-2113-91/+32
| | | | | | For parameters we shall take a derived type of parameters, not the original one. llvm-svn: 237882
* [OPENMP] Fixed codegen for lastprivate LCV in worksharing constructs.Alexey Bataev2015-05-212-3/+90
| | | | | | If loop control variable in a worksharing construct is marked as lastprivate, we should copy last calculated value of private counter back to original variable. llvm-svn: 237879
* Avoid using a C++11 library feature not present in libstdc++4.7.Richard Smith2015-05-211-2/+1
| | | | llvm-svn: 237872
* [modules] If we re-enter a submodule from within itself (when submoduleRichard Smith2015-05-218-80/+138
| | | | | | | | | | visibility is enabled) or leave and re-enter it, restore the macro and module visibility state from last time we were in that submodule. This allows mutually-#including header files to stand a chance at being modularized with local visibility enabled. llvm-svn: 237871
* [Driver] Improve unused-argument diagnostic for extra sanitizer features.Alexey Samsonov2015-05-213-3/+18
| | | | | | | | | | | | | | | Don't print unused-argument warning for sanitizer-specific feature flag if this sanitizer was eanbled, and later disabled in the command line. For example, now: clang -fsanitize=address -fsanitize-coverage=bb -fno-sanitize=address a.cc doesn't print warning, but clang -fsanitize-coverage=bb does. Same holds for -fsanitize-address-field-padding= and -fsanitize-memory-track-origins= flags. Fixes PR23604. llvm-svn: 237870
* Rename a helper template function to 'bytes' to avoid a C++17 STL conflictReid Kleckner2015-05-211-15/+15
| | | | | | | | | MSVC 2015 includes the std::data() template function added to C++17. ADL causes both cl.exe and clang-cl to prefer std::data over our static helper here, and we get errors about converting int64_t* to StringRef. Renaming it to bytes avoids the ambiguity. llvm-svn: 237863
* Work around overloading bug in MSVC 2015Reid Kleckner2015-05-211-3/+3
| | | | | | | | MSVC 2015 appears to be unable to find the correct operator== here. I haven't yet filed a bug with Microsoft as I've been unable to create a reduced test case. llvm-svn: 237862
* Check for bool-like conversion in conditional expressions.Richard Trieu2015-05-203-4/+32
| | | | | | | | | | Add a check for bool-like conversions for the condition expression of conditional operators. This is similiar to the checking of condition expressions of if statements, for-loops, while-loops, and do-while loops. Specificially, this is to fix the problem of assert("message") not triggering -Wstring-conversion when the assert macro uses a conditional operator. llvm-svn: 237856
* [OpenMP] Make default OpenMP library (the one selected with just -fopenmp)Richard Smith2015-05-203-45/+63
| | | | | | | | | configurable in the CMake build. There shouldn't be any change in default behavior. Derived from a patch by Daniel Jasper! llvm-svn: 237850
* Evaluate union cast subexpressions when the cast value is unusedReid Kleckner2015-05-202-1/+17
| | | | | | Fixes PR23597. llvm-svn: 237839
* Refactored some common functionality into MaybeParseMicrosoftDeclSpecs; NFC.Aaron Ballman2015-05-204-61/+67
| | | | llvm-svn: 237835
* [CodeGen] Check x86_64-arguments.c tests on AVX as well. NFC.Ahmed Bougacha2015-05-201-4/+6
| | | | | | | We used to only check the differing tests on AVX, but we might as well check all of them. llvm-svn: 237818
* [modules] Support merging a parsed default argument with an imported hidden ↵Richard Smith2015-05-202-1/+6
| | | | | | one for non-type and template template parameters too. llvm-svn: 237815
* [modules] Support merging a parsed default function/template argument with ↵Richard Smith2015-05-204-28/+62
| | | | | | an imported but hidden one. llvm-svn: 237814
* Use Intrinsic::ID instead of unsigned. NFC.Pete Cooper2015-05-201-3/+2
| | | | | | This is after LLVM r237810 which made Function::getIntrinsicID() return an Intrinsic::ID. llvm-svn: 237811
* InstrProf: Change this triple back to %itanium_abi_tripleJustin Bogner2015-05-201-1/+1
| | | | | | | In my rush to fix the linux bots in r237805, I accidentally committed a change to the triple. Revert that part. llvm-svn: 237806
* InstrProf: Remove darwin-specific section names from this testJustin Bogner2015-05-201-5/+5
| | | | llvm-svn: 237805
* InstrProf: Increment the profile counter for all types of destructorJustin Bogner2015-05-202-4/+34
| | | | | | | | | | | | -fprofile-instr-generate does not emit counter increment intrinsics for Dtor_Deleting and Dtor_Complete destructors with assigned counters. This causes unnecessary [-Wprofile-instr-out-of-date] warnings during profile-use runs even if the source has never been modified since profile collection. Patch by Betul Buyukkurt. Thanks! llvm-svn: 237804
* CodeGen: Remove some trailing whitespace. NFCJustin Bogner2015-05-201-96/+96
| | | | llvm-svn: 237802
* [OPENMP] Fix codegen for ordered loop directives.Alexey Bataev2015-05-205-69/+84
| | | | | | loops with ordered clause must be generated the same way as dynamic loops, but with static scheduleing. llvm-svn: 237788
* [MSVC] Handle out-of-line definition of static data member correctly (fix ↵Alexey Bataev2015-05-203-30/+53
| | | | | | | | | | | | | | | | | | for http://llvm.org/PR21164), by Alexey Frolov There are 3 cases of defining static const member: initialized inside the class, not defined outside the class. initialized inside the class, defined outside the class. not initialized inside the class, defined outside the class. Revision r213304 was supposed to fix the linkage problem of case (1), but mistakenly it made case (2) behave the same. As a result, out-of-line definition of static data member is not handled correctly. Proposed patch distinguishes between cases (1) and (2) and allows to properly emit static const members under –fms-compatibility option. This fixes http://llvm.org/PR21164. Differential Revision: http://reviews.llvm.org/D9850 llvm-svn: 237787
* Allow skipping imports in the module visitor.Manuel Klimek2015-05-204-46/+124
| | | | | | | Skip imports when we know that we do not need to visit any imports because we've already deserialized the redecls from a module. llvm-svn: 237782
* [X86] Add _mm256_set_m128 and its 5 variants.Michael Kuperstein2015-05-202-0/+65
| | | | | | Differential Revision: http://reviews.llvm.org/D9855 llvm-svn: 237778
* Fix CGRecordLayouts description to say it maps clang types not llvm typesYaron Keren2015-05-201-12/+10
| | | | | | | and de-duplicate data fields names from comments according to the coding standard. llvm-svn: 237776
* [clang-cl] Map /GA to -ftls-model=local-execDavid Majnemer2015-05-202-1/+5
| | | | | | | The /GA switch informs the compiler that it may assume that all TLS access refers to the executable's index: 0. llvm-svn: 237771
* [OPENMP] -fopenmp enables OpenMP support (fix for http://llvm.org/PR23492)Alexey Bataev2015-05-20185-400/+384
| | | | | | | -fopenmp turns on OpenMP support and links libiomp5 as OpenMP library. Also there is -fopenmp={libiomp5|libgomp} option that allows to override effect of -fopenmp and link libgomp library (if -fopenmp=libgomp is specified). Differential Revision: http://reviews.llvm.org/D9736 llvm-svn: 237769
* Fix for aggregate copying of variable length arrays.Alexey Bataev2015-05-203-16/+43
| | | | | | | | | | | | | Patch fixes codegen for aggregate copying of VLAs. Currently method CodeGenFunction::EmitAggregateCopy() does not support copying of VLAs. Patch checks if the size of the type is 0, then checks if the type is actually a variable-length array. Then it calculates total length for this array and calculates total size of the array in bytes: <total number of elements in array> * aligned_sizeof(ElementType) (if copy assignment is requested). If simple copying is requested, size is calculated like: <total number of elements in array> * aligned_sizeof(ElementType) - aligned_sizeof(ElementType) + sizeof(ElementType). memcpy() is used with this calculated size of the VLA. Differential Revision: http://reviews.llvm.org/D9851 llvm-svn: 237768
* [opaque pointer type] Pass the explicit call type when creating calls from ↵David Blaikie2015-05-191-17/+12
| | | | | | | | | | | LazyRuntimeFunctions The implicit conversion was causing issues for a helper being added that would take an llvm::Function rather than an llvm::Value to make the CallInst. Since we'll eventually need to specify the type of the call explicitly anyway, fix these up to avoid the future ambiguity. llvm-svn: 237729
* Revert r237609 for now.Richard Smith2015-05-192-7/+8
| | | | | | | | | | | | glibc's headers use __need_* macros to selectively export parts of themselves to each other. This requires us to enter those files repeatedly when building a glibc module. This can be unreverted once we have a better mechanism to deal with that non-modular aspect of glibc (possibly some way to mark a header as "textual if this macro is defined"). llvm-svn: 237718
* Fix 'CFG graph' typo. NFCJonathan Roelofs2015-05-192-4/+4
| | | | | | Patch by Jon Eyolfson! llvm-svn: 237713
* clang-format: Add space in function pointers with SpaceBeforeParens=AlwaysAnders Waldenborg2015-05-192-1/+3
| | | | | | | | | "void (*my_function)(void)" should become "void (*my_function) (void)" when SpaceBeforeParens is set to 'Always' Differential Revision: http://reviews.llvm.org/D9835 llvm-svn: 237704
* [X86] Add _mm_broadcastsd_pd intrinsicMichael Kuperstein2015-05-192-0/+11
| | | | | | _mm_broadcastsd_pd is basically an alias for _mm_movedup_pd, however the alias is only available from AVX2 forward. llvm-svn: 237698
* [X86] Added _mm256_bslli_epi128 and _mm256_bsrli_epi128.Michael Kuperstein2015-05-192-0/+14
| | | | | | These two intrinsics are alternative names for _mm256_slli_si256 and _mm256_srli_si256, respectively. llvm-svn: 237693
* [OPENMP] Fixed codegen for copying/initialization of array variables/parameters.Alexey Bataev2015-05-197-19/+157
| | | | | | This modification generates proper copyin/initialization sequences for array variables/parameters. Before they were considered as pointers, not arrays. llvm-svn: 237691
* clang-format: Improve *-detection.Daniel Jasper2015-05-192-0/+5
| | | | | | | | | | | | Before: S << a *(10); After: S << a * (10); This fixes llvm.org/PR16500. llvm-svn: 237690
* clang-format: Improve for-loop formatting.Daniel Jasper2015-05-192-1/+7
| | | | | | | | | | | | | | | | | | Before: for (SmallVectorImpl<TemplateIdAnnotationn *>::iterator I = Container.begin(), E = Container.end(); I != E; ++I) After: for (SmallVectorImpl<TemplateIdAnnotationn *>::iterator I = Container.begin(), E = Container.end(); I != E; ++I) This fixes llvm.org/PR23544. llvm-svn: 237688
* clang-format: Support #include_nextDaniel Jasper2015-05-192-0/+2
| | | | | | | | | | | | Before: #include_next < test.h > After: #include_next <test.h> This fixes llvm.org/PR23500 llvm-svn: 237686
* clang-format: Correctly detect casts to qualified types.Daniel Jasper2015-05-192-1/+3
| | | | | | | | | | | | Before: ns::E f() { return (ns::E) - 1; } After: ns::E f() { return (ns::E)-1; } This fixes llvm.org/PR23503. llvm-svn: 237684
* clang-format: Fix regression caused by r237244.Daniel Jasper2015-05-192-1/+4
| | | | | | | | | | | | | | | Before: [call aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa. aaaaaaaa]; After: [call aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa .aaaaaaaa]; This merely papers over the fact that we aren't parsing ObjC method calls correctly. Also, the indentation is weird. llvm-svn: 237681
* [OPENMP] Prohibit VLAs in 'private/firstprivate' clauses of 'task' directive.Alexey Bataev2015-05-195-3/+43
| | | | | | Currently runtime does not allow to support variably modified types for 'private' and 'firstprivate' clauses in 'task' directives. llvm-svn: 237674
* [OPENMP] Prohibit variably modified types in 'copyprivate' clause.Alexey Bataev2015-05-193-2/+15
| | | | | | Runtime does not allow to work with VLAs in copyprivate clause. llvm-svn: 237672
OpenPOWER on IntegriCloud