summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix sse4 for target attribute feature additions.Eric Christopher2015-07-011-0/+3
| | | | | | | | | | This reinstates part of the hack removed in r233223, by special casing sse4 as part of the feature additions. The notable change here is that we consider it only as part of setting the SSE level and not as part of the actual target features set which handles setting the rest of the masks. llvm-svn: 241130
* Fix a TODO dealing with canonicalizing attributes on functions byEric Christopher2015-07-012-3/+3
| | | | | | | | using a string map to canonicalize. Fix up a couple of testcases that needed changing since we are no longer simply appending features to the list, but all of their mask dependencies as well. llvm-svn: 241129
* [modules] Make sure macros get made visible in the top-level file if we've gotRichard Smith2015-06-303-0/+20
| | | | | | | local submodule visibility enabled; that top-level file might not actually be the module includes buffer if use of prebuilt modules is disabled. llvm-svn: 241120
* [MS ABI] Stick constructor closures in an IR COMDAT groupDavid Majnemer2015-06-301-6/+6
| | | | | | | We no-longer stick linkonce_odr entities in COMDATs in the backend. Instead, we rely on the IR COMDAT mechanism. llvm-svn: 241117
* CodeGen: Assign an appropriate comdat to thunks.Peter Collingbourne2015-06-301-2/+2
| | | | | | | | | | | | Previously we were not assigning a comdat to thunks in the Microsoft ABI, which would have required us to emit these functions outside of a comdat. (Due to an inconsistency in how we were emitting objects, we were getting this right most of the time, but only when compiling with function sections.) This code generator change causes us to create a comdat for each thunk. Differential Revision: http://reviews.llvm.org/D10829 llvm-svn: 241102
* Update testcases: DICompileUnits are now created distinct by DIBuilder.Adrian Prantl2015-06-305-6/+6
| | | | llvm-svn: 241098
* Relax this test so it also works on platforms that use characters otherAdrian Prantl2015-06-301-1/+1
| | | | | | than forward slashes as path separators. llvm-svn: 241090
* Debug Info: Emit debug info for @import declarations.Adrian Prantl2015-06-303-0/+13
| | | | | | | | | This allows a module-aware debugger such as LLDB to import the currently visible modules before dropping into the expression evaluator. rdar://problem/20965932 llvm-svn: 241084
* [clang-cl] Use /arch: to set the base target CPUReid Kleckner2015-06-301-2/+9
| | | | | | | | | | | | The main effect of this change is that /arch:IA32 will use i386 as the CPU, while clang-cl will continue to default to pentium4 (aka SSE2 plus the usual other features). /arch:AVX and /arch:AVX2 will also now enable the other features available in sandybridge and haswell respectively, which is consistent with MSDN. llvm-svn: 241077
* [CONCEPTS] Parsing of concept keywordHubert Tong2015-06-301-0/+30
| | | | | | | | | | | | | | | | | | Summary: This change adds parsing for the concept keyword in a declaration and tracks the location. Diagnostic testing added for invalid use of concept keyword. Reviewers: faisalv, fraggamuffin, rsmith, hubert.reinterpretcast Reviewed By: rsmith, hubert.reinterpretcast Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D10528 Patch by Nathan Wilson! llvm-svn: 241060
* [X86] Add FXSR intrinsicsMichael Kuperstein2015-06-301-0/+4
| | | | | | | | | Add intrinsics for the FXSR instructions (FXSAVE/FXSAVE64/FXRSTOR/FXRSTOR64) These were previously declared in Intrin.h for MSVC compatibility, but now that we have them implemented, these declarations can be removed. llvm-svn: 241053
* Fix a couple of tests in clang/test to match "x86_thiscallcc" introduced in ↵NAKAMURA Takumi2015-06-302-3/+3
| | | | | | r240971. llvm-svn: 241047
* [CodeGen] Tweak isTriviallyRecursive furtherDavid Majnemer2015-06-301-0/+7
| | | | | | | | | | | | | | | | isTriviallyRecursive is a hack used to bridge a gap between the expectations that source code assumes and the semantics that LLVM IR can provide. Specifically, asm labels on functions are treated as an explicit name for a GlobalObject in Clang but treated like an output-processing step in GCC. Tweak this hack a little further to emit calls to library functions instead of emitting an incorrect definition. The definition in question would have available_externally linkage (this is OK) but result in a call to itself which will either result in an infinite loop or stack overflow. This fixes PR23964. llvm-svn: 241043
* [MS ABI] Workaround corner-case bug in the ABI for operator deleteDavid Majnemer2015-06-301-0/+10
| | | | | | | | | | | | | | | MSVC only genreates array cookies if the class has a destructor. This is problematic when having to call T::operator delete[](void *, size_t) because the second argument's argument is impossible to synthesize correctly if the class has no destructor (because there will be no array cookie). Instead, MSVC passes the size of the class. Do the same, for compatibility, instead of crashing. This fixes PR23990. llvm-svn: 241038
* Rework parsing of pure-specifiers. Perform the grammar matching andRichard Smith2015-06-301-0/+10
| | | | | | disambiguation in the parser rather than trying to do it in Sema. llvm-svn: 241032
* PR23942: a pure-specifier's integer literal must be spelled '0'Richard Smith2015-06-291-0/+10
| | | | llvm-svn: 241019
* Add support for the x86 builtin __builtin_cpu_supports.Eric Christopher2015-06-292-0/+37
| | | | | | | | | | | | | | | | | | | | This matches the implementation of the gcc support for the same feature, including checking the values set up by libgcc at runtime. The structure looks like this: unsigned int __cpu_vendor; unsigned int __cpu_type; unsigned int __cpu_subtype; unsigned int __cpu_features[1]; with a set of enums to match various fields that are field out after parsing the output of the cpuid instruction. This also adds a set of errors checking for valid input (and cpu). compiler-rt support for this and the other builtins in this family (__builtin_cpu_init and __builtin_cpu_is) are forthcoming. llvm-svn: 240994
* [CodeGen] Remove atomic sugar from record types in isSafeToConvertDavid Majnemer2015-06-291-2/+18
| | | | | | | | | | We failed to see that we should have deferred the creation of a type which references a type currently under construction because of atomic sugar. This fixes PR23985. llvm-svn: 240989
* Fix a test case broken by my previous commit.Douglas Gregor2015-06-291-2/+2
| | | | llvm-svn: 240977
* Make __has_feature(nullability) and __has_extension(nullability) always true.Douglas Gregor2015-06-291-0/+5
| | | | | | | These are _Underbar_capital-prefixed additions to the language that shouldn't depend on language standard. llvm-svn: 240976
* Instantiation of local class members.Serge Pavlov2015-06-291-0/+54
| | | | | | | | | | | | If a function containing a local class is instantiated, instantiate all of local class member, including default arguments and exception specifications. This change fixes PR21332 and thus implements DR1484. Differential Revision: http://reviews.llvm.org/D9990 llvm-svn: 240974
* Account for calling convention specifiers in function definitions in IR test ↵David Blaikie2015-06-2981-366/+366
| | | | | | | | | | | | | cases Several tests wouldn't pass when executed on an armv7a_pc_linux triple due to the non-default arm_aapcs calling convention produced on the function definitions in the IR output. Account for this with the application of a little regex. Patch by Ying Yi. llvm-svn: 240971
* Make __has_extension(assume_nonnull) always true.Douglas Gregor2015-06-291-0/+4
| | | | llvm-svn: 240969
* [Modules] Test lock file removed on signalBen Langmuir2015-06-293-0/+15
| | | | | | | | For r240967. rdar://problem/21512307 llvm-svn: 240968
* [x86][AVX512CD] Add conflict and lzcnt intrinsics in their 512bit versionsAsaf Badouh2015-06-291-0/+62
| | | | | | | | | include tests review http://reviews.llvm.org/D10795 llvm-svn: 240941
* [X86][AVX512BW] Add more intrinsics support:Asaf Badouh2015-06-291-0/+406
| | | | | | | | | | Blend, abs, packs, adds, subs, avg, max, min, permute. all the intrinsics are covered by tests review: http://reviews.llvm.org/D10799 llvm-svn: 240937
* This is a comment-only change to test commit accessIgor Breger2015-06-291-1/+1
| | | | llvm-svn: 240931
* [ARM]: Extend -mfpu options for half-precision and vfpv3xdJaved Absar2015-06-291-0/+55
| | | | | | | | | | | | | | | Some of the the permissible ARM -mfpu options, which are supported in GCC, are currently not present in llvm/clang.This patch adds the options: 'neon-fp16', 'vfpv3-fp16', 'vfpv3-d16-fp16', 'vfpv3xd' and 'vfpv3xd-fp16. These are related to half-precision floating-point and single precision. Reviewers: rengolin, ranjeet.singh Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10764 llvm-svn: 240929
* AVX-512: Implemented AVX-512 FMA intrinsics and tests.Elena Demikhovsky2015-06-292-4/+915
| | | | | | | | by Igor Breger http://reviews.llvm.org/D10797 llvm-svn: 240928
* Revert r240872, "Suppress clang/test/CodeGen/builtins-ppc-p8vector.c for ↵NAKAMURA Takumi2015-06-281-1/+1
| | | | | | | | -Asserts for now. Will fix later." This has been fixed since r240912. llvm-svn: 240920
* [PPC] fixes typos in builtins-ppc-p8vector.cJingyue Wu2015-06-281-2/+2
| | | | | | The extra ] causes %{{[0-9]]*}} to match only %<single digit> such as %1. llvm-svn: 240912
* [Driver] x86-64 Windows is always PICDavid Majnemer2015-06-281-0/+6
| | | | | | This fixes PR23963. llvm-svn: 240902
* [Sema] Unions cannot have virtual functions.Davide Italiano2015-06-271-0/+5
| | | | | | | | PR: PR23931 Differential Revision: http://reviews.llvm.org/D10752 Reviewed by: rsmith llvm-svn: 240889
* Suppress clang/test/CodeGen/builtins-ppc-p8vector.c for -Asserts for now. ↵NAKAMURA Takumi2015-06-271-1/+1
| | | | | | Will fix later. llvm-svn: 240872
* Add a testcase for bitfield debug info.Adrian Prantl2015-06-261-0/+91
| | | | llvm-svn: 240833
* Add missing builtins to altivec.h for ABI compliance (vol. 1)Nemanja Ivanovic2015-06-262-1/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D10637 This is the first round of additions of missing builtins listed in the ABI document. More to come (this builds onto what seurer already addes). This patch adds: vector signed long long vec_abs(vector signed long long) vector double vec_abs(vector double) vector signed long long vec_add(vector signed long long, vector signed long long) vector unsigned long long vec_add(vector unsigned long long, vector unsigned long long) vector double vec_add(vector double, vector double) vector double vec_and(vector bool long long, vector double) vector double vec_and(vector double, vector bool long long) vector double vec_and(vector double, vector double) vector signed long long vec_and(vector signed long long, vector signed long long) vector double vec_andc(vector bool long long, vector double) vector double vec_andc(vector double, vector bool long long) vector double vec_andc(vector double, vector double) vector signed long long vec_andc(vector signed long long, vector signed long long) vector double vec_ceil(vector double) vector bool long long vec_cmpeq(vector double, vector double) vector bool long long vec_cmpge(vector double, vector double) vector bool long long vec_cmpge(vector signed long long, vector signed long long) vector bool long long vec_cmpge(vector unsigned long long, vector unsigned long long) vector bool long long vec_cmpgt(vector double, vector double) vector bool long long vec_cmple(vector double, vector double) vector bool long long vec_cmple(vector signed long long, vector signed long long) vector bool long long vec_cmple(vector unsigned long long, vector unsigned long long) vector bool long long vec_cmplt(vector double, vector double) vector bool long long vec_cmplt(vector signed long long, vector signed long long) vector bool long long vec_cmplt(vector unsigned long long, vector unsigned long long) llvm-svn: 240821
* [PPC]: Fix bug in getMultiarchTriple.Douglas Katzman2015-06-264-0/+13
| | | | | | | | And generally prefer not to restate TargetTriple.str() over and over. Differential Revision: http://reviews.llvm.org/D10605 llvm-svn: 240808
* Avoid false positive/negative test results from line directive interference.NFC.Chad Rosier2015-06-261-5/+8
| | | | | | | http://reviews.llvm.org/D10443 Patch by Geoff Berry. llvm-svn: 240801
* [static analyzer] Analyzer is skipping forward declared C/C++ functionsAnna Zaks2015-06-264-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | A patch by Karthik Bhat! This patch fixes a regression introduced by r224398. Prior to r224398 we were able to analyze the following code in test-include.c and report a null deref in this case. But post r224398 this analysis is being skipped. E.g. // test-include.c #include "test-include.h" void test(int * data) { data = 0; *data = 1; } // test-include.h void test(int * data); This patch uses the function body (instead of its declaration) as the location of the function when deciding if the Decl should be analyzed with path-sensitive analysis. (Prior to r224398, the call graph was guaranteed to have a definition when available.) llvm-svn: 240800
* [ObjC] Add NSValue support for objc_boxed_expressionsAlex Denisov2015-06-262-32/+62
| | | | | | | | | | | | | Patch extends ObjCBoxedExpr to accept records (structs and unions): typedef struct __attribute__((objc_boxable)) _Color { int r, g, b; } Color; Color color; NSValue *boxedColor = @(color); // [NSValue valueWithBytes:&color objCType:@encode(Color)]; llvm-svn: 240761
* Fix crash-on-invalid bug in template instantiation.Manuel Klimek2015-06-261-0/+9
| | | | | | | | Get rid of code-path that (according to Richard Smith) is not needed but leads to a crasher bug when assuming a template has been fully instantiated and thus has a definition. llvm-svn: 240752
* FileCheck-ize test and make sure more things don't happen.Paul Robinson2015-06-261-3/+23
| | | | | | | | | Attribute 'nodebug' means no llvm.dbg.* intrinsics, no !dbg annotations, and no DISubprogram for the function. Differential Revision: http://reviews.llvm.org/D10747 llvm-svn: 240747
* [Sema] Maintain ellipsis location when transforming lambda capturesMeador Inge2015-06-261-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a crash caused by the following case: template<typename T> auto f(T x) { auto g = [](auto ... args) { auto h = [args...]() -> int { return 0; }; return h; }; return g; } auto x = f(0)(); When the templated function 'f' is instantiated and the inner-most lambda is transformed the ellipsis location on the captured variable is lost. Then the lambda returned by 'f' is instantiated and the tree transformer chokes on the invalid ellipsis location. The problem is fixed by making a minor change to properly track the ellipsis location. This fixes PR23716. Differential Revision: http://reviews.llvm.org/D10590 llvm-svn: 240740
* [CodeGen] Restrict isTriviallyRecursive to predefined lib functions ↵David Majnemer2015-06-251-8/+17
| | | | | | | | | | | forwarding to lib functions isTriviallyRecursive is only supposed to guard functions part of the implementation. This fixes PR23953. llvm-svn: 240735
* Fix a typo correction crash when resolving ambiguous corrections.Kaelyn Takata2015-06-251-0/+26
| | | | | | | | | | | In certain cases, the tree transform would introduce new TypoExprs while trying one of the corrections, invalidating the unique_ptr in the state reference, and also causing a TypoExpr to exist that will never be corrected since it doesn't exist in the final corrected expression. The simple solution to both problems is to temporarily disable typo correction while handling potentially ambiguous typo corrections. llvm-svn: 240734
* Fix the test added in r240710.Jonathan Roelofs2015-06-251-1/+1
| | | | llvm-svn: 240718
* [CFI] Diagnose when we CFI in diagnostic mode is unavailable on a toolchain.Alexey Samsonov2015-06-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | Summary: Namely, we must have proper C++ABI support in UBSan runtime. We don't have a good way to check for that, so just assume that C++ABI support is there whenever -fsanitize=vptr is supported (i.e. only on handful of platforms). Exact diagnostic is also tricky. It's not "cfi" that is unsupported, just the diagnostic mode. So, I suggest to report that "-fno-sanitize-trap=cfi-foobar" is incompatible with a given target toolchain. Test Plan: regression test suite Reviewers: pcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D10751 llvm-svn: 240716
* Display profile file name when emitting a file not found diagnostic.Diego Novillo2015-06-251-1/+1
| | | | | | | | | When a profile file cannot be opened, we used to display just the error message but not the name of the profile the compiler was trying to open. This will become useful in the next set of patches that introduce GCC-compatible flags to specify profiles. llvm-svn: 240715
* This should actually fix the broken bots.Chris Bieneman2015-06-251-0/+3
| | | | llvm-svn: 240710
* [Parse] Allow 'constexpr' in condition declarationsMeador Inge2015-06-251-0/+29
| | | | | | | | | | | | | | | | | This patch implements the functionality specified by DR948. The changes are two fold. First, the parser was modified to allow 'constexpr's to appear in condition declarations (which was a hard error before). Second, Sema was modified to cleanup maybe odr-used declarations by way of a call to 'ActOnFinishFullExpr'. As 'constexpr's were not allowed in condition declarations before the cleanup wasn't necessary (such declarations were always odr-used). This fixes PR22491. Differential Revision: http://reviews.llvm.org/D8978 llvm-svn: 240707
OpenPOWER on IntegriCloud