summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP] Fixed codegen for 'copyprivate' clause.Alexey Bataev2015-04-303-9/+10
| | | | | | Fixed initialization of 'single' region completion + changed type of the third argument of __kmpc_copyprivate() runtime function to size_t. llvm-svn: 236198
* Remove dead code: a MacroDirective can't be imported or ambiguous any more.Richard Smith2015-04-307-140/+14
| | | | llvm-svn: 236197
* Remove XFAIL now that this test passes (fixed by r236184).Richard Smith2015-04-301-1/+0
| | | | llvm-svn: 236194
* Fix use of uninitialized variable, found by ubsan selfhost.Richard Smith2015-04-301-1/+1
| | | | llvm-svn: 236191
* Use a more reliable method to determine whetherSean Callanan2015-04-301-2/+1
| | | | | | | | | a FileID corresponds to a real file or to a memory buffer. The old method didn't work when Clang was built Release, which meant it wasn't a very good method at all. llvm-svn: 236188
* Update clang/test/CodeGenCXX/copy-constructor-synthesis-2.cpp to pass for ↵NAKAMURA Takumi2015-04-291-3/+3
| | | | | | | | targeting i686. r236155 missed the suffix in "@llvm.memcpy.p0i8.p0i8.i32". llvm-svn: 236184
* Add an assert to get information on buildbot failure.Richard Smith2015-04-291-0/+1
| | | | llvm-svn: 236181
* Propagate a terrible hack to the sparc target feature handling codeEric Christopher2015-04-292-3/+9
| | | | | | | | | by erasing the soft-float target feature if the rest of the front end added it because of defaults or the soft float option. Add some testing for some of the targets that implement this hack. llvm-svn: 236179
* Fix unused variable warning.Richard Smith2015-04-291-1/+1
| | | | llvm-svn: 236178
* [modules] Stop trying to fake up a linear MacroDirective history.Richard Smith2015-04-2931-493/+309
| | | | | | | | | | | | | | Modules builds fundamentally have a non-linear macro history. In the interest of better source fidelity, represent the macro definition information faithfully: we have a linear macro directive history within each module, and at any point we have a unique "latest" local macro directive and a collection of visible imported directives. This also removes the attendent complexity of attempting to create a correct MacroDirective history (which we got wrong in the general case). No functionality change intended. llvm-svn: 236176
* XFAIL Hexagon until more codegen in place.Rick Foos2015-04-292-0/+2
| | | | | | | | | | | | | | | | | | Summary: Hexagon is being updated, but there is not enough to pass these tests. These sections are now on top of Colin's list. Test Plan: Ran changes on hexagon-build-03. Reviewers: colinl, rfoos Reviewed By: rfoos Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D9356 llvm-svn: 236173
* Revert r236128, LLVM isn't falling back in the right wayReid Kleckner2015-04-298-278/+153
| | | | llvm-svn: 236167
* [opaque pointer type] update for LLVM API changeDavid Blaikie2015-04-295-11/+10
| | | | llvm-svn: 236161
* Revert r236060, it caused PR23375.Nico Weber2015-04-291-1/+23
| | | | llvm-svn: 236159
* Stop assuming a 64-bit target here.Richard Smith2015-04-291-3/+3
| | | | llvm-svn: 236155
* PR23373: A defaulted union copy constructor that is not trivial must still beRichard Smith2015-04-296-36/+72
| | | | | | emitted as a memcpy. llvm-svn: 236142
* Revert r236063 due to regression with -fdelayed-template-parsing.Richard Smith2015-04-292-21/+0
| | | | llvm-svn: 236134
* Re-land r236052, the linker errors were fixed by LLVM r236123Reid Kleckner2015-04-298-153/+278
| | | | | | | Basic __finally blocks don't cause linker errors anymore (although they are miscompiled). llvm-svn: 236128
* Debug Info: Represent local anonymous unions as anonymous unionsAdrian Prantl2015-04-292-2/+27
| | | | | | | | | | | | | | | | and as artificial local variables in the debug info. This is a follow-up to r236059. We can't get rid of the local variables entirely because the gdb buildbot depends on them, but we can mark them as artificial while still emitting the correct debug info. As I learned from review comments other compilers also follow this model. A paired commit in LLVM temporarily relaxes the debug info verifier to not check the integrity of DW_OP_bit_pieces of artificial variables. rdar://problem/20730771 llvm-svn: 236125
* DebugInfo: Metadata constructs now start with DI*Duncan P. N. Exon Smith2015-04-29142-1053/+1052
| | | | | | | | | | LLVM r236120 renamed debug info IR constructs to use a `DI` prefix, now that the `DIDescriptor` hierarchy has been gone for about a week. This commit was generated using the rename-md-di-nodes.sh upgrade script attached to PR23080, followed by running clang-format-diff.py on the `lib/` portion of the patch. llvm-svn: 236121
* Revert "Debug Info: Represent local anonymous unions as anonymous unions"Adrian Prantl2015-04-292-18/+25
| | | | | | This reverts commit r236059 as it breaks the gdb buildbot. llvm-svn: 236110
* Revert code changes made under r235976.Bradley Smith2015-04-294-34/+0
| | | | | | | | This issue was fixed elsewhere in r235396 in a more general way, hence these changes no longer do anything. Keep the testcase however, to ensure that we don't regress this for ARM. llvm-svn: 236104
* clang-format: Add ability to align assignment operators.Daniel Jasper2015-04-296-332/+579
| | | | | | | | | | | | | | | | | | | | | | | | | In Objective-C some style guides use a style where assignment operators are aligned, in an effort to increase code readability. This patch adds an option to the format library which allows this functionality. It is disabled by default for all the included styles, so it must be explicitly enabled. The option will change code such as: - (void)method { NSNumber *one = @1; NSNumber *twentyFive = @25; } to: - (void)method { NSNumber *one = @1; NSNumber *twentyFive = @25; } Patch by Matt Oakes. Thank you! Accidentally reformatted all the tests... llvm-svn: 236100
* clang-format: Fix selective indentaiton in nested blocks.Daniel Jasper2015-04-292-1/+16
| | | | | | | | | | | | Buggy case: someFunction( [] { // comment int i; // invoke formatting here. }, // force line break aaa); llvm-svn: 236091
* [OPENMP] Fix crash on reductions codegen for short circuit reduction operations.Alexey Bataev2015-04-292-2/+8
| | | | llvm-svn: 236084
* Revert r236052, it caused linker errors when building 32-bit applications.Nico Weber2015-04-298-278/+153
| | | | llvm-svn: 236082
* Add -Wpessimizing-move and -Wredundant-move warnings.Richard Trieu2015-04-295-0/+396
| | | | | | | | | | | | | | | -Wpessimizing-move warns when a call to std::move would prevent copy elision if the argument was not wrapped in a call. This happens when moving a local variable in a return statement when the variable is the same type as the return type or using a move to create a new object from a temporary object. -Wredundant-move warns when an implicit move would already be made, so the std::move call is not needed, such as when moving a local variable in a return that is different from the return type. Differential Revision: http://reviews.llvm.org/D7633 llvm-svn: 236075
* PR20625: Instantiate static constexpr member function of a local struct in a ↵Richard Smith2015-04-292-0/+21
| | | | | | | | | | | | function template earlier. This is necessary in order to allow the use of a constexpr member function, or a member function with deduced return type, of a local class within a surrounding instantiated function template specialization. Patch by Michael Park! llvm-svn: 236063
* Stop emitting the soft-float and soft-float-abi target featuresEric Christopher2015-04-281-23/+1
| | | | | | | for ARM while the backend will only ignore them. No functional change intended. llvm-svn: 236060
* Debug Info: Represent local anonymous unions as anonymous unionsAdrian Prantl2015-04-282-25/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the debug info. This patch deletes a hack that emits the members of local anonymous unions as local variables. Besides being morally wrong, the existing representation using local variables breaks internal assumptions about the local variables' storage size. Compiling ``` void fn1() { union { int i; char c; }; i = c; } ``` with -g -O3 -verify will cause the verifier to fail after SROA splits the 32-bit storage for the "local variable" c into two pieces because the second piece is clearly outside the 8-bit range that is expected for a variable of type char. Given the choice I'd rather fix the debug representation than weaken the verifier. Debuggers generally already know how to deal with anonymous unions when they are members of C++ record types, but they may have problems finding the local anonymous struct members in the expression evaluator. rdar://problem/20730771 llvm-svn: 236059
* Fix Sema tests using __try by adding tripleReid Kleckner2015-04-283-5/+5
| | | | llvm-svn: 236057
* [SEH] Add 32-bit lowering code for __tryReid Kleckner2015-04-288-153/+278
| | | | | | | | | | | | | | | | | | | | This is just the clang-side of 32-bit SEH. LLVM still needs work, and it will determinstically fail to compile until it's feature complete. On x86, all outlined handlers have no parameters, but they do implicitly take the EBP value passed in and use it to address locals of the parent frame. We model this with llvm.frameaddress(1). This works (mostly), but __finally block inlining can break it. For now, we apply the 'noinline' attribute. If we really want to inline __finally blocks on 32-bit x86, we should teach the inliner how to untangle frameescape and framerecover. Promote the error diagnostic from codegen to sema. It now rejects SEH on non-Windows platforms. LLVM doesn't implement SEH on non-x86 Windows platforms, but there's nothing preventing it. llvm-svn: 236052
* Fix the typo in r236044. NFC.Steven Wu2015-04-281-1/+1
| | | | llvm-svn: 236051
* Fix -fno-gnu-inline-asm doesn't catch file scope asmSteven Wu2015-04-282-0/+5
| | | | | | | | | | | | | | | | | | Summary: FileScopeAsm should be treated the same as funcion level inline asm. -fno-gnu-inline-asm should trigger an error if file scope asm is used. I missed this case from r226340. This should not affect ms-extension because it is not allowed in the file scope. Reviewers: bob.wilson, rnk Reviewed By: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D9328 llvm-svn: 236044
* Fix assertion failure if a lambda array-capture is followed by a this capture.Richard Smith2015-04-283-13/+13
| | | | llvm-svn: 236043
* Attempt to fix the MSVC build by making ExprIteratorSean Callanan2015-04-281-2/+7
| | | | | | inherit correctly. llvm-svn: 236035
* Work around a suspected MSVC miscompile to try to bring the MSVC2013 ↵Richard Smith2015-04-281-0/+1
| | | | | | buildbot back. llvm-svn: 236034
* Refactor to make MacroState ownership and lifetime clearer.Richard Smith2015-04-283-6/+15
| | | | llvm-svn: 236032
* [cuda] Preserve TLS storage class of host variable even if it's aArtem Belevich2015-04-282-2/+20
| | | | | | device-side compilation. llvm-svn: 236029
* Implemented ASTImporter support for Stmts and fixedSean Callanan2015-04-286-31/+726
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | some bugs in the ASTImporter that this exposed: - When importing functions, the body (if any) was previously ignored. This patch ensures that the body is imported also. - When a function-local Decl is imported, the first thing the ASTImporter does is import its context (via ImportDeclParts()). This can trigger importing the Decl again as part of the body of the function (but only once, since the function's Decl has been added to ImportedDecls). This patch fixes that problem by extending ImportDeclParts() to return the imported Decl if it was imported as part of importing its context, and the patch adds ASTImporter::GetAlreadyImportedOrNull() to support this query. All callers of ImportDeclParts return the imported version of the Decl if ImportDeclParts() returns it. - When creating functions, InnerLocStart of the source function was re-used without importing. This is a straight up bug, and this patch makes ASTImporter import the InnerLocStart and use the imported version. - When importing FileIDs, the ASTImporter previously always tried to re-load the file for the corresponding CacheEntry from disk. This doesn't work if the CacheEntry corresponds to a named memory buffer. This patch changes the code so that if the UniqueID for the cache entry is invalid (i.e., it is not a disk file) the whole entry is treated as if it were invalid, which forces an in-memory copy of the buffer. Also added test cases, using the new support committed in 236011. llvm-svn: 236012
* Implemented support for testing the ASTImporter'sSean Callanan2015-04-282-1/+12
| | | | | | | | | ability to generate code that CodeGen likes. Test cases can use this functionality by calling // RUN: %clang_cc1 -emit-obj -o /dev/null -ast-merge %t.1.ast -ast-merge %t.2.ast %s llvm-svn: 236011
* Fix typo in comment.Nico Weber2015-04-281-1/+1
| | | | llvm-svn: 236010
* Fix PR22047: ObjC: Method unavailability attribute doesn't work with ↵Jonathan Roelofs2015-04-282-6/+25
| | | | | | | | overloaded methods http://reviews.llvm.org/D9261 llvm-svn: 236006
* Combine instantiation context of field initializer with context of class.Serge Pavlov2015-04-282-1/+20
| | | | | | | | | | | | | | Inclass initializer is instantiated in its own LocalInstantiationScope. It causes problems when instantiating local classes - when instantiation scope is searched for DeclContext of the field, the search fails. As a solution, the instantiation scope of field initializer is combined with its outer scope. This patch fixes PR23194. Differential Revision: http://reviews.llvm.org/D9258 llvm-svn: 236005
* Silencing a -Wuninitialized warning in a different way. This replaces ↵Aaron Ballman2015-04-281-22/+19
| | | | | | r235981, but is still NFC. llvm-svn: 236002
* AVX-512: added intrinsics for KNL and SKXElena Demikhovsky2015-04-289-0/+1944
| | | | | | by Asaf Badouh (asaf.badouh@intel.com) llvm-svn: 235986
* [OPENMP] Fix crash on loop control vars explicitly marked as private.Alexey Bataev2015-04-282-4/+7
| | | | | | It is allowed to mark loop control vars as private in 'private' or 'lastprivate' clause, so no need to assert here. llvm-svn: 235985
* Silencing a spurious -Wuninitialized warning with this local; NFC.Aaron Ballman2015-04-281-1/+1
| | | | llvm-svn: 235981
* [ARM/AArch64] Enforce alignment for bitfielded structsBradley Smith2015-04-285-0/+49
| | | | | | | | | When creating a global variable with a type of a struct with bitfields, we must forcibly set the alignment of the global from the RecordDecl. We must do this so that the proper bitfield alignment makes its way down to LLVM, since clang will mangle the bitfields into one large type. llvm-svn: 235976
* InstrProf: Match a bit less strictly - some targets may add signextJustin Bogner2015-04-281-2/+2
| | | | | | | | Notably, this bot didn't like it: http://lab.llvm.org:8011/builders/clang-cmake-mips/builds/5117 llvm-svn: 235968
OpenPOWER on IntegriCloud