diff options
author | Chris Lattner <sabre@nondot.org> | 2007-06-05 20:53:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-06-05 20:53:16 +0000 |
commit | 8394d795c30126762250de260f9516e7393d6974 (patch) | |
tree | dbd4ca761e93ab080bc7e054370bbc6637d47e22 /clang/CodeGen/CodeGenFunction.cpp | |
parent | fdc195af7efa48d376e00adbd3e7e49681d1aa53 (diff) | |
download | bcm5719-llvm-8394d795c30126762250de260f9516e7393d6974.tar.gz bcm5719-llvm-8394d795c30126762250de260f9516e7393d6974.zip |
implement codegen of a bunch more loop constructs and most expressions
llvm-svn: 39593
Diffstat (limited to 'clang/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/CodeGen/CodeGenFunction.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/CodeGen/CodeGenFunction.cpp b/clang/CodeGen/CodeGenFunction.cpp index 57d9e8be660..4239e1e58e7 100644 --- a/clang/CodeGen/CodeGenFunction.cpp +++ b/clang/CodeGen/CodeGenFunction.cpp @@ -58,7 +58,9 @@ const llvm::Type *CodeGenFunction::ConvertType(QualType T, SourceLocation Loc) { return IntegerType::get(Target.getCharWidth(Loc)); case BuiltinType::Bool: - return IntegerType::get(Target.getBoolWidth(Loc)); + // FIXME: This is very strange. We want scalars to be i1, but in memory + // they can be i1 or i32. Should the codegen handle this issue? + return llvm::Type::Int1Ty; case BuiltinType::Short: case BuiltinType::UShort: @@ -101,7 +103,7 @@ const llvm::Type *CodeGenFunction::ConvertType(QualType T, SourceLocation Loc) { A.getIndexTypeQualifier() == 0 && "FIXME: We only handle trivial array types so far!"); // FIXME: are there any promotions etc here? - ExprResult Size = EmitExpr(A.getSize()); + RValue Size = EmitExpr(A.getSize()); assert(Size.isScalar() && isa<llvm::ConstantInt>(Size.getVal()) && "FIXME: Only handle fixed-size arrays so far"); const llvm::Type *EltTy = ConvertType(A.getElementType(), Loc); |