| #
a7c8cf62 |
| 16-Aug-2008 |
Daniel Dunbar <[email protected]> |
Change WarnUnsupported to ErrorUnsupported (in name and in practice). - We are beyond the point where this shows up often and when it does generating miscompiled files is bad.
llvm-svn: 54836
|
| #
c4baa06d |
| 13-Aug-2008 |
Daniel Dunbar <[email protected]> |
Add GetAddrOfConstantCString method - Returns addr of constant for argument + '\0'. - I couldn't think of a better name. - Move appropriate users of GetAddrOfConstantString to this.
Rename getStr
Add GetAddrOfConstantCString method - Returns addr of constant for argument + '\0'. - I couldn't think of a better name. - Move appropriate users of GetAddrOfConstantString to this.
Rename getStringForStringLiteral to GetStringForStringLiteral.
Add GetAddrOfConstantStringFromLiteral - This combines GetAddrOfConstantString and GetStringForStringLiteral. This method can be, but is not yet, more efficient.
Change GetAddrOfConstantString to not add terminating '\0' - <rdar://problem/6140956>
llvm-svn: 54768
show more ...
|
| #
89da6ad1 |
| 13-Aug-2008 |
Daniel Dunbar <[email protected]> |
Change ObjCRuntime GenerateProtocol[Ref] methods to take ObjCProtocolDecl directly.
Implement CodeGen support for forward protocol decls (no-ops are so nice to implement).
Also moved CGObjC
Change ObjCRuntime GenerateProtocol[Ref] methods to take ObjCProtocolDecl directly.
Implement CodeGen support for forward protocol decls (no-ops are so nice to implement).
Also moved CGObjCRuntime.h out of CodeGenModule.h
llvm-svn: 54709
show more ...
|
| #
8b8683f9 |
| 12-Aug-2008 |
Daniel Dunbar <[email protected]> |
Add ObjC constant string support for NeXT.
Changed CGObjCRuntime::GenerateConstantString interface to take std::string instead of char* and size.
Change ObjC functions which call on Generate
Add ObjC constant string support for NeXT.
Changed CGObjCRuntime::GenerateConstantString interface to take std::string instead of char* and size.
Change ObjC functions which call on GenerateConstantString to bitcast result to appropriate type.
llvm-svn: 54659
show more ...
|
| #
8d480594 |
| 11-Aug-2008 |
Daniel Dunbar <[email protected]> |
Change CodeGenModule to only create ObjC runtime for ObjC files - Changed CodeGenModule::getObjCRuntime to return reference. - Added CodeGenModule::hasObjCRuntime predicate.
llvm-svn: 54645
|
| #
ad319a73 |
| 11-Aug-2008 |
Daniel Dunbar <[email protected]> |
More #include cleaning - Remove internal uses of AST.h
llvm-svn: 54628
|
| #
6dfdf8c9 |
| 10-Aug-2008 |
Daniel Dunbar <[email protected]> |
Back out r54608 (inline string literals were getting an extra '\0') temporarily, I assumed GetAddrForConstantString literal was being used consistently but it doesn't look like it is.
Factored o
Back out r54608 (inline string literals were getting an extra '\0') temporarily, I assumed GetAddrForConstantString literal was being used consistently but it doesn't look like it is.
Factored out a CodeGenModule::getStringForStringLiteral which handles extracting a std::string for the bytes of a StringLiteral, padded to match the type.
Update EmitLValue to use getStringForStringLiteral, this was previously not padding strings correctly. Good thing we only emit strings in 4 different places!
llvm-svn: 54621
show more ...
|
| #
07bb087a |
| 10-Aug-2008 |
Daniel Dunbar <[email protected]> |
Fix crash during initialization of a bitfield which followed a zero length element.
Fix some 80-col violations.
llvm-svn: 54610
|
| #
7adf0760 |
| 04-Aug-2008 |
Chris Lattner <[email protected]> |
Finally fix PR2189. This makes a fairly invasive but important change to move getAsArrayType into ASTContext instead of being a method on type. This is required because getAsArrayType(const AT), whe
Finally fix PR2189. This makes a fairly invasive but important change to move getAsArrayType into ASTContext instead of being a method on type. This is required because getAsArrayType(const AT), where AT is a typedef for "int[10]" needs to return ArrayType(const int, 10).
Fixing this greatly simplifies getArrayDecayedType, which is a good sign.
llvm-svn: 54317
show more ...
|
| #
9c426524 |
| 29-Jul-2008 |
Daniel Dunbar <[email protected]> |
Rework codegen emission of globals - No (intended) functionality change.
- Primary purpose is to clearly separate (lazy) construction of globals that are a forward declaration or tentative defi
Rework codegen emission of globals - No (intended) functionality change.
- Primary purpose is to clearly separate (lazy) construction of globals that are a forward declaration or tentative definition from those that are the final definition.
- Lazy construction is now encapsulated in GetAddrOf{Function,GlobalVar} while final definitions are constructed in EmitGlobal{Function,Var}Definition. - External interface for dealing with globals is now limited to EmitGlobal and GetAddrOf{Function,GlobalVar}.
- Also updated helper functions dealing with statics, annotations, and ctors to be private.
llvm-svn: 54179
show more ...
|
| #
d9fa5d6a |
| 26-Jul-2008 |
Chris Lattner <[email protected]> |
Fix a bug in my previous patch, CGF is not valid for constants outside a function
llvm-svn: 54108
|
| #
0f398c44 |
| 26-Jul-2008 |
Chris Lattner <[email protected]> |
remove uses of QualType::getCanonicalType() from codegen for PR2189
llvm-svn: 54107
|
| #
1f32c759 |
| 17-Jul-2008 |
Daniel Dunbar <[email protected]> |
Fix for codegen crash on multibit bool bitfield initialization <rdar://problem/6078606>
llvm-svn: 53737
|
| #
091f698d |
| 21-Jun-2008 |
Chris Lattner <[email protected]> |
"this patch adds code generation hooks for Objective-C constant strings. It also modifies Sema so that Objective-C constant strings are treated as untyped objects if the interface for the constant s
"this patch adds code generation hooks for Objective-C constant strings. It also modifies Sema so that Objective-C constant strings are treated as untyped objects if the interface for the constant string class can not be found. This is consistent with Apple GCC. I thought it was consistent with GNU GCC, since this was causing failures when trying to compile GNUstep with (GNU) GCC, but it appears that this is not the case when attempting to produce a simple test case to demonstrate it. Possibly there is a way of making the error go away, but I haven't found out what it is yet."
Patch by David Chisnall!
llvm-svn: 52599
show more ...
|
|
Revision tags: llvmorg-2.3.0 |
|
| #
3ce7b205 |
| 07-Jun-2008 |
Eli Friedman <[email protected]> |
Fix crash with conversion to an address-space-qualified pointer. Bug reported on cfe-dev by Cédric Venet.
Note that I seriously doubt that this perticular construct is useful, though: it's a poin
Fix crash with conversion to an address-space-qualified pointer. Bug reported on cfe-dev by Cédric Venet.
Note that I seriously doubt that this perticular construct is useful, though: it's a pointer in an alternate address space pointing into unqualified address space.
llvm-svn: 52076
show more ...
|
| #
fd1e32b1 |
| 06-Jun-2008 |
Eli Friedman <[email protected]> |
Reorganize this loop a bit so it doesn't crash for empty unions. Fixes PR2419.
llvm-svn: 52060
|
| #
9b07b7b0 |
| 06-Jun-2008 |
Nuno Lopes <[email protected]> |
implement constant expr. sub ptr ptr
llvm-svn: 52049
|
| #
10c24175 |
| 01-Jun-2008 |
Eli Friedman <[email protected]> |
Make sure _Bool globals have the correct type.
llvm-svn: 51838
|
| #
34994cbc |
| 30-May-2008 |
Eli Friedman <[email protected]> |
Fix and enable generating general union initializers. Essentially, what this does is reconstruct the type for structs and arrays if the type wouldn't be compatible otherwise.
The assertion about p
Fix and enable generating general union initializers. Essentially, what this does is reconstruct the type for structs and arrays if the type wouldn't be compatible otherwise.
The assertion about packing in the struct type reconstruction code sucks, but I don't see any obvious way to fix it. Maybe we need a general utility method to take a list of types and alignments and try to construct an unpacked type if possible?
llvm-svn: 51785
show more ...
|
| #
f7fe4165 |
| 30-May-2008 |
Eli Friedman <[email protected]> |
Fix constant vector init for initializer lists with an incomplete list of elements.
llvm-svn: 51769
|
| #
a2eaffc7 |
| 30-May-2008 |
Eli Friedman <[email protected]> |
Some additions to constant initializer generation code. Adds bit-field initialization; ugly code, X86-only, but it works, at least for basic stuff. Separates/adds union initialization; currently d
Some additions to constant initializer generation code. Adds bit-field initialization; ugly code, X86-only, but it works, at least for basic stuff. Separates/adds union initialization; currently disabled, though, because the struct/array code needs modifications to support elements of the wrong type.
Fixes PR2381 and PR2309 with the bit-field initialization. And NetHack compiles and appears to work with a few tweaks (to work around the lack of transparent_union support, and clang being a bit strict about conflicting declarations).
llvm-svn: 51763
show more ...
|
| #
43a6d514 |
| 29-May-2008 |
Eli Friedman <[email protected]> |
More complete/correct implementation of the comparison operators for constant expressions.
llvm-svn: 51682
|
| #
045bf4ff |
| 29-May-2008 |
Eli Friedman <[email protected]> |
Add codegen support for a few more kinds of initializer constant expressions.
llvm-svn: 51677
|
| #
247ee87e |
| 20-May-2008 |
Eli Friedman <[email protected]> |
Restructure constant structure init codegen so that it's possible to implement bitfield codegen (although I don't envy the person who implements it). This also prevents a crash on code like that f
Restructure constant structure init codegen so that it's possible to implement bitfield codegen (although I don't envy the person who implements it). This also prevents a crash on code like that from PR2309 (it's still broken, but it fails more gracefully).
llvm-svn: 51285
show more ...
|
| #
8d0b976e |
| 20-May-2008 |
Eli Friedman <[email protected]> |
Remove code that shouldn't have any effect anymore.
llvm-svn: 51284
|