aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.h
AgeCommit message (Collapse)Author
2009-02-26Create a new TypeNodes.def file that enumerates all of the types,Douglas Gregor
giving them rough classifications (normal types, never-canonical types, always-dependent types, abstract type representations) and making it far easier to make sure that we've hit all of the cases when decoding types. Switched some switch() statements on the type class over to using this mechanism, and filtering out those things we don't care about. For example, CodeGen should never see always-dependent or non-canonical types, while debug info generation should never see always-dependent types. More switch() statements on the type class need to be moved over to using this approach, so that we'll get warnings when we add a new type then fail to account for it somewhere in the compiler. As part of this, some types have been renamed: TypeOfExpr -> TypeOfExprType FunctionTypeProto -> FunctionProtoType FunctionTypeNoProto -> FunctionNoProtoType There shouldn't be any functionality change... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65591 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-26Add Type::hasPointerRepresentation predicate.Daniel Dunbar
- For types whose native representation is a pointer. - Use to replace ExprConstant.cpp:HasPointerEvalType, CodeGenFunction::isObjCPointerType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65569 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-25CodeGen support for copied BlockDeclRefExprs.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65487 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-25Fold GeneraticStaticBlockVarDecl into callers.Daniel Dunbar
- No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65470 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-25Pull COdeGenFunction::CreateStaticBlockVarDecl (just for creating theDaniel Dunbar
global variable) out of GenerateStaticBlockVarDecl. - No intended functionality change. - Prep for some mild cleanups and PR3662. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65466 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-24first wave of fixes for @encode sema support. This is part of PR3648.Chris Lattner
The big difference here is that (like string literal) @encode has array type, not pointer type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65391 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-24Prevent accidental copying of CodeGenFunction and CodeGenModule.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65372 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23Add low level support for generating invoke instead of calls.Daniel Dunbar
- No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65325 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22Copy some clenaups from Eli to code that I copied. :-)Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65286 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22Cleanp code with some recent suggestions.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65285 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-21Add CodeGen support for the helper for BlockDeclRefExprs. The easierMike Stump
stuff is mostly done. Move BlockHasCopyDispose up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65242 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-20Set call attribute for direct calls (i.e. noreturn).Daniel Dunbar
- Remove an unused variant of EmitCallExpr overload. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65130 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-20Deox and Capitolize.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65093 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17Fixup spacing a little.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64768 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-16Support IRgen of sqrt -> llvm.sqrt, pow -> llvm.pow.Daniel Dunbar
- Define pow[lf]?, sqrt[lf]? as builtins. - Add -fmath-errno option which binds to LangOptions.MathErrno - Add new builtin flag Builtin::Context::isConstWithoutErrno for functions which can be marked as const if errno isn't respected for math functions. Sema automatically marks these functions as const when they are defined, if MathErrno=0. - IRgen uses const attribute on sqrt and pow library functions to decide if it can use the llvm intrinsic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64689 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-14Use getNameAsCString instead of getNameAsString and reflow the type.Mike Stump
Thanks Anders. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64571 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-14Generate the helper function for blocks. Now basic codegen isMike Stump
starting to work for blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64570 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-13Condense all the blocks code into CGBlocks.cpp.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64457 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-13Add CodeGen support for the nodebug attribute.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-12Add a very basic implemenation of global blocks. This needs to be cleaned up.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64387 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-12Add support for generating block call expressions.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11Support IRgen of va_arg of structure as l-value.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64325 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10Remove the last remnants of the Obj-C EH stack code.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64205 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10Start removing the old Obj-C EH stack now that the cleanup stack is used ↵Anders Carlsson
instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64203 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10Add util Emit{LoadOf,StoreTo}Scalar methods to encapsulate conversionDaniel Dunbar
from LLVM memory type to/from LLVM temporary type. - No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64191 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09Add DidCallStackSave variable to CodeGenFunction.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64156 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08Add some more documentation. Also reflowed comments to 80 col.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64105 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08Add a simplified EmitJumpThroughFinally and use it in CGObjC in preparation ↵Anders Carlsson
of making it use the cleanup stack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64098 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08Wire up break and continue processing to the new stack depth adjuster.Mike Stump
If people could beat on it and let me know if there are any new semantics required by newer language standards or DRs or any little details I goofed on, I'd be happy to fix any issues found. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64079 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08More cleanup stack work, PopCleanupBlock now returns a struct with the ↵Anders Carlsson
switch block and end block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64072 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08Split some functions upAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64069 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08CleanupScope needs to push the cleanup block in its destructorAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64068 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08More cleanup stack work.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64059 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08When emitting blocks, keep track of which cleanup scope they have. Minor ↵Anders Carlsson
fixes and cleanup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64053 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07Add support for emitting cleanup blocks. Make EmitCompoundStatement emit ↵Anders Carlsson
cleanup blocks if necessary git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64051 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07Add a simple RAII object, to be used for pushing a cleanup entry and make ↵Anders Carlsson
the insertion point be the cleanup block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64048 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07Ensure we track all the stack depths for all break and continue pointsMike Stump
correctly. This should lay the ground work to throw the big switch and start code gening break and continue in the presense of vlas. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64046 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07Add plumbing for the cleanup stack.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64043 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07Split the exception object out into its own stack.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64032 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07Simplify the Objective-C exception handling.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64031 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07Arrange to have the correct StackDepth for while statements.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64021 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07Fixup goto codegen in and around VLAs.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64014 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05Pull CodeGenFunction::GetUndefRValue() out of EmitUnsupportedRValue.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63845 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03Add CodeGenFunction::ConvertTypeForMem forwarding function.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63678 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03ir-gen for nonfragile ivar bitfield access (objc2 nonfragile abi).Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63644 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03Targets that don't have stack use global address space for parameters.Sanjiv Gupta
Specify external linkage for such globals so that llvm optimizer do not assume there values initialized as zero. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63636 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03Fixed the typo in comment.Sanjiv Gupta
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63634 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03objc2's ir-gen for nonfragile ivar access.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63578 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02More ABI API cleanup.Daniel Dunbar
- Lift CGFunctionInfo creation above ReturnTypeUsesSret and EmitFunction{Epi,Pro}log. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63553 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02ABI handling API changes.Daniel Dunbar
- Lift CGFunctionInfo creation up to callers of EmitCall. - Move isVariadic bit out of CGFunctionInfo, take as argument to GetFunctionType instead. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63550 91177308-0d34-0410-b5e6-96231b3b80d8