- Sep 05, 2008
-
-
Owen Anderson authored
llvm-svn: 55853
-
Evan Cheng authored
llvm-svn: 55849
-
Dan Gohman authored
llvm-svn: 55846
-
Dale Johannesen authored
llvm-svn: 55845
-
Dan Gohman authored
llvm-svn: 55844
-
Dan Gohman authored
llvm-svn: 55843
-
Dan Gohman authored
approach here. llvm-svn: 55842
-
Ted Kremenek authored
Add comment back that Argiris pointed out that I mistakenly removed (the comments below it were stale, so I accidently removed the whole thing). llvm-svn: 55841
-
Evan Cheng authored
llvm-svn: 55840
-
Ted Kremenek authored
Change struct forward declarations and definitions to use unique RecordDecls, as opposed to creating a single RecordDecl and reusing it. This change effects both RecordDecls and CXXRecordDecls, but does not effect EnumDecls (yet). The motivation of this patch is as follows: - Capture more source information, necessary for refactoring/rewriting clients. - Pave the way to resolve ownership issues with RecordDecls with the forthcoming addition of DeclGroups. Current caveats: - Until DeclGroups are in place, we will leak RecordDecls not explicitly referenced by the AST. For example: typedef struct { ... } x; The RecordDecl for the struct will be leaked because the TypedefDecl doesn't refer to it. This will be solved with DeclGroups. - This patch also (temporarily) breaks CodeGen. More below. High-level changes: - As before, TagType still refers to a TagDecl, but it doesn't own it. When a struct/union/class is first referenced, a RecordType and RecordDecl are created for it, and the RecordType refers to that RecordDecl. Later, if a new RecordDecl is created, the pointer to a RecordDecl in RecordType is updated to point to the RecordDecl that defines the struct/union/class. - TagDecl and RecordDecl now how a method 'getDefinition()' to return the TagDecl*/RecordDecl* that refers to the TagDecl* that defines a particular enum/struct/class/union. This is useful from going from a RecordDecl* that defines a forward declaration to the RecordDecl* that provides the actual definition. Note that this also works for EnumDecls, except that in this case there is no distinction between forward declarations and definitions (yet). - Clients should no longer assume that 'isDefinition()' returns true from a RecordDecl if the corresponding struct/union/class has been defined. isDefinition() only returns true if a particular RecordDecl is the defining Decl. Use 'getDefinition()' instead to determine if a struct has been defined. - The main changes to Sema happen in ActOnTag. To make the changes more incremental, I split off the processing of enums and structs et al into two code paths. Enums use the original code path (which is in ActOnTag) and structs use the ActOnTagStruct. Eventually the two code paths will be merged, but the idea was to preserve the original logic both for comparison and not to change the logic for both enums and structs all at once. - There is NO CHAINING of RecordDecls for the same RecordType. All RecordDecls that correspond to the same type simply have a pointer to that type. If we need to figure out what are all the RecordDecls for a given type we can build a backmap. - The diff in CXXRecordDecl.[cpp,h] is actually very small; it just mimics the changes to RecordDecl. For some reason 'svn' marks the entire file as changed. Why is CodeGen broken: - Codegen assumes that there is an equivalence between RecordDecl* and RecordType*. This was true before because we only created one RecordDecl* for a given RecordType*, but it is no longer true. I believe this shouldn't be too hard to change, but the patch was big enough as it is. I have tested this patch on both the clang test suite, and by running the static analyzer over Postgresql and a large Apple-internal project (mix of Objective-C and C). llvm-svn: 55839
-
Evan Cheng authored
llvm-svn: 55838
-
Duncan Sands authored
edges one by one by hand. llvm-svn: 55836
-
Duncan Sands authored
llvm-svn: 55835
-
Duncan Sands authored
llvm-svn: 55834
-
Argyrios Kyrtzidis authored
llvm-svn: 55833
-
Argyrios Kyrtzidis authored
llvm-svn: 55832
-
Duncan Sands authored
it modifies a functions attributes. llvm-svn: 55831
-
Argyrios Kyrtzidis authored
llvm-svn: 55830
-
Argyrios Kyrtzidis authored
llvm-svn: 55829
-
Duncan Sands authored
elsewhere due to a missing pattern for v2f64 = sint_to_fp v2i32. That is PR2687. llvm-svn: 55828
-
Daniel Dunbar authored
llvm-svn: 55827
-
Daniel Dunbar authored
preprocessed outputs) llvm-svn: 55826
-
Daniel Dunbar authored
- gcc is not happy if we start a preprocessed file with #line 1 "XXX" 1 - Workaround by making sure file starts with a simple #line change. Also, factored WriteLineInfo out. Also, fixed bug where FileType was not being correctly updated. llvm-svn: 55825
-
Dan Gohman authored
llvm-svn: 55824
-
Dale Johannesen authored
but less accurate (non-IEEE) code sequences for certain math library functions. Add the first of several such expansions. Don't worry, if you don't turn it on it won't affect you. llvm-svn: 55823
-
Ted Kremenek authored
llvm-svn: 55822
-
Ted Kremenek authored
Remove "NextDecl" from RecordDecl. This change touches many files that where RecordDecl or CXXRecordDecl was constructed, always with an argument of 'NULL' for the previous declaration. The motivation behind this change is that chaining the RecordDecls is simply unnecessary. Once we create multiple RecordDecls for the same struct/union/class, clients that care about all the declarations of the same struct can build a back map by seeing which Decls refer to the same RecordType. llvm-svn: 55821
-
Dan Gohman authored
expanding its operands. llvm-svn: 55820
-
Dan Gohman authored
to check the result of getRegForValue before using it, and to check for illegal operand types. llvm-svn: 55819
-
Dan Gohman authored
llvm-svn: 55818
-
Dan Gohman authored
in the same block. Fix the entry-block handling to only run at at the beginning of the entry block, and not any other times. llvm-svn: 55817
-
Dan Gohman authored
llvm-svn: 55816
-
Daniel Dunbar authored
- <rdar://problem/6156739> llvm-svn: 55815
-
Owen Anderson authored
pool loads on X86 in fast isel. This isn't actually used yet. llvm-svn: 55814
-
Ted Kremenek authored
- Don't remove $BaseDir; may be unsafe - Always create HTML directory with parents llvm-svn: 55813
-
Daniel Dunbar authored
llvm-svn: 55812
-
Dan Gohman authored
llvm-svn: 55811
-
Ted Kremenek authored
llvm-svn: 55810
-
Devang Patel authored
llvm-svn: 55809
-
Devang Patel authored
llvm-svn: 55808
-