summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* The ability to use vector initializer lists is a GNU vector extensionJames Molloy2014-06-201-0/+13
| | | | | | | | | | | | | | | | | | | | | | and is unrelated to the NEON intrinsics in arm_neon.h. On little endian machines it works fine, however on big endian machines it exhibits surprising behaviour: uint32x2_t x = {42, 64}; return vget_lane_u32(x, 0); // Will return 64. Because of this, explicitly call out that it is unsupported on big endian machines. This patch will emit the following warning in big-endian mode: test.c:3:15: warning: vector initializers are a GNU extension and are not compatible with NEON intrinsics [-Wgnu] int32x4_t x = {0, 1, 2, 3}; ^ test.c:3:15: note: consider using vld1q_s32() to initialize a vector from memory, or vcombine_s32(vcreate_s32(), vcreate_s32()) to initialize from integer constants 1 warning generated. llvm-svn: 211362
* Add file missed in r211360 commitUlrich Weigand2014-06-201-0/+0
| | | | llvm-svn: 211361
* [PowerPC] Fix ELF interpreter name for powerpc64le-linuxUlrich Weigand2014-06-204-0/+24
| | | | | | | | | | On PowerPC LE the system uses the /lib64/ld64.so.2 dynamic linker name instead of /lib64/ld64.so.1 (to indicate the ELFv2 ABI version). This fixes the clang driver to pass the appropriate -dynamic-linker setting, and adds some more tests to linux-ld.c. llvm-svn: 211360
* [PowerPC] Add MultiarchIncludeDirs for powerpc64leUlrich Weigand2014-06-205-0/+16
| | | | | | | | | | There was already partial support for multi-arch on powerpc64le, but the MultiarchIncludeDirs setting was missing. This patch adds the appropriate definition, and also extends the linux-header-search.cpp test case to verify an Ubuntu 14.04 powerpc64le tree. llvm-svn: 211359
* Fix PR20081: Parsing templates in the presence of -x cuda -std=c++11Eli Bendersky2014-06-202-1/+22
| | | | | | http://reviews.llvm.org/D4222 llvm-svn: 211357
* Add module flags metadata to record the settings for enum and wchar widthOliver Stannard2014-06-201-0/+13
| | | | | | | Add module flags metadata to record the settings for enum and wchar width, to allow correct ARM build attribute generation llvm-svn: 211354
* [OPENMP] Initial support for 'nowait' clause.Alexey Bataev2014-06-201-4/+4
| | | | llvm-svn: 211352
* [OPENMP] Initial support for 'ordered' clause.Alexey Bataev2014-06-201-4/+4
| | | | llvm-svn: 211347
* Fix/Improve SourceRange of explicitly defaulted membersDaniel Jasper2014-06-203-6/+31
| | | | | | | | | | | | | | | | When adding the implicit compound statement (required for Codegen?), the end location was previously overridden by the start location, probably based on the assumptions: * The location of the compound statement should be the member's location * The compound statement if present is the last element of a FunctionDecl This patch changes the location of the compound statement to the member's end location. Code review: http://reviews.llvm.org/D4175 llvm-svn: 211344
* [OPENMP] Initial support for 'schedule' clause.Alexey Bataev2014-06-202-8/+99
| | | | llvm-svn: 211342
* Objective-C qoi. When Objective-C pointer mismatches withFariborz Jahanian2014-06-191-0/+17
| | | | | | | | a qualified-id type because pointer is object of a forward class declaration, include this info in a diagnostic note. // rdar://10751015 llvm-svn: 211324
* test: Just check the VFS when testing module-dependency-dumpJustin Bogner2014-06-192-21/+0
| | | | | | | Checking the filesystem seems to be a bit unreliable. Limit the tests to the VFS map for now. llvm-svn: 211310
* Frontend: Add a CC1 flag to dump module dependencies to a directoryJustin Bogner2014-06-192-0/+52
| | | | | | | | | | | | | | | | | | This adds the -module-dependency-dir to clang -cc1, which specifies a directory to copy all of a module's dependencies into in a form suitable to be used as a VFS using -ivfsoverlay with the generated vfs.yaml. This is useful for crashdumps that involve modules, so that the module dependencies will be intact when a crash report script is used to reproduce a problem on another machine. We currently encode the absolute path to the dump directory, due to limitations in the VFS system. Until we can handle relative paths in the VFS, users of the VFS map may need to run a simple search and replace in the file. llvm-svn: 211303
* Fix PR20069: bad loop pragma arguments crash FEEli Bendersky2014-06-191-12/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a crash when handling malformed arguments to loop pragmas such as: "#pragma clang loop vectorize(()". Essentially any argument which is not an identifier or constant resulted in a crash. This patch also changes a couple of the error messages which weren't quite correct. New behavior with this patch vs old behavior: #pragma clang loop vectorize(1) OLD: error: missing keyword; expected 'enable' or 'disable' NEW: error: invalid argument; expected 'enable' or 'disable' #pragma clang loop vectorize() OLD: error: expected ')' NEW: error: missing argument to loop pragma 'vectorize' #pragma clang loop vectorize_width(bad) OLD: error: missing value; expected a positive integer value NEW: error: invalid argument; expected a positive integer value #pragma clang loop vectorize(bad) OLD: invalid keyword 'bad'; expected 'enable' or 'disable' NEW: error: invalid argument; expected 'enable' or 'disable' http://reviews.llvm.org/D4197 Patch by Mark Heffernan llvm-svn: 211292
* Improve robustness of tests for module flags metadataOliver Stannard2014-06-198-29/+29
| | | | | | | Fix clang tests to not break if the ID numbers of module flags metadata nodes change. llvm-svn: 211276
* Fix assertion hit or bogus compiler error in cases when instantiating ObjC ↵Argyrios Kyrtzidis2014-06-191-0/+35
| | | | | | | | property accesses used with overloaded binary operators. rdar://17153478 llvm-svn: 211270
* [c++1z] Implement N3994: a range-based for loop can declare a variable with ↵Richard Smith2014-06-191-2/+20
| | | | | | | | | | | | super-terse notation for (x : range) { ... } which is equivalent to for (auto &&x : range) { ... } llvm-svn: 211267
* [OPENMP] Improved diagnostic messages for vars with the predetermined data ↵Alexey Bataev2014-06-1910-230/+321
| | | | | | sharing attributes and reformatting llvm-svn: 211262
* Objective-C ARC. Allow conversion of (void*) pointers toFariborz Jahanian2014-06-181-1/+17
| | | | | | | | retainable ObjC pointers without requiring a bridge-cast in the context of pointer comparison as this is in effect a +0 context. // rdar://16627903 llvm-svn: 211243
* Sema: Static redeclaration after extern declarations is a Microsoft ExtensionDavid Majnemer2014-06-186-11/+13
| | | | | | | | | | | CL permits static redeclarations to follow extern declarations. The storage specifier on the latter declaration has no effect. This fixes PR20034. Differential Revision: http://reviews.llvm.org/D4149 llvm-svn: 211238
* Objective-C. Revert my patch in r211234.Fariborz Jahanian2014-06-184-21/+7
| | | | llvm-svn: 211237
* Objective-C ARC. Allow conversion of (void*) pointers toFariborz Jahanian2014-06-184-7/+21
| | | | | | | retainable ObjC pointers without requiring a bridge-cast by recognizing this as a +0 context. // rdar://16627903 llvm-svn: 211234
* tests: relax ms-intrinsics testSaleem Abdulrasool2014-06-181-17/+14
| | | | | | | | | | Relax the tests to allow for differences between release and debug builds. This should fix the buildbots. Thanks to Benjamin Kramer and Eric Christo for their invaluable tip that this was release build specific issue. llvm-svn: 211227
* Relax the cl-inputs.c test a little bit in case link.exe is on PATHReid Kleckner2014-06-181-2/+2
| | | | llvm-svn: 211224
* [MS-ABI] Implement typeidWarren Hunt2014-06-181-0/+58
| | | | | | | This patch enables clang to generate calls to __RTtypeid when lowering typeid on win32 targets. Test cases are included. llvm-svn: 211223
* CodeGen: improve ms instrincics supportSaleem Abdulrasool2014-06-181-0/+41
| | | | | | | | | Add support for _InterlockedCompareExchangePointer, _InterlockExchangePointer, _InterlockExchange. These are available as a compiler intrinsic on ARM and x86. These are used directly by the Windows SDK headers without use of the intrin header. llvm-svn: 211216
* Objective-C. Check for integer overflow in Objective-C'sFariborz Jahanian2014-06-181-1/+19
| | | | | | boxed expression. // rdar://16417427 llvm-svn: 211215
* [analyzer] Don't create new PostStmt nodes if we don't have to.Jordan Rose2014-06-181-0/+27
| | | | | | | | Doing this caused us to mistakenly think we'd seen a particular state before when we actually hadn't, which resulted in false negatives. Credit to Rafael Auler for discovering this issue! llvm-svn: 211209
* Objective-C. Try to fix the test in buildbot in my last patch.Fariborz Jahanian2014-06-181-1/+1
| | | | llvm-svn: 211197
* Objective-C. Attributes on class declarations carry overFariborz Jahanian2014-06-181-1/+28
| | | | | | | to forward class declarations for diagnosis. // rdar://16681279 llvm-svn: 211195
* Make clang-cl accept .lib inputs (PR20065)Hans Wennborg2014-06-182-0/+9
| | | | | | | | | | Patch by Ehsan Akhgari! (Tiny tweak by me: renamed PathSegment to LibDir.) Differential Revision: http://reviews.llvm.org/D4192 llvm-svn: 211189
* Driver: correct the backend option spellingSaleem Abdulrasool2014-06-181-3/+3
| | | | | | The backend option does not have an '-enable' prefix. llvm-svn: 211177
* Inherit dll attributes to static localsHans Wennborg2014-06-182-0/+25
| | | | | | | | This makes us handle static locals in exported/imported functions correctly. Differential Revision: http://reviews.llvm.org/D4136 llvm-svn: 211173
* AArch64: re-enable tests that were looking for a non-existent backend.Tim Northover2014-06-1832-32/+32
| | | | | | | | In the final phase of the merge, I managed to disable a bunch of Clang tests accidentally. Fortunately none of them seem to have broken in the interim. llvm-svn: 211149
* [OPENMP] Initial support for '#pragma omp for' (fixed incompatibility with ↵Alexey Bataev2014-06-1810-107/+2353
| | | | | | MSVC). llvm-svn: 211140
* Fix bug in code for avoiding dynamic initialization of dllimport globalsHans Wennborg2014-06-181-0/+18
| | | | | | | | | | | | | When instantiating dllimport variables with dynamic initializers, don't bail out of Sema::InstantiateVariableInitializer without calling PopExpressionEvaluationContext(). This was causing a stale object to stay on the ExprEvalContexts stack, causing subsequent calls to getCurrentMangleNumberContext() to fail, resulting in incorrect numbering of static locals (and probably other broken things). llvm-svn: 211137
* Objective-C ARC. Do not warn about properties with bothFariborz Jahanian2014-06-171-2/+14
| | | | | | | | | IBOutlet and weak attributes when accessed being unpredictably set to nil because usage of such properties are always single threaded and its ivar cannot be set to nil asynchronously. // rdar://15885642 llvm-svn: 211132
* Revert "[OPENMP] Initial support for '#pragma omp for'."Rafael Espindola2014-06-1710-2353/+107
| | | | | | | | This reverts commit r211096. Looks like it broke the msvc build: SemaOpenMP.cpp(140) : error C4519: default template arguments are only allowed on a class template llvm-svn: 211113
* Rewrite ARM NEON intrinsic emission completely.James Molloy2014-06-173-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There comes a time in the life of any amateur code generator when dumb string concatenation just won't cut it any more. For NeonEmitter.cpp, that time has come. There were a bunch of magic type codes which meant different things depending on the context. There were a bunch of special cases that really had no reason to be there but the whole thing was so creaky that removing them would cause something weird to fall over. There was a 1000 line switch statement for code generation involving string concatenation, which actually did lexical scoping to an extent (!!) with a bunch of semi-repeated cases. I tried to refactor this three times in three different ways without success. The only way forward was to rewrite the entire thing. Luckily the testing coverage on this stuff is absolutely massive, both with regression tests and the "emperor" random test case generator. The main change is that previously, in arm_neon.td a bunch of "Operation"s were defined with special names. NeonEmitter.cpp knew about these Operations and would emit code based on a huge switch. Actually this doesn't make much sense - the type information was held as strings, so type checking was impossible. Also TableGen's DAG type actually suits this sort of code generation very well (surprising that...) So now every operation is defined in terms of TableGen DAGs. There are a bunch of operators to use, including "op" (a generic unary or binary operator), "call" (to call other intrinsics) and "shuffle" (take a guess...). One of the main advantages of this apart from making it more obvious what is going on, is that we have proper type inference. This has two obvious advantages: 1) TableGen can error on bad intrinsic definitions easier, instead of just generating wrong code. 2) Calls to other intrinsics are typechecked too. So we no longer need to work out whether the thing we call needs to be the Q-lane version or the D-lane version - TableGen knows that itself! Here's an example: before: case OpAbdl: { std::string abd = MangleName("vabd", typestr, ClassS) + "(__a, __b)"; if (typestr[0] != 'U') { // vabd results are always unsigned and must be zero-extended. std::string utype = "U" + typestr.str(); s += "(" + TypeString(proto[0], typestr) + ")"; abd = "(" + TypeString('d', utype) + ")" + abd; s += Extend(utype, abd) + ";"; } else { s += Extend(typestr, abd) + ";"; } break; } after: def OP_ABDL : Op<(cast "R", (call "vmovl", (cast $p0, "U", (call "vabd", $p0, $p1))))>; As an example of what happens if you do something wrong now, here's what happens if you make $p0 unsigned before the call to "vabd" - that is, $p0 -> (cast "U", $p0): arm_neon.td:574:1: error: No compatible intrinsic found - looking up intrinsic 'vabd(uint8x8_t, int8x8_t)' Available overloads: - float64x2_t vabdq_v(float64x2_t, float64x2_t) - float64x1_t vabd_v(float64x1_t, float64x1_t) - float64_t vabdd_f64(float64_t, float64_t) - float32_t vabds_f32(float32_t, float32_t) ... snip ... This makes it seriously easy to work out what you've done wrong in fairly nasty intrinsics. As part of this I've massively beefed up the documentation in arm_neon.td too. Things still to do / on the radar: - Testcase generation. This was implemented in the previous version and not in the new one, because - Autogenerated tests are not being run. The testcase in test/ differs from the autogenerated version. - There were a whole slew of special cases in the testcase generation that just felt (and looked) like hacks. If someone really feels strongly about this, I can try and reimplement it too. - Big endian. That's coming soon and should be a very small diff on top of this one. llvm-svn: 211101
* clang-format: Introduce style with spaces on both sides of */&.Daniel Jasper2014-06-171-0/+4
| | | | | | | Patch by Janusz Sobczak (slightly extended). This fixes llvm.org/19929. llvm-svn: 211098
* [OPENMP] Initial support for '#pragma omp for'.Alexey Bataev2014-06-1710-107/+2353
| | | | llvm-svn: 211096
* Add support for the /Fi argument to clang-cl (PR20036)Hans Wennborg2014-06-171-0/+8
| | | | | | | | Patch by Ehsan Akhgari! Differential Revision: http://reviews.llvm.org/D4143 llvm-svn: 211081
* MS static locals mangling: don't double-increment mangling number for switchesHans Wennborg2014-06-171-0/+29
| | | | | | Differential Revision: http://reviews.llvm.org/D4165 llvm-svn: 211079
* MS static locals mangling: don't count enum scopesHans Wennborg2014-06-171-0/+21
| | | | | | | | | | We may not have the mangling for static locals vs. enums completely figured out, but at least for my simple test cases, enums should not increment the mangling number. Differential Revision: http://reviews.llvm.org/D4164 llvm-svn: 211078
* Use the integrated assembler by default on OpenBSD/powerpc.Brad Smith2014-06-161-0/+5
| | | | llvm-svn: 211075
* AArch64: Fix silly think-o in tests.Jim Grosbach2014-06-161-4/+4
| | | | | | rdar://9283021 llvm-svn: 211064
* AArch64: Support for __builtin_arm_rbit() and __builtin_arm_rbit64().Jim Grosbach2014-06-161-0/+10
| | | | | | | | __builtin_arm_rbit() and __builtin_arm_rbit64(). rdar://9283021 llvm-svn: 211060
* ARM: Support for __builtin_arm_rbit() intrinsic.Jim Grosbach2014-06-161-0/+6
| | | | | | | | Reverse the bits in a word. Maps to the RBIT instruction. rdar://9283021 llvm-svn: 211059
* [modules] When we merge redecl chains or mark a decl used with an updateRichard Smith2014-06-164-0/+16
| | | | | | | record, mark all subsequent decls as 'used' too, to maintain the AST invariant that getPreviousDecl()->Used implies this->Used. llvm-svn: 211050
* MS ABI: Implement x86_64 RTTIDavid Majnemer2014-06-161-0/+121
| | | | | | | | | | | | | | | | | Summary: The RTTI scheme for x86_64 is largely the same as the one for i386. Differences are largely limited to avoiding load-time relocations by replacing pointers to RTTI metadata with the difference of that data relative to the load address of the module. Interestingly, this precludes the possibility of successfully using RTTI data from another DLL. The ImageBase reference is always relative to the current DLL. Differential Revision: http://reviews.llvm.org/D4148 llvm-svn: 211041
OpenPOWER on IntegriCloud