aboutsummaryrefslogtreecommitdiff
path: root/CodeGen/CodeGenTypes.cpp
AgeCommit message (Collapse)Author
2008-03-15Make a major restructuring of the clang tree: introduce a top-levelChris Lattner
lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05remove the source location arguments to various target query methods.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47954 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20Tabs are the enemyNate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47410 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20Alternate address spaces work:Chris Lattner
rename QualType::getQualifiers to getCVRQualifiers. Add some fixme's and clean up some code relevant to qualifiers. Change ASQualType to contain a Type* instead of a QualType. Any CVR qualifiers should be on the outer qual type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47398 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Split out incomplete arrays from VariableArrayType into Eli Friedman
IncompleteArrayType. This should make code dealing with both incomplete and variable length arrays much more readable, plus it allows properly making the distinction between isVariableArrayType() and isVariablyModifiedType(). The patch is a little big, but it's strightforward. so I don't think there should be any issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47165 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-08Fix a bitfield regression. Reported by Anders Carlsson.Lauro Ramos Venancio
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46889 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07Simplify bitfield codegen.Lauro Ramos Venancio
Fix codegen of struct { short a[3]; int b:15; }. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46859 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07Fix codegen ofLauro Ramos Venancio
struct { char a[3]; unsigned char b:1; }; Fix PR1990. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46856 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06now that ConvertTagDeclType is nice and simple, use it from UpdateCompletedType.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46809 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06simplify and speed up type refinement logic. No functionality change.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46808 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06only convert the type name once, not each type it is refined.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46807 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06simplify a bunch of code.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46805 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06rename TypeHolderMap to TypeCache, which more aptly describes what it is.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46804 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06split tagged decl layout into its own method.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46803 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06only update the llvm type for a struct when we used the struct Chris Lattner
previously in an opaque context. If we didn't do this, computing its layout could be wasted: just be lazy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46802 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06sink more of the type related code into CodeGenTypes.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46801 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05rewrite some of the type refinement code to eliminate dangling pointersChris Lattner
simplify the code and generally make it more robust. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46745 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05Change the key of CGRecordLayouts from being an llvm type* to being a decl*. ↵Chris Lattner
LLVM Type*'s can change as types are refined, so we can't use them as a stable key in the map. Decls don't change, so use them instead. This patch was written by Anders, but he's too shy to commit it himself :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46743 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05Update outdated comment.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46737 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05Cleanup InitListExpr code generation code.Devang Patel
Handle padding fields while initializing struct (fix PR 1962) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46736 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05Fix memory corruption from the type map being modified while a reference Eli Friedman
to a cell is being held. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46735 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05Keep track of padding fields.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46734 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-04Add experimental support for address space qualified types. Address spaceChristopher Lamb
qualifiers use the __attribute__((address_space(id))) syntax. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46691 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Implement review feedback. Use getAsPointerType instead of cast<PointerType>.Lauro Ramos Venancio
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46613 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30A pointer to an opaque type is an "opaque type definition".Lauro Ramos Venancio
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46575 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-22Fix two bugs in bitfield codegen.Lauro Ramos Venancio
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46255 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-21Simplify the bitfield codegen.Lauro Ramos Venancio
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46230 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-09implement proper support for _Bool in memory, which is usually i8, not i1.Chris Lattner
This fixes a crash reported by Seo Sanghyeon git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45778 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07Substituted all instances of the string "Objc" for "ObjC". This fixesTed Kremenek
some naming inconsistencies in the names of classes pertaining to Objective-C support in clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45715 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29Don't attribute in file headers anymore. See llvmdev for theChris Lattner
discussion of this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45410 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21Convert opaque type when struct definition is seen.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45287 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21Keep track of llvm struct size while adding fields.Devang Patel
Update addPaddingFields() interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45284 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17Patch to implemented objective-c's dynamic object pointer qualified withFariborz Jahanian
the protocol list (id<P,...> types). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45121 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17Update to use new PointerType::getUnqual() api.Christopher Lamb
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45081 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-13Add assert to detect incomplete implementation work.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44974 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11Refactor bit-field handling code into a separate method.Devang Patel
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44875 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11Separate access field number is not required.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44833 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11Beautify comment.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44831 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11Add support to share llvm fields for bit-fields.Devang Patel
For example, struct { char a; short b:2; }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44830 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-10Use getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44799 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-10Use getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44798 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06More struct bitfields layout work. Now handle,Devang Patel
struct STestB1 {char a; char b:2; } stb1; struct STestB2 {char a; char b:5; char c:4} stb2; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44664 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05fix some bogus code noticed by Kevin AndreChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44615 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-01Better match llvm-gcc's behavior for CodeGen naming of anonymous structs and ↵Christopher Lamb
unions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44490 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-01When generating the CodeGen type name of a struct, union, enum use the typedef Christopher Lamb
name if a tag type name is not available for the type. This matches how llvm-gcc chooses CodeGen type names. This means that "typedef struct {...} foo" now results in a CodeGen name of "struct.foo" rather than "struct." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44489 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-27update to match change in mainline llvm.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44367 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-08Add assert for the case that is not handled.Devang Patel
struct { char a; short b:2; }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43859 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-08Keep track of beginning offset for the bit field that does not start at byte ↵Devang Patel
boundry. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43857 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-07Stay within 80 columns.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43843 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-07Start struct bit field laout work. Devang Patel
This is far from complete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43801 91177308-0d34-0410-b5e6-96231b3b80d8