summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [Objective-C modern translation]. Patch to fix type ofFariborz Jahanian2015-04-095-119/+119
| | | | | | | objc_msgSend's first argument to "Class" because objc_getClass is passed. rdar://20477025 llvm-svn: 234520
* Added flag to disable isel instruction on PPC target. Using regular branches ↵Olivier Sallenave2015-04-092-0/+8
| | | | | | instead of isel is more efficient in some cases. llvm-svn: 234509
* [CodeGen] When promoting a reference temporary to a global use the inner ↵Benjamin Kramer2015-04-092-3/+25
| | | | | | | | | type to fold it. The MaterializeTemporaryExpr can have a different type than the inner expression, miscompiling the constant. PR23165. llvm-svn: 234499
* Process the -freciprocal-math optimization flag (PR20912)Sanjay Patel2015-04-097-2/+29
| | | | | | | | | | | | | | | | | | | | | | | The driver currently accepts but ignores the -freciprocal-math flag. This patch passes the flag through and enables 'arcp' fast-math-flag generation in IR. Note that this change does not actually enable the optimization for any target. The reassociation optimization that this flag specifies was implemented by http://reviews.llvm.org/D6334 : http://llvm.org/viewvc/llvm-project?view=revision&revision=222510 Because the optimization is done in the backend rather than IR, the backend must be modified to understand instruction-level fast-math-flags or a new function-level attribute must be created. Also note that -freciprocal-math is independent of any target-specific usage of reciprocal estimate hardware instructions. That requires its own flag ('-mrecip'). https://llvm.org/bugs/show_bug.cgi?id=20912 llvm-svn: 234493
* [ARM] add support for Cortex-R4/R4FJaved Absar2015-04-095-5/+31
| | | | | | | | Adds ARM Cortex-R4 and R4F support and tests in Clang. Though Cortex-R4 support was present, the support for hwdiv in thumb-mode was not defined or tested properly. This has also been added. llvm-svn: 234488
* clang-cl: Support the /fp options (PR23112)Hans Wennborg2015-04-082-2/+23
| | | | | | | | | | | This hooks up the /fp options as aliases for -f[no-]fast-math and -f[no]-trapping-math. It probably doesn't match cl.exe's behaviour completely (e.g. LLVM is currently never as precise as /fp:precise), but it's close enough. Differential revision: http://reviews.llvm.org/D8909 llvm-svn: 234449
* [WinEH] Don't wrap cleanups in terminate actionsReid Kleckner2015-04-082-4/+34
| | | | | | | | _CxxFrameHandler3 calls terminate if a cleanup action throws, regardless of what bits you put in the xdata tables. There's no need to model this in the IR, since we just have to take it out later. llvm-svn: 234448
* Reland "[SEH] Implement filter capturing in CodeGen"Reid Kleckner2015-04-084-20/+213
| | | | | | | | | | | The test should be fixed. It was failing in NDEBUG builds due to a missing '*' character in a regex. In asserts builds, the pattern matched a single digit value, which became a double digit value in NDEBUG builds. Go figure. This reverts commit r234261. llvm-svn: 234447
* [Objective-C Sema] Use canonical type of properties when comparing Fariborz Jahanian2015-04-082-3/+20
| | | | | | | redeclaration of property in class extension and to avoid bogus error. rdar://20469452 llvm-svn: 234440
* Remove redundant virtual on member functions marked 'override'.David Blaikie2015-04-081-1/+1
| | | | llvm-svn: 234417
* [OPENMP] Allow redeclaration of variables as threadprivate.Alexey Bataev2015-04-084-34/+36
| | | | | | No need to emit an error message if the variable is redeclared as threadprivate. llvm-svn: 234402
* Appease build bots that cannot find a viable conversion through CanQualType.Aaron Ballman2015-04-081-1/+2
| | | | llvm-svn: 234376
* Generate a diagnostic when a catch handler cannot execute due to class ↵Aaron Ballman2015-04-087-66/+239
| | | | | | hierarchy inversion with regards to other catch handlers for the same block. llvm-svn: 234375
* Use the most recent previous decl to check if inline is added after a definitionReid Kleckner2015-04-082-1/+18
| | | | | | | | | | | | | | | | | | | | | | | This affects this test case: void foo(); template <typename T> class C { friend inline void foo(); }; inline void foo() {} C<int> c; Here, we instantiate the foo friend decl and add it to foo's redecl chain. However, our previous decl pointer happens to reference the first declaration of foo, which is not marked inline. When we check to see if foo was already defined, we implicitly search all previous decls. We should do the same for the inline check, instead of just checking this particular previous decl. Reviewers: rsmith Differential Revision: http://reviews.llvm.org/D8872 llvm-svn: 234374
* [Sema] Correctly recurse when looking for [*] in function definitionsDavid Majnemer2015-04-072-9/+31
| | | | | | | | | | A [*] is only allowed in a declaration for a function, not in its definition. We didn't correctly recurse while looking for it, causing us to crash in CodeGen instead of rejecting it. This fixes PR23151. llvm-svn: 234363
* Revert "Mark instantiated function decls as inline specified if any pattern is"Reid Kleckner2015-04-072-48/+5
| | | | | | | | | | | | | | | | | | | It breaks down on this test case: void foo(); template <typename T> class C { friend void foo(); }; inline void foo() {} C<int> c; We shouldn't be marking the instantiation of the friend decl of foo as inline-specified. It may be possible to fix this by determining if the full definition is part of the current template, but it seems better to rever tot green until we come up with a full solution. This reverts commit r233817, as well as follow-ups r233820 and r233821. llvm-svn: 234355
* Revert "Fix a compiler error under MSVC"Duncan P. N. Exon Smith2015-04-071-1/+1
| | | | | | | This reverts the bandaid commit in r234308 now that I have a proper fix in LLVM as of r234326. llvm-svn: 234339
* fix typo; NFCSanjay Patel2015-04-071-1/+1
| | | | llvm-svn: 234338
* [Objective-C Sema] Patch to not issue unavailbility/deprecatedFariborz Jahanian2015-04-072-1/+26
| | | | | | | | warning when multiple method declarations are found in global pool with differing types and some are available. rdar://20408445 llvm-svn: 234328
* DebugInfo: LLVM API change in r234326 for array-like tuple wrappersDuncan P. N. Exon Smith2015-04-071-9/+7
| | | | | | | | | Update a few calls to `DIBuilder` now that `MDTuple` array-wrappers don't have implicit conversions to `MDTuple*`. I may circle back and update `DIBuilder` to take arrays here, to make it easier for the callers. llvm-svn: 234327
* clang-format: Fix regression formatting QT's "signals:" from r234318.Daniel Jasper2015-04-074-3/+18
| | | | llvm-svn: 234320
* clang-format: Don't allow labels when expecting declarations.Daniel Jasper2015-04-072-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | This fixes formatting unnamed bitfields (llvm.org/PR21999). Before: struct MyStruct { uchar data; uchar: 8; uchar: 8; uchar other; }; After: struct MyStruct { uchar data; uchar : 8; uchar : 8; uchar other; }; llvm-svn: 234318
* Fix a compiler error under MSVCTimur Iskhodzhanov2015-04-071-1/+1
| | | | | | | | | Error message was: CGDebugInfo.cpp(1047) : error C2666: 'llvm::MDTypeRefArray::operator []' : 2 overloads have similar conversions DebugInfoMetadata.h(106): could be 'llvm::MDTypeRef llvm::MDTypeRefArray::operator [](unsigned int) const' while trying to match the argument list '(llvm::DITypeArray, int)' llvm-svn: 234308
* Revert "[SEH] Implement filter capturing in CodeGen"Daniel Jasper2015-04-074-214/+20
| | | | | | | Test fails: http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/3182/ llvm-svn: 234306
* clang-format: Improve nested block formatting.Daniel Jasper2015-04-073-34/+37
| | | | | | | | | | | | | | | | | | Before: functionA(functionB({ int i; int j; }), aaaa, bbbb, cccc); After: functionA(functionB({ int i; int j; }), aaaa, bbbb, cccc); llvm-svn: 234304
* clang-format: Indent relative to the ./-> and not the function name.Daniel Jasper2015-04-073-4/+4
| | | | | | | | | | | | | | | | | | Before: aaaaaaaaaaa // .aaaa( // bbbb) // This is different .. .aaaa( // cccc); // .. from this. After: aaaaaaaaaaa // .aaaa( // bbbb) // This is identical .. .aaaa( // cccc); // .. to this. llvm-svn: 234300
* [Sema] Don't crash when __attribute__((nonnull)) is applied to blocksDavid Majnemer2015-04-072-2/+9
| | | | | | | | | A simple case of asserting isFunctionOrMethod when we should have asserted isFunctionOrMethodOrBlock. This fixes PR23117. llvm-svn: 234297
* DebugInfo: Update for LLVM change in r234290Duncan P. N. Exon Smith2015-04-071-4/+4
| | | | | | The API for `DIArray` changed; use the new one. llvm-svn: 234291
* [Sema] Don't permit dependent alignments on non-dependent typedef-namesDavid Majnemer2015-04-073-0/+25
| | | | | | | | | | | | | | | | | A dependent alignment attribute (like __attribute__((aligned(...))) or __declspec(align(...))) on a non-dependent typedef or using declaration poses a considerable challenge: the type is _not_ dependent, the size _may_ be dependent if the type is used as an array type, the alignment _is_ dependent. It is reasonable for a compiler to be able to query the size and alignment of a complete type. Let's help that become an invariant. This fixes PR22042. Differential Revision: http://reviews.llvm.org/D8693 llvm-svn: 234280
* Report an error when -m<os>-version-min= does not specify a version.Bob Wilson2015-04-072-1/+4
| | | | | | | | | Currently if you use -mmacosx-version-min or -mios-version-min without specifying a version number, clang silently sets the minimum version to "0.0.0". This is almost certainly not what was intended, so it is better to report it as an error. rdar://problem/20433945 llvm-svn: 234270
* [WinEH] Don't create an alloca for unnamed catch parametersReid Kleckner2015-04-073-2/+16
| | | | | | | | The catch object parameter to llvm.eh.begincatch is optional, and can be null. We can save some ourselves the stack space, copy ctor, and dtor calls if we pass null. llvm-svn: 234264
* [SEH] Implement filter capturing in CodeGenReid Kleckner2015-04-064-20/+214
| | | | | | | | | | | | | | | While capturing filters aren't very common, we'd like to outline __finally blocks in the frontend to simplify -O0 EH preparation and reduce code size. Finally blocks are usually have captures, and this is the first step towards that. Currently we don't support capturing 'this' or VLAs. Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D8825 llvm-svn: 234261
* CGDebugInfo: Stop using DIDescriptor::is*() and auto-castingDuncan P. N. Exon Smith2015-04-061-41/+45
| | | | | | | The clang edition of r234255: use built-in `isa<>`, `dyn_cast<>`, etc., and only build `DIDescriptor`s from pointers that are correctly typed. llvm-svn: 234256
* DebugInfo: Use DILexicalBlockFile::getContext() over getScope()Duncan P. N. Exon Smith2015-04-061-1/+1
| | | | | | | | `getScope()` passes the scope back through a `DILexicalBlock` even though the underlying pointer may be an incompatible `MDSubprogram`. Just use `getContext()` directly. llvm-svn: 234245
* Fix a call to std::unique to actually discard the trailing (junk) elements.James Dennett2015-04-061-1/+2
| | | | | | Found by inspection. (No other instances of this problem were found.) llvm-svn: 234221
* MSan told me that we actually dump the entire scratch buffer into PCH files, ↵Benjamin Kramer2015-04-061-3/+4
| | | | | | | | | | | initialize it. Writing 4k of zeros is preferrable to 4k of random memory. Document that. While there remove the initialization of the first byte of the buffer and start at index zero. It was writing a literal '0' instead of a null byte at the beginning anyways, which didn't matter since we never read it. llvm-svn: 234202
* Prefer uninitialized memory for scratch space.Benjamin Kramer2015-04-062-3/+3
| | | | | | No functional change intended. llvm-svn: 234184
* [Objective-C patch] Patch to fix a crash in IRGen because Fariborz Jahanian2015-04-062-1/+30
| | | | | | | | of incorrect AST when a compound literal of Objective-C property access is used to initialize a vertor of floats. rdar://20407999 llvm-svn: 234176
* Fix this test so it doesn't try to open a file to write to the source treeDavid Blaikie2015-04-061-1/+1
| | | | llvm-svn: 234173
* Gating clang-fuzzer on the same conditions required to build the LLVMFuzzer ↵Aaron Ballman2015-04-061-16/+18
| | | | | | library. Otherwise, we can run into a situation where clang-fuzzer attempts to build, but its dependency was never built. llvm-svn: 234170
* HasSideEffects() should return false for calls to pure and const functions.Michael Kuperstein2015-04-063-4/+43
| | | | | | Differential Revision: http://reviews.llvm.org/D8548 llvm-svn: 234152
* Update our list of distros a bit.Benjamin Kramer2015-04-061-6/+15
| | | | | | | | - Debian jessie will be released this month, add the next testing version to the list. - RHEL7 was released last june. - Ubuntu utopic was released last october, vivid will follow later this month. llvm-svn: 234149
* clang/test/Profile/profile-does-not-exist.c: Avoid checking a message line ↵NAKAMURA Takumi2015-04-061-1/+1
| | | | | | in the message catalog. llvm-svn: 234146
* This reverts commit r234104, bringing back 233393 now that ARM is fixed.Rafael Espindola2015-04-062-3/+16
| | | | | | | | | | | Original message: Don't use unique section names by default if using the integrated as. This saves some IO and ccache space by not creating long section names. It should work with every ELF linker. llvm-svn: 234143
* Don't crash when passing a non-existent file to -fprofile-instr-use=.Nico Weber2015-04-062-2/+6
| | | | | | Fixes a regression from r229434. llvm-svn: 234141
* clang-format my last commitDavid Blaikie2015-04-0511-81/+97
| | | | | | (sorry, keep forgetting that) llvm-svn: 234129
* [opaque pointer type] More GEP API migrationsDavid Blaikie2015-04-0520-170/+189
| | | | | | | Looks like the VTable code in particular will need some work to pass around the pointee type explicitly. llvm-svn: 234128
* Replace copy loop with std::copy.Benjamin Kramer2015-04-051-2/+1
| | | | | | No functional change intended. llvm-svn: 234123
* Switch test from wchar_t to char32_tDavid Majnemer2015-04-051-2/+2
| | | | | | | Windows has a 16-bit wchar_t, most Unix platforms have a 32-bit wchar_t. Use a char32_t to keep the test's output stable. llvm-svn: 234111
* [AST] String literal operator templates have two template args, not oneDavid Majnemer2015-04-052-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | StmtPrinter assumed that the first template arg was the pack and attempted to iterate it. However, the GNU extension (which is really just N3599), has two template arguments. In this case, the second argument is the pack containing the string contents. Handle this by desugaring the call to the explicit operator. For example: "qux" _zombocom will be shown as operator "" _zombocom<char, 'q', 'u', 'x'>() in diagnostics and AST dumps. N.B. It is actually impossible to render the arguments back to the source form without storing more information in the AST. For example, we cannot tell if the user wrote u8"qux" or "qux". We also lose fidelity when it comes to non-char types for this exact reason (e.g. it is hard to render a list of wchar_t back to something that can be printed to the screen even if you don't have to consider surrogate pairs). This fixes PR23120. llvm-svn: 234110
OpenPOWER on IntegriCloud