#
fce4be84 |
| 15-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Clean up CodeGenModule interface. - Add CodeGenModule::EmitTopLevelDecl which uses switch on kind instead of ugly & slow dyn_cast chains.
- Drop some simple forwarding methods into the ObjC run
Clean up CodeGenModule interface. - Add CodeGenModule::EmitTopLevelDecl which uses switch on kind instead of ugly & slow dyn_cast chains.
- Drop some simple forwarding methods into the ObjC runtime.
- Privatize appropriate methods.
llvm-svn: 54827
show more ...
|
#
92992509 |
| 15-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Change CGObjCRuntime methods to take appropriate clang Decls. - This is in prep for implementation class support for the NeXT runtime, for which the existing methods don't provide enough infor
Change CGObjCRuntime methods to take appropriate clang Decls. - This is in prep for implementation class support for the NeXT runtime, for which the existing methods don't provide enough information (and additionally make too many assumptions about how things should be emitted).
llvm-svn: 54824
show more ...
|
#
2617a3ab |
| 15-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Infinite loops considered harmful. - Thanks Thomas
llvm-svn: 54818
|
#
c4baa06d |
| 13-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
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 <daniel@zuster.org> |
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 ...
|
#
52f02605 |
| 11-Aug-2008 |
Mike Stump <mrs@apple.com> |
Fix compilation warning with help from David Chisnall.
llvm-svn: 54654
|
#
3ad53483 |
| 11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add LangOptions::NeXTRuntime. - Wired to -fnext-runtime and -fgnu-runtime options. - Defaults to GNU, no autoselection for NeXT.
Emit NeXT OBJC_IMAGE_INFO marker.
llvm-svn: 54651
|
#
8d480594 |
| 11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Change CodeGenModule to only create ObjC runtime for ObjC files - Changed CodeGenModule::getObjCRuntime to return reference. - Added CodeGenModule::hasObjCRuntime predicate.
llvm-svn: 54645
|
#
fb3043d6 |
| 11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add -fexceptions to Driver - Maps to LangOptions.Exceptions - Currently always off, should autoselect based on language.
Update CodeGen to set unwind attribute on functions definitions based
Add -fexceptions to Driver - Maps to LangOptions.Exceptions - Currently always off, should autoselect based on language.
Update CodeGen to set unwind attribute on functions definitions based on LangOptions.Exceptions. - Still need to set attributes appropriately on calls.
llvm-svn: 54643
show more ...
|
#
56fdb6ae |
| 11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
More #include cleaning - Kill unnecessary #includes in .cpp files. This is an automatic sweep so some things removed are actually used, but happen to be included by a previous header. I tried
More #include cleaning - Kill unnecessary #includes in .cpp files. This is an automatic sweep so some things removed are actually used, but happen to be included by a previous header. I tried to get rid of the obvious examples and this was the easiest way to trim the #includes in one fell swoop. - We now return to regularly scheduled development.
llvm-svn: 54632
show more ...
|
#
6e8aa537 |
| 11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
More #include cleaning - Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h - Moved Sema::getCurMethodDecl() out of line (dependent on ObjCMethodDecl via dyn_cast).
llvm-svn: 54629
|
#
303e2c2f |
| 11-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Add dummy Mac Objective-C runtime interface. - Not currently accessible and completely non-functional.
llvm-svn: 54624
|
#
6dfdf8c9 |
| 10-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
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 ...
|
#
9a8d0732 |
| 10-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Bug fix, inline string literals were getting an extra '\0'.
llvm-svn: 54608
|
#
ffc29be8 |
| 06-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Implement GNU asm-label extension support in CodeGen. This fixes scimark2 on Darwin.
- Added Sema support for asm-label on variables, which I forgot before.
- Update CodeGen to use GlobalDeclMap
Implement GNU asm-label extension support in CodeGen. This fixes scimark2 on Darwin.
- Added Sema support for asm-label on variables, which I forgot before.
- Update CodeGen to use GlobalDeclMap to determine if static Decls require emission (instead of LLVM module name lookup). Important since the Decl name and the LLVM module name can differ.
- <rdar://problem/6116729>
llvm-svn: 54388
show more ...
|
#
829e9888 |
| 05-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Change CodeGen of global decls to key off of the name (instead of having multiple bindings from all the possible decls which conceptually map to the same global).
- This eliminates CodeGen depe
Change CodeGen of global decls to key off of the name (instead of having multiple bindings from all the possible decls which conceptually map to the same global).
- This eliminates CodeGen depending on the LLVM module for name lookup.
- This also eliminates the need for ReplaceMapValuesWith (hurrah).
- This handles lookups for FunctionDecls correctly in the presence of aliases, this was previously broken.
- WIP: Can still clean up & unify variable and function emission.
llvm-svn: 54382
show more ...
|
#
2c674f6d |
| 05-Aug-2008 |
Ted Kremenek <kremenek@apple.com> |
Refactored driver logic for CodeGen into LLVMCodeGenWriter. This ASTConsumer layers on top of LLVMCodeGen (another existing ASTConsumer) to emit bitcode files to disk. This layering takes this logi
Refactored driver logic for CodeGen into LLVMCodeGenWriter. This ASTConsumer layers on top of LLVMCodeGen (another existing ASTConsumer) to emit bitcode files to disk. This layering takes this logic out of clang.cpp and puts it directly into the ASTConsumer interface. The benefit is that now --emit-llvm works with both serialized ASTs and regular source files.
llvm-svn: 54364
show more ...
|
#
7adf0760 |
| 04-Aug-2008 |
Chris Lattner <sabre@nondot.org> |
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 ...
|
#
74aa7e1e |
| 01-Aug-2008 |
Daniel Dunbar <daniel@zuster.org> |
Support constructor and destructor attributes in CodeGen
- There is an miscompilation issue remaining due to a poor interaction between the delayed emission of static functions and the emissi
Support constructor and destructor attributes in CodeGen
- There is an miscompilation issue remaining due to a poor interaction between the delayed emission of static functions and the emission of constructors, but that already existed prior to this change.
llvm-svn: 54258
show more ...
|
#
e49df9b5 |
| 30-Jul-2008 |
Daniel Dunbar <daniel@zuster.org> |
Change CodeGenModule GlobalDeclMap to directly reference globals instead of mapping the decl to a bitcast of the global to the correct type. - GetAddrOf{Function,GlobalVar} introduce the bitcast o
Change CodeGenModule GlobalDeclMap to directly reference globals instead of mapping the decl to a bitcast of the global to the correct type. - GetAddrOf{Function,GlobalVar} introduce the bitcast on every use now.
- This solves a problem where a dangling pointer could be introduced by the RAUW done when replacing a forward or tentative definition. See testcase for more details.
- Fixes <rdar://problem/6108358>
llvm-svn: 54211
show more ...
|
#
9c426524 |
| 29-Jul-2008 |
Daniel Dunbar <daniel@zuster.org> |
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 ...
|
#
837fd272 |
| 29-Jul-2008 |
Daniel Dunbar <daniel@zuster.org> |
Fix codegen of chained declarations - Killed useless CodeGenModule::EmitGlobalVarDeclarator, instead just recurse on any ScopedDecl. - Fix for <rdar://problem/6093838>
llvm-svn: 54162
|
#
390d39ac |
| 21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
move two more lists of protocols over to use ObjCList<ObjCProtocolDecl>, simplifying code along the way and fixing a problem and memory leak or two.
llvm-svn: 53876
|
#
d004505b |
| 21-Jul-2008 |
Chris Lattner <sabre@nondot.org> |
introduce a new ObjCList templated class and start moving various objc lists over to it. First up, the protocol list on ObjCInterfaceDecl.
llvm-svn: 53856
|
#
bf231a61 |
| 26-Jun-2008 |
Chris Lattner <sabre@nondot.org> |
refactor more objc codegen interfaces to pass around selectors so we don't push strings into LLVM IR and then have to read them back out.
llvm-svn: 52765
|