summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Rename ANDROIDEABI to Android.Logan Chien2012-09-021-1/+2
| | | | | | | | | | | | | Most of the code guarded with ANDROIDEABI are not ARM-specific, and having no relation with arm-eabi. Thus, it will be more natural to call this environment "Android" instead of "ANDROIDEABI". Note: We are not using ANDROID because several projects are using "-DANDROID" as the conditional compilation flag. llvm-svn: 163088
* Implemented parsing and AST support for the MS __leave exception statement. ↵Joao Matos2012-09-021-0/+1
| | | | | | Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review. llvm-svn: 163083
* Normalize line endings of r163013 (part 2).Joao Matos2012-08-311-7/+7
| | | | llvm-svn: 163032
* Improved MSVC __interface support by adding first class support for it, ↵Joao Matos2012-08-311-7/+7
| | | | | | instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins. llvm-svn: 163013
* Change the representation of builtin functions in the ASTEli Friedman2012-08-315-2/+12
| | | | | | | | | (__builtin_* etc.) so that it isn't possible to take their address. Specifically, introduce a new type to represent a reference to a builtin function, and a new cast kind to convert it to a function pointer in the operand of a call. Fixes PR13195. llvm-svn: 162962
* Make alignment computation for pointer values for builtins handleEli Friedman2012-08-291-1/+2
| | | | | | non-pointer types with a pointer representation correctly. PR13660. llvm-svn: 162862
* [ms-inline asm] Have MSAsmStmts use the generic EmitAsmStmt codegen function.Chad Rosier2012-08-282-41/+6
| | | | llvm-svn: 162796
* CUDA: give correct address space to globals declared in functionsPeter Collingbourne2012-08-281-1/+3
| | | | llvm-svn: 162787
* [ms-inline asm] Rename EmitGCCAsmStmt to EmitAsmStmt and have it accept Chad Rosier2012-08-282-6/+8
| | | | | | | | AsmStmts. This function is only used by GCCAsmStmts, however. Constraints need to be properly computed before MSAsmStmts can use EmitAsmStmt. No functional change intended. llvm-svn: 162776
* Fix PR13704Michael Liao2012-08-281-1/+1
| | | | | | | - The increment needs to be signed value to preserve the original value when its data type is larger than 64-bit integer. llvm-svn: 162766
* [ms-inline asm] Add virtual function, getClobber, that returns a StringRef.Chad Rosier2012-08-271-1/+1
| | | | | | More work towards unifying asm stmt codegen. llvm-svn: 162712
* [ms-inline asm] Rename getClobber to getClobberStringLiteral. No functionalChad Rosier2012-08-271-1/+1
| | | | | | change intended. llvm-svn: 162710
* CodeGen: Hoist check from recursive function to its only callsite.Benjamin Kramer2012-08-271-4/+4
| | | | | | Suggested by Roman Divacky. llvm-svn: 162702
* CodeGen: When emitting stores for an initializer, only emit a GEP if we ↵Benjamin Kramer2012-08-271-7/+10
| | | | | | | | really need the store. This avoids emitting many dead GEPs for large zero-initialized arrays. llvm-svn: 162701
* [ms-inline asm] Rename GenerateAsmString to generateAsmString to conform withChad Rosier2012-08-271-1/+1
| | | | | | | coding standards. Also, add stub for MSAsmStmt class as part of unifying codegen logic for AsmStmts. llvm-svn: 162696
* Fix a CodeGen bug where we would skip zero-initialization forEli Friedman2012-08-251-4/+1
| | | | | | array new with a non-trivial constructor. Pointed out in PR13380. llvm-svn: 162643
* Remove spurious string literal for bool argument.Richard Smith2012-08-251-1/+1
| | | | llvm-svn: 162642
* -fcatch-undefined-behavior: add the -ftrapv checks to the set of things caughtRichard Smith2012-08-251-18/+49
| | | | | | | | | | | | | | | | by this mode, and also check for signed left shift overflow. The rules for the latter are a little subtle: * neither C89 nor C++98 specify the behavior of a signed left shift at all * in C99 and C11, shifting a 1 bit into the sign bit has undefined behavior * in C++11, with core issue 1457, shifting a 1 bit *out* of the sign bit has undefined behavior As of this change, we use the C99 rules for all C language variants, and the C++11 rules for all C++ language variants. Once we have individual -fcatch-undefined-behavior= flags, this should be revisited. llvm-svn: 162634
* [ms-inline asm] As part of a larger refactoring, rename AsmStmt to GCCAsmStmt.Chad Rosier2012-08-252-4/+4
| | | | | | No functional change intended. llvm-svn: 162632
* Fix integer unsigned behavior in clang due to signed left shift overflow.Richard Smith2012-08-241-1/+1
| | | | llvm-svn: 162626
* [ms-inline asm] Change the -fenable-experimental-ms-inline-asm option from a Chad Rosier2012-08-241-4/+0
| | | | | | | | | CodeGen option to a LangOpt option. In turn, hoist the guard into the parser so that we avoid the new (and fairly unstable) Sema/AST/CodeGen logic. This should restore the behavior of clang to that prior to r158325. <rdar://problem/12163681> llvm-svn: 162602
* Fix 80-column violation.Chad Rosier2012-08-241-1/+2
| | | | llvm-svn: 162575
* [ms-inline asm] Refactor code. No functional change intended.Chad Rosier2012-08-241-17/+2
| | | | llvm-svn: 162568
* Push ArrayRef through the Expr hierarchy.Benjamin Kramer2012-08-242-6/+6
| | | | | | No functionality change. llvm-svn: 162552
* New -fcatch-undefined-behavior features:Richard Smith2012-08-245-29/+103
| | | | | | | | * when checking that a pointer or reference refers to appropriate storage for a type, also check the alignment and perform a null check * check that references are bound to appropriate storage * check that 'this' has appropriate storage in member accesses and member function calls llvm-svn: 162523
* Fix a few -Wdocumentation warnings.Dmitri Gribenko2012-08-241-1/+0
| | | | llvm-svn: 162506
* [ms-inline asm] Remove an unused argument. This logic can now be reused by theChad Rosier2012-08-232-10/+7
| | | | | | ms-style inline asms. llvm-svn: 162463
* Fix a bunch of -Wdocumentation warnings.Dmitri Gribenko2012-08-231-3/+2
| | | | llvm-svn: 162452
* Fix transposed optional / required in Objective-C metadata (GNUstep runtime)David Chisnall2012-08-231-8/+8
| | | | | | Patch by Niels Grewe! llvm-svn: 162441
* Attempt to fix clang bootstrap (broken by r162425).Eli Friedman2012-08-231-2/+22
| | | | llvm-svn: 162440
* Use the alignment from lvalue emission to more accurately compute the alignmentEli Friedman2012-08-232-95/+147
| | | | | | | of a pointer for builtin emission, instead of just depending on the type of the pointee. <rdar://problem/11314941>. llvm-svn: 162425
* [ms-inline asm] Start sending non-simple inline asms to the AsmParser.Chad Rosier2012-08-221-2/+0
| | | | | | | The parser still can't handle all cases, so fall back to emitting a simple MSAsmStmt if we get into trouble. llvm-svn: 162382
* Reduce duplicated hash map lookups.Benjamin Kramer2012-08-222-14/+6
| | | | llvm-svn: 162361
* [driver] Add support for the --param ssp-buffer-size= driver option.Chad Rosier2012-08-211-0/+1
| | | | | | PR9673 llvm-svn: 162285
* [asan] If we are compiling with ASan, add metadata indicating dynamically ↵Kostya Serebryany2012-08-211-0/+12
| | | | | | initialized globals. Patch by Reid Watson, reviewed by Richard Smith llvm-svn: 162259
* When performing a trivial copy of a C++ type, we must be careful notJohn McCall2012-08-211-2/+2
| | | | | | | | | | | to overwrite objects that might have been allocated into the type's tail padding. This patch is missing some potential optimizations where the destination is provably a complete object, but it's necessary for correctness. Patch by Jonathan Sauer. llvm-svn: 162254
* Screw around with ObjCRuntime some more, changing theJohn McCall2012-08-212-8/+43
| | | | | | | | diagnostics for bad deployment targets and adding a few more predicates. Includes a patch by Jonathan Schleifer to enable ARC for ObjFW. llvm-svn: 162252
* Fix a pair of bugs relating to properties in ARC.John McCall2012-08-201-1/+10
| | | | | | | | | | | | | | | | | | | | First, when synthesizing an explicitly strong/retain/copy property of Class type, don't pretend during compatibility checking that the property is actually assign. Instead, resolve incompatibilities by secretly changing the type of *implicitly* __unsafe_unretained Class ivars to be strong. This is moderately evil but better than what we were doing. Second, when synthesizing the setter for a strong property of non-retainable type, be sure to use objc_setProperty. This is possible when the property is decorated with the NSObject attribute. This is an ugly, ugly corner of the language, and we probably ought to deprecate it. The first is rdar://problem/12039404; the second was noticed by inspection while fixing the first. llvm-svn: 162244
* Reapply:Eric Christopher2012-08-202-14/+31
| | | | | | | | | | | | | | | Author: Eric Christopher <echristo@apple.com> Date: Thu Aug 16 23:50:46 2012 +0000 Add some caching here for the builtin types. rdar://12117935 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162066 91177308-0d34-0410-b5e6-96231b3b80d8 after fixing a thinko. llvm-svn: 162243
* Reapply:Eric Christopher2012-08-171-6/+8
| | | | | | | | Make isa part of objc_object at metadata generation time. Noticed on inspection. llvm-svn: 162145
* Temporarily revert r162066 and r162062 to see if it brings the gdbEric Christopher2012-08-172-32/+15
| | | | | | bots back. llvm-svn: 162080
* Fix undefined behavior in debug info emission: operator* on WeakVH returns aRichard Smith2012-08-171-17/+24
| | | | | | | | reference, so &* on an empty WeakVH binds a reference to a dereferenced null pointer. So don't do that; we have a perfectly good implicit conversion to Value*. llvm-svn: 162079
* Add some caching here for the builtin types.Eric Christopher2012-08-162-15/+30
| | | | | | rdar://12117935 llvm-svn: 162066
* Make isa part of objc_object at metadata generation time.Eric Christopher2012-08-161-6/+8
| | | | | | Noticed on inspection. llvm-svn: 162062
* Convert loads and stores of vec3 to vec4 to achieve better code generation. ↵Tanya Lattner2012-08-161-0/+80
| | | | | | Add test case. llvm-svn: 162002
* Devirtualize calls on glvalues produced by class member access expressions.Richard Smith2012-08-151-1/+8
| | | | | | Based on a patch by Yin Ma! llvm-svn: 161998
* Fix for PR#13606: http://llvm.org/bugs/show_bug.cgi?id=13606John Criswell2012-08-151-1/+1
| | | | | | | Changed the alignment of an LValue to be 64 bits so that we can handle alignment values up to half of a 64-bit address space. llvm-svn: 161971
* [ms-inline asm] Add support for clobbers in CodeGen.Chad Rosier2012-08-151-1/+23
| | | | | | | This is a reapplication of r161914 now that the scoping issue has been resolved in r161966. llvm-svn: 161967
* Revert this to try to bring the i386 bots back.Eric Christopher2012-08-151-23/+1
| | | | llvm-svn: 161931
* [ms-inline asm] Add support for clobbers in CodeGen.Chad Rosier2012-08-151-1/+23
| | | | llvm-svn: 161914
OpenPOWER on IntegriCloud