diff options
author | Chris Lattner <sabre@nondot.org> | 2007-08-24 05:35:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-08-24 05:35:26 +0000 |
commit | 7f02f721d48772e4eee4fccd8af4f800be1bbc1e (patch) | |
tree | 1ef3a3dbf60cdd95b796dbe9e61816bd6fdf3ff0 /CodeGen/CodeGenFunction.h | |
parent | 566b6ce741c742cc3f8cb85e2376ec4a3490ff5f (diff) |
completely refactor codegen of scalar expressions out into its own CGExprScalar.cpp file.
This patch temporarily breaks compound assignment operators, but greatly simplifies many
things.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41355 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CodeGen/CodeGenFunction.h')
-rw-r--r-- | CodeGen/CodeGenFunction.h | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/CodeGen/CodeGenFunction.h b/CodeGen/CodeGenFunction.h index 5e2b07bb4b..0975bd975c 100644 --- a/CodeGen/CodeGenFunction.h +++ b/CodeGen/CodeGenFunction.h @@ -185,7 +185,6 @@ class CodeGenFunction { public: typedef std::pair<llvm::Value *, llvm::Value *> ComplexPairTy; llvm::LLVMBuilder Builder; -private: const FunctionDecl *CurFuncDecl; llvm::Function *CurFn; @@ -197,6 +196,7 @@ private: const llvm::Type *LLVMIntTy; unsigned LLVMPointerWidth; +private: /// LocalDeclMap - This keeps track of the LLVM allocas or globals for local C /// decls. llvm::DenseMap<const Decl*, llvm::Value*> LocalDeclMap; @@ -345,29 +345,12 @@ public: /// result of the expression doesn't need to be generated into memory. RValue EmitAnyExpr(const Expr *E, bool NeedResult = true); - RValue EmitExpr(const Expr *E); - RValue EmitIntegerLiteral(const IntegerLiteral *E); - RValue EmitFloatingLiteral(const FloatingLiteral *E); - RValue EmitCharacterLiteral(const CharacterLiteral *E); - RValue EmitTypesCompatibleExpr(const TypesCompatibleExpr *E); - - RValue EmitImplicitCastExpr(const ImplicitCastExpr *Op); - RValue EmitCastExpr(const Expr *Op, QualType DestTy); RValue EmitCallExpr(const CallExpr *E); RValue EmitBuiltinExpr(unsigned builtinID, const CallExpr *E); - RValue EmitArraySubscriptExprRV(const ArraySubscriptExpr *E); - // Unary Operators. - RValue EmitUnaryOperator(const UnaryOperator *E); - RValue EmitUnaryIncDec (const UnaryOperator *E); - RValue EmitUnaryAddrOf (const UnaryOperator *E); - RValue EmitUnaryPlus (const UnaryOperator *E); - RValue EmitUnaryMinus (const UnaryOperator *E); - RValue EmitUnaryNot (const UnaryOperator *E); - RValue EmitUnaryLNot (const UnaryOperator *E); - RValue EmitSizeAlignOf (QualType TypeToSize, QualType RetType,bool isSizeOf); - // FIXME: real/imag - +#if 0 + RValue EmitExpr(const Expr *E); + // Binary Operators. RValue EmitBinaryOperator(const BinaryOperator *E); RValue EmitBinaryMul(const BinaryOperator *E); @@ -398,8 +381,9 @@ public: // Conditional Operator. RValue EmitConditionalOperator(const ConditionalOperator *E); RValue EmitChooseExpr(const ChooseExpr *E); +#endif - RValue EmitObjCStringLiteral(const ObjCStringLiteral* E); + llvm::Value *EmitObjCStringLiteral(const ObjCStringLiteral *E); //===--------------------------------------------------------------------===// // Aggregate Expression Emission @@ -408,6 +392,10 @@ public: void EmitAggregateCopy(llvm::Value *DestPtr, llvm::Value *SrcPtr, QualType EltTy); + /// EmitScalarExpr - Emit the computation of the specified expression of + /// LLVM scalar type, returning the result. + llvm::Value *EmitScalarExpr(const Expr *E); + /// EmitAggExpr - Emit the computation of the specified expression of /// aggregate type. The result is computed into DestPtr. Note that if /// DestPtr is null, the value of the aggregate expression is not needed. |