summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* AMDGCN: Define cl_khr_fp64 when compiling OpenCL programsTom Stellard2015-02-271-0/+2
| | | | llvm-svn: 230761
* Silence an MSVC warning about not all control paths returning a value; NFC.Aaron Ballman2015-02-271-0/+1
| | | | llvm-svn: 230754
* clang-format: Make trailing commas in array inits force one per line.Daniel Jasper2015-02-271-2/+5
| | | | | | | | | | | | | Before: NSArray *array = @[ @"a", @"a", ]; After: NSArray *array = @[ @"a", @"a", ]; llvm-svn: 230741
* [OPENMP] Codegen for "#pragma omp atomic write"Alexey Bataev2015-02-273-187/+407
| | | | | | | | | | For global reg lvalue - use regular store through global register. For simple lvalue - use simple atomic store. For bitfields, vector element, extended vector elements - the original value of the whole storage (for vector elements) or of some aligned value (for bitfields) is atomically read, the part of this value for the given lvalue is modified and then use atomic compare-and-exchange operation to try to atomically write modified value (if it was not modified). Also, changes in this patch fix the bug for '#pragma omp atomic read' applied to extended vector elements. Differential Revision: http://reviews.llvm.org/D7369 llvm-svn: 230736
* [modules] Don't write out name lookup table entries merely because the moduleRichard Smith2015-02-271-10/+13
| | | | | | happened to query them; only write them out if something new was added. llvm-svn: 230727
* MS ABI: Simplify the code which performs base adjustmentsDavid Majnemer2015-02-271-19/+17
| | | | llvm-svn: 230722
* [modules] For an inheriting constructor, the inherited constructor is stored inRichard Smith2015-02-271-1/+2
| | | | | | | a map keyed off the canonical declaration. Don't try to set it if we're loading some non-canonical merged declaration. llvm-svn: 230716
* [modules] When loading in multiple canonical definitions of a template,Richard Smith2015-02-271-58/+43
| | | | | | | accumulate the set of specializations rather than overwriting one list with another. llvm-svn: 230712
* Don't crash on leaving nested __finally blocks through an EH edge.Nico Weber2015-02-261-19/+12
| | | | | | | | | | | | | | | The __finally emission block tries to be clever by removing unused continuation edges if there's an unconditional jump out of the __finally block. With exception edges, the EH continuation edge isn't always unused though and we'd crash in a few places. Just don't be clever. That makes the IR for __finally blocks a bit longer in some cases (hence small and behavior-preserving changes to existing tests), but it makes no difference in general and it fixes the last crash from PR22553. http://reviews.llvm.org/D7918 llvm-svn: 230697
* Wrap to 80 columns. No behavior change.Nico Weber2015-02-261-3/+4
| | | | llvm-svn: 230682
* Win64: Silently ignore __stdcall, __fastcall, and __thiscallReid Kleckner2015-02-262-6/+21
| | | | | | | | | | MSVC doesn't warn on this. Users are expected to apply the WINAPI macro to functions passed by pointer to the Win32 API, and this macro expands to __stdcall. This means we end up with a lot of useless noisy warnings about ignored calling conventions when compiling code with clang for Win64. llvm-svn: 230668
* Add support for generating MIPS legacy NaNPetar Jovanovic2015-02-262-4/+21
| | | | | | | | | | | Currently, the NaN values emitted for MIPS architectures do not cover non-IEEE754-2008 compliant case. This change fixes the issue. Patch by Vladimir Radosavljevic. Differential Revision: http://reviews.llvm.org/D7882 llvm-svn: 230653
* Patch to prevent crash when default argument expressionFariborz Jahanian2015-02-261-2/+5
| | | | | | | is null due to its previous bad declaration, etc. rdar://19871240 llvm-svn: 230649
* [msan] Change track-origins default mode from 1 to 2.Evgeniy Stepanov2015-02-261-1/+1
| | | | | | | | | | | Change -fsanitize-memory-track-origins to be equivalent to -fsanitize-memory-track-origins=2. Track-origins=2 provides a lot more detailed reports at the cost of some additional slowdown (ranging from none to, sometimes, 3x; ~3% average on SPEC2006). llvm-svn: 230644
* clang-format: Make braced list formatting more consistent.Daniel Jasper2015-02-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | Before: Aaaa aaaaaaaaaaa{ { a, // +1 indent weird. b, // trailing comma signals one per line. }, // trailing comma signals one per line. }; After: Aaaa aaaaaaaaaaa{ { a, // better!? b, // trailing comma signals one per line. }, // trailing comma signals one per line. }; Interesting that this apparently was entirely untested :-(. llvm-svn: 230627
* clang-format: Fix space of arrays of pointers to templated types.Daniel Jasper2015-02-261-1/+2
| | | | | | | | | | Before: vector<int>(*foo_)[6]; After: vector<int> (*foo_)[6]; llvm-svn: 230625
* [OPENMP] Fixed codegen for directives without function outlining.Alexey Bataev2015-02-264-87/+142
| | | | | | Fixed crash on codegen for directives like 'omp for', 'omp single' etc. inside of the 'omp parallel', 'omp task' etc. regions. llvm-svn: 230621
* clang-format: Allow breaking after "else if(" as a last resort.Daniel Jasper2015-02-261-2/+3
| | | | | | This isn't generally nice, but better than violating the column limit. llvm-svn: 230620
* [X86] Remove the blendps/blendpd builtins. They aren't used by the intrinsic ↵Craig Topper2015-02-261-3/+0
| | | | | | headers. We use appropriate shuffle vector instead. llvm-svn: 230616
* [X86] Correct immediate range checking for blendps/blendpd/blendpd256 builtins.Craig Topper2015-02-261-4/+4
| | | | llvm-svn: 230615
* [Mips] Handle -mips32r[3|5] / -mips64r[3|5] options while selecting ↵Simon Atanasyan2015-02-261-2/+5
| | | | | | | | | | | | lib/headers paths There is no supported toolchain which provides headers / libs / object files specific to the mips32r[3|5] and mips64r[3|5] ISA. So select "r2" specific folders when they are available. http://reviews.llvm.org/D7879 llvm-svn: 230611
* CGDebugInfo: Use DIImportedEntity default constructor, NFCDuncan P. N. Exon Smith2015-02-261-2/+2
| | | | | | | | | | | | | | | | Use the newly minted `DIImportedEntity` default constructor (r230609) rather than explicitly specifying `nullptr`. The latter will become ambiguous when the new debug info hierarchy is committed, since we'll have both of the following: explicit DIImportedEntity(const MDNode *); DIImportedEntity(const MDImportedEntity *); (Currently we just have the former.) A default constructor is just as clear. llvm-svn: 230610
* Update assumption in template diffing about integer template arguments.Richard Trieu2015-02-261-6/+14
| | | | | | | | | | Fix for PR22017. Integer template arguments are automatically bit extended to the size of the integer type. In template diffing, evaluated expressions were not having their results extending, leading to comparing two APSInt's with different widths. Apply the proper bit extending when evaluating template arguments. This mainly affected bool template arguments. llvm-svn: 230603
* Sema: __assume with side effects shouldn't result in invalid AST nodesDavid Majnemer2015-02-261-1/+1
| | | | | | | | We'd diagnose an __assume expression which contained a function call. This would result in us wrongly returning ExprError, causing mysterious failures later on. llvm-svn: 230597
* Silence unused variable warning in NDEBUG buildReid Kleckner2015-02-261-2/+2
| | | | llvm-svn: 230590
* Fix a [-Werror,-Wreorder] initialization ordering error.Eric Christopher2015-02-261-2/+2
| | | | llvm-svn: 230589
* Add -fuse-line-directive flag to control usage of #line with -EReid Kleckner2015-02-264-23/+25
| | | | | | | | | | | | | | | | | | Currently -fms-extensions controls this behavior, which doesn't make much sense. It means we can't identify what is and isn't a system header when compiling our own preprocessed output, because #line doesn't represent this information. If someone is feeding Clang's preprocessed output to another compiler, they can use this flag. Fixes PR20553. Reviewers: rsmith Differential Revision: http://reviews.llvm.org/D5217 llvm-svn: 230587
* Remove some unused includes of llvm/IR headers from parts of Clang that reallyRichard Smith2015-02-262-2/+0
| | | | | | shouldn't depend on LLVM IR. llvm-svn: 230586
* Improvement on sized deallocation from r230160:Larisse Voufo2015-02-252-14/+92
| | | | | | Do not declare sized deallocation functions dependently on whether it is found in global scope. Instead, enforce the branching in emitted code by (1) declaring the functions extern_weak and (2) emitting sized delete expressions as a branching between both forms delete. llvm-svn: 230580
* UBSan: Use the correct function prologue for x32.Peter Collingbourne2015-02-251-4/+15
| | | | llvm-svn: 230571
* MS ABI: Turn throw into std::terminate for now, make try/catch "work"David Majnemer2015-02-251-7/+19
| | | | | | | This lets us compile programs which make use of exceptional constructs statically without executing any of them dynamically. llvm-svn: 230568
* [modules] Even if we already have a definition of a class, loading in anotherRichard Smith2015-02-252-6/+12
| | | | | | | | one can give us more lookup results (due to implicit special members). Be sure to complete the redecl chain for every kind of DeclContext before performing a lookup into it, rather than only doing so for NamespaceDecls. llvm-svn: 230558
* Allow (Object *)kMyGlobalCFObj casts without bridgingBen Langmuir2015-02-251-6/+9
| | | | | | | | | | | | | | | | Previously we allowed these casts only for constants declared in system headers, which we assume are retain/release-neutral. Now also allow them for constants in user headers, treating them as +0. Practically, this means that we will now allow: id x = (id)kMyGlobalConst; But unlike with system headers we cannot mix them with +1 values: id y = (id)(b ? kMyGlobalConst : [Obj newValAtPlusOne]); // error id z = (id)(b ? kSystemGlobalConst: [Obj newValAtPlusOne]); // OK Thanks to John for suggesting this improvement. llvm-svn: 230534
* Reland (2x) r230314, "Fix codegen for virtual methods that are (re-) ↵Reid Kleckner2015-02-251-0/+4
| | | | | | | | exported from multiple modules." This reverts commits r230477 and r230478. llvm-svn: 230526
* Reland r230446, "MS ABI: Try to respect external AST source record layouts"Reid Kleckner2015-02-251-59/+129
| | | | | | | | | It broke test/PCH/headersearch.cpp because it was using -Wpadding, which only works for Itanium layout. Before this commit, we would use Itanium record layout when using PCH, which is crazy. Now that the test uses an explicit Itanium triple, we can reland. llvm-svn: 230525
* Sema: Parenthesized bound destructor member expressions can be calledDavid Majnemer2015-02-2519-102/+73
| | | | | | | | | We would wrongfully reject (a.~A)() in both the destructor and pseudo-destructor cases. This fixes PR22668. llvm-svn: 230512
* Reland r230460 with a test fix for -Asserts builds.Nico Weber2015-02-251-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Original CL description: Produce less broken basic block sequences for __finally blocks. The way cleanups (such as PerformSEHFinally) get emitted is that codegen generates some initialization code, then calls the cleanup's Emit() with the insertion point set to a good place, then the cleanup is supposed to emit its stuff, and then codegen might tack in a jump or similar to where the insertion point is after the cleanup. The PerformSEHFinally cleanup tries to just stash away the block it's supposed to codegen into, and then does codegen later, into that stashed block. However, after codegen'ing the __finally block, it used to set the insertion point to the finally's continuation block (where the __finally cleanup goes when its body is completed after regular, non-exceptional control flow). That's not correct, as that block can (and generally does) already ends in a jump. Instead, remember the insertion point that was current before the __finally got emitted, and restore that. Fixes two of the crashes in PR22553. llvm-svn: 230503
* Add support for inserting ArrayRef<FixItHint> into DiagnosticBuilder.Alexander Kornienko2015-02-251-8/+2
| | | | | | This is going to be needed in clang-tidy as more checks add complex fixits. llvm-svn: 230495
* Fix UTF8 chars to ASCII.NAKAMURA Takumi2015-02-252-4/+4
| | | | llvm-svn: 230479
* Whitespace.NAKAMURA Takumi2015-02-251-1/+1
| | | | llvm-svn: 230478
* Revert r230448, "Reland r230314 "Fix codegen for virtual methods that are ↵NAKAMURA Takumi2015-02-251-5/+1
| | | | | | (re-) exported from multiple modules."", since I have reverted r230446. llvm-svn: 230477
* Whitespace.NAKAMURA Takumi2015-02-251-8/+8
| | | | llvm-svn: 230475
* Revert r230446, "MS ABI: Try to respect external AST source record layouts"NAKAMURA Takumi2015-02-251-130/+60
| | | | | | It fails on Clang::PCH/headersearch.cpp for targeting msvc. llvm-svn: 230474
* clang-format: Fix spacing for function with ref-qualification ..Daniel Jasper2015-02-251-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. when using SpacesInCStyleCastParentheses != SpacesInParentheses. Before: FormatStyle Spaces = getLLVMStyle(); Deleted &operator=(const Deleted &)& = default; Spaces.SpacesInParentheses = true; Deleted(const Deleted &)& = default; Spaces.SpacesInCStyleCastParentheses = true; Spaces.SpacesInParentheses= false; Deleted( const Deleted & )& = default; After: FormatStyle Spaces = getLLVMStyle(); Deleted &operator=(const Deleted &)& = default;; Spaces.SpacesInParentheses= true; Deleted( const Deleted & )& = default; Spaces.SpacesInCStyleCastParentheses = true; Spaces.SpacesInParentheses= false; Deleted(const Deleted &)& = default; Patch by Jean-Philippe Dufraigne. Thank you! llvm-svn: 230473
* Revert "Produce less broken basic block sequences for __finally blocks."Daniel Jasper2015-02-251-4/+3
| | | | | | | | | The test is broken on buildbots: http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/2279/ This reverts commit adda738b6dc533c42db5f5f5b31344098a3aba7d. llvm-svn: 230472
* [OPENMP] Rename methods of OpenMPRuntime class. NFC. Alexey Bataev2015-02-257-218/+199
| | | | llvm-svn: 230470
* [Mips] Support mips-r6 path suffix for Adnroid MIPS toolchainSimon Atanasyan2015-02-251-0/+2
| | | | | | | This path suffix is used if user provides the -mips32r6 command line options. llvm-svn: 230469
* Restores r228382, which was reverted in r228406.Sameer Sahasrabuddhe2015-02-251-1/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The original commit failed to handle "shift assign" (<<=), which broke the test mentioned in r228406. This is now fixed and the test added to the lit tests under SemaOpenCL. *** Original commit message from r228382 *** OpenCL: handle shift operator with vector operands Introduce a number of checks: 1. If LHS is a scalar, then RHS cannot be a vector. 2. Operands must be of integer type. 3. If both are vectors, then the number of elements must match. Relax the requirement for "usual arithmetic conversions": When LHS is a vector, a scalar RHS can simply be expanded into a vector; OpenCL does not require that its rank be lower than the LHS. For example, the following code is not an error even if the implicit type of the constant literal is "int". char2 foo(char2 v) { return v << 1; } Consolidate existing tests under CodeGenOpenCL, and add more tests under SemaOpenCL. llvm-svn: 230464
* Produce less broken basic block sequences for __finally blocks.Nico Weber2015-02-251-3/+4
| | | | | | | | | | | | | | | | | | | | | The way cleanups (such as PerformSEHFinally) get emitted is that codegen generates some initialization code, then calls the cleanup's Emit() with the insertion point set to a good place, then the cleanup is supposed to emit its stuff, and then codegen might tack in a jump or similar to where the insertion point is after the cleanup. The PerformSEHFinally cleanup tries to just stash away the block it's supposed to codegen into, and then does codegen later, into that stashed block. However, after codegen'ing the __finally block, it used to set the insertion point to the finally's continuation block (where the __finally cleanup goes when its body is completed after regular, non-exceptional control flow). That's not correct, as that block can (and generally does) already ends in a jump. Instead, remember the insertion point that was current before the __finally got emitted, and restore that. Fixes two of the crashes in PR22553. llvm-svn: 230460
* Add comments for two CleanupKinds.Nico Weber2015-02-251-0/+6
| | | | llvm-svn: 230459
OpenPOWER on IntegriCloud