summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* [OPENMP] Fixed analysis of function arguments and their data sharing attributes.Alexey Bataev2015-05-195-50/+102
| | | | | | Added proper analysis for types of function arguments. llvm-svn: 237670
* SemaExprCXX.cpp: Try to fix \param in r237608. [-Wdocumentation]NAKAMURA Takumi2015-05-191-2/+1
| | | | llvm-svn: 237668
* PR20073: promote "dereference of 'void*'" from Extension to ExtWarn.Richard Smith2015-05-193-7/+7
| | | | llvm-svn: 237652
* [AST] Put VarDeclBitfields on a dietDavid Majnemer2015-05-194-65/+104
| | | | | | | | VarDeclBitfields contained bits which are never present in parameters. Split these out so that ParmVarDeclBitfields wouldn't grow past 32-bits if another field was added. llvm-svn: 237648
* [modules] Support for merging a parsed definition of a static data member of ↵Richard Smith2015-05-192-14/+35
| | | | | | a class template into an imported but hidden definition. llvm-svn: 237647
* Fix indentationDavid Blaikie2015-05-181-43/+43
| | | | llvm-svn: 237631
* Revert changes to DefaultABIInfo accidentally introduced in r208733Reid Kleckner2015-05-182-1/+21
| | | | | | | | | | | | Also add trivial handling of transparent unions. PPC32, MSP430, and XCore apparently all rely on DefaultABIInfo. This should worry you, because DefaultABIInfo is not implementing the rules of any particular ABI. Fixes PR23097, patch by Andy Gibbs. llvm-svn: 237630
* API update for streamlining of IRBuilder::CreateCall to just use ↵David Blaikie2015-05-1814-108/+109
| | | | | | ArrayRef/initializer_list+braced init llvm-svn: 237625
OpenPOWER on IntegriCloud