summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Minor cleanup. No change otherwise.Fariborz Jahanian2010-11-191-2/+4
| | | | llvm-svn: 119814
* Fix a bug where write-barriers for assignment through referenceFariborz Jahanian2010-11-181-1/+1
| | | | | | | types was not being generated for objc pointers. // rdar://8681766. llvm-svn: 119751
* Refactoring of Diagnostic class.Argyrios Kyrtzidis2010-11-183-8/+5
| | | | | | | | | | | -Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class. -DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units. -The rest of the state in Diagnostic object is considered related and tied to one translation unit. -Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a SourceLocation instead of a FullSourceLoc. -Reflect the changes to various interfaces. llvm-svn: 119730
* Calculate the value kind of an expression when it's created andJohn McCall2010-11-182-18/+18
| | | | | | | | | | | | | store it on the expression node. Also store an "object kind", which distinguishes ordinary "addressed" l-values (like variable references and pointer dereferences) and bitfield, @property, and vector-component l-values. Currently we're not using these for much, but I aim to switch pretty much everything calculating l-valueness over to them. For now they shouldn't necessarily be trusted. llvm-svn: 119685
* comparison of AltiVec vectors now gives bool result (fix for 7533)Anton Yartsev2010-11-181-0/+108
| | | | llvm-svn: 119678
* When forming the !srcloc mdnode for an inline asm, add the SourceLocations Chris Lattner2010-11-171-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of all the lines of the inline asm. With the refactoring and enhancement of the backend, we can now reports errors on the correct source line when an asm contains multiple lines of text. For something like this: void foo() { asm("push %rax\n" ".code32\n"); } we used to get this: (note that the line 4 in t.c isn't helpful) t.c:4:7: error: warning: ignoring directive for now asm("push %rax\n" ^ <inline asm>:2:1: note: instantiated into assembly here .code32 ^ now we get: t.c:5:8: error: warning: ignoring directive for now ".code32\n" ^ <inline asm>:2:1: note: instantiated into assembly here .code32 ^ Note that we're pointing to line 5 properly now. This implements rdar://7839391 - inline asm errors should point to the right line in the asm and makes the error message in PR8595 much less confusing. llvm-svn: 119489
* adjust for llvm mainline, yay type safetyChris Lattner2010-11-171-3/+3
| | | | llvm-svn: 119487
* factor some code out to a helper function, no functionality change.Chris Lattner2010-11-171-4/+10
| | | | llvm-svn: 119464
* Fixes synthesis of type for the object which holds info.Fariborz Jahanian2010-11-172-4/+4
| | | | | | about a __block cxx object. llvm-svn: 119411
* Reset the lifetime-managed flag between emission of the agg conditionalJohn McCall2010-11-172-4/+10
| | | | | | branches. Fixes PR8623. llvm-svn: 119408
* Support compound complex operations as l-values in C++. Add a testJohn McCall2010-11-163-5/+39
| | | | | | | case based on CodeGen/volatile-1.c which tests the current C++ semantics, and note the many, many places we fall short of them. llvm-svn: 119402
* Implements __block API for c++ objects. There is stillFariborz Jahanian2010-11-162-10/+43
| | | | | | | issue with runtime which I am discussing it with Blaine. This is wip (so no test yet). llvm-svn: 119368
* Simplify some complex emission and implement correct semantics forJohn McCall2010-11-164-79/+104
| | | | | | | | | assignment to volatiles in C. This in effect reverts some of mjs's work in and around r72572. Basically, the C++ standard is quite clear, except that it lies about volatile behavior approximating C's, whereas the C standard is almost actively misleading. llvm-svn: 119344
* Now that we have reliable cast kinds, simplify scalar cast IR gen.John McCall2010-11-161-36/+3
| | | | llvm-svn: 119332
* Kill CK_Unknown and flesh out the documentation for the existing CastKinds.John McCall2010-11-163-8/+0
| | | | llvm-svn: 119331
* Teach complex compound assignment IR-generation that the RHS ofJohn McCall2010-11-161-3/+7
| | | | | | a compound assignment is always already in the computation type. llvm-svn: 119330
* Change CXXNameMangler::mangleNeonVectorType to require the vector type to beBob Wilson2010-11-161-15/+13
| | | | | | | one of the special Neon types. We'll check for invalid Neon vectors when they are created, so there's no point in handling them when mangling. llvm-svn: 119299
* Use getTypeSize() method.Bob Wilson2010-11-161-1/+1
| | | | llvm-svn: 119297
* Add a new expression kind, OpaqueValueExpr, which is useful forJohn McCall2010-11-151-0/+3
| | | | | | | certain internal type-checking procedures as well as for representing certain implicitly-generated operations. Uses to follow. llvm-svn: 119289
* Some cleanup of block API code.Fariborz Jahanian2010-11-153-24/+20
| | | | llvm-svn: 119174
* Silence an unused variable warning during release builds by folding theChandler Carruth2010-11-151-3/+2
| | | | | | expression into the assert. llvm-svn: 119143
* Assorted work leading towards the elimination of CK_Unknown.John McCall2010-11-152-26/+60
| | | | llvm-svn: 119138
* Always emit full loads from volatile complex l-values.John McCall2010-11-141-10/+3
| | | | | | | | Return the result of a complex assignment with the original values, not by performing a load from the l-value; this is the correct semantics in C, although not in C++. llvm-svn: 119037
* Add a few more complex-related cast kinds that arise due to arbitraryJohn McCall2010-11-143-3/+27
| | | | | | | | | | implicit conversions; the last batch was specific to promotions. I think this is the full set we need. I do think dividing the cast kinds into floating and integral is probably a good idea. Annotate a *lot* more C casts with useful cast kinds. llvm-svn: 119036
* Removed unnecessary initialization of a flag whichFariborz Jahanian2010-11-141-1/+1
| | | | | | | somehow got several block tests fail with a linux built compiler. llvm-svn: 119027
* Initialize couple of fields.Fariborz Jahanian2010-11-131-1/+2
| | | | llvm-svn: 119014
* Block API patch to do copy ctor of copied-in cxx objects inFariborz Jahanian2010-11-135-16/+137
| | | | | | | | copy helper function and dtor of copied cxx objects in dispose helper functions. __block variables TBD next. llvm-svn: 119011
* Introduce five new cast kinds for various conversions into andJohn McCall2010-11-133-1/+12
| | | | | | between complex types. llvm-svn: 118994
* Introduce a null-to-pointer implicit cast kind.John McCall2010-11-132-3/+16
| | | | llvm-svn: 118966
* Reduce string thrashing.Benjamin Kramer2010-11-121-12/+17
| | | | llvm-svn: 118915
* Use ASTContext::getTypeInfo to find the vector element size.Bob Wilson2010-11-121-13/+13
| | | | llvm-svn: 118899
* Add a separate NeonPolyVector kind to distinguish polynomial vector types.Bob Wilson2010-11-121-12/+22
| | | | | | Add support for mangling those types according to ARM's ABI. llvm-svn: 118898
* Add special-case mangling for Neon vector types.Bob Wilson2010-11-121-0/+38
| | | | llvm-svn: 118897
* Use a twine.Benjamin Kramer2010-11-121-3/+1
| | | | llvm-svn: 118892
* Teach debug-info generation that SourceManager::getPresumedLoc() canDouglas Gregor2010-11-111-7/+9
| | | | | | | produce an invalid location even when given a valid location, if the file system has changed underneath us. Recovery more gracefully. llvm-svn: 118834
* Adding couple of Block API, a bug fix andFariborz Jahanian2010-11-112-4/+9
| | | | | | a test change, all for blocks. wip. llvm-svn: 118745
* Add a variant of GCC-style vector types for ARM NEON.Bob Wilson2010-11-101-2/+2
| | | | | | | | | NEON vector types need to be mangled in a special way to comply with ARM's ABI, similar to some of the AltiVec-specific vector types. This patch is mostly just renaming a bunch of "AltiVecSpecific" things, since they will no longer be specific to AltiVec. Besides that, it just adds the new "NeonVector" enum. llvm-svn: 118724
* Use the right calling convention when mangling names in the Microsoft C++Charles Davis2010-11-091-4/+8
| | | | | | | | mangler. Now member functions and pointers thereof have their calling convention mangled as __thiscall if they have the default CC (even though, they technically still have the __cdecl CC). llvm-svn: 118598
* Remove the use of aliases in outputted code from ObjC (GNU runtime).David Chisnall2010-11-091-4/+6
| | | | llvm-svn: 118498
* Remove debugging printf.Nick Lewycky2010-11-091-3/+0
| | | | | | Fix linux build. llvm-svn: 118497
* Introduce the concept of a non-virtual base type to CGRecordLayoutBuilder as ↵Anders Carlsson2010-11-092-12/+122
| | | | | | a first step towards fixing PR6995. llvm-svn: 118491
* Fix miscompilation regarding VLAs; subscription of VLA pointers was incorrect.Argyrios Kyrtzidis2010-11-091-7/+4
| | | | | | Fixes rdar://8644873 & http://llvm.org/PR8567. llvm-svn: 118468
* When re-using a vtable slot for the nearest overridden method, just becauseJohn McCall2010-11-091-1/+10
| | | | | | | | | | | | there's no return adjustment from the overridden to the overrider doesn't mean there isn't a return adjustment from the overrider to the final overrider. This matters if we're emitting a virtual this-adjustment thunk because the overrider virtually inherits from the class providing the nearest overridden method. Do the appropriate return adjustment in this case. Fixes PR7611. llvm-svn: 118466
* Remove broken support for variadic templates, along with the variousDouglas Gregor2010-11-071-2/+2
| | | | | | | | | | | | | abstractions (e.g., TemplateArgumentListBuilder) that were designed to support variadic templates. Only a few remnants of variadic templates remain, in the parser (parsing template type parameter packs), AST (template type parameter pack bits and TemplateArgument::Pack), and Sema; these are expected to be used in a future implementation of variadic templates. But don't get too excited about that happening now. llvm-svn: 118385
* ARM EH uses a different personality function in C.John McCall2010-11-072-0/+4
| | | | llvm-svn: 118366
* Simplify the logic for emitting guard variables for template staticJohn McCall2010-11-068-47/+53
| | | | | | | | | data members by delaying the emission of the initializer until after linkage and visibility have been set on the global. Also, don't emit a guard unless the variable actually ends up with vague linkage, and don't use thread-safe statics in any case. llvm-svn: 118336
* std::nullptr_t is a fundamental type for RTTI purposes.Anders Carlsson2010-11-041-18/+16
| | | | llvm-svn: 118238
* Mangle std::nullptr_t as specified by the Itanium C++ ABI.Anders Carlsson2010-11-041-3/+2
| | | | llvm-svn: 118236
* Some fixes for synthesized ivar metadata (GNU runtime).David Chisnall2010-11-032-12/+20
| | | | llvm-svn: 118172
* Ensure that static local variables in function templates inherit theJohn McCall2010-11-023-1/+16
| | | | | | visibility of their function. llvm-svn: 118065
OpenPOWER on IntegriCloud