implement lowering of complex types

llvm-svn: 39668
This commit is contained in:
Chris Lattner 2007-06-22 18:15:26 +00:00
parent f39b03d98b
commit 3e3a1e9cda
2 changed files with 17 additions and 4 deletions

View File

@ -61,10 +61,23 @@ const llvm::Type *CodeGenTypes::ConvertType(QualType T, SourceLocation Loc) {
case BuiltinType::Float: return llvm::Type::FloatTy;
case BuiltinType::Double: return llvm::Type::DoubleTy;
case BuiltinType::LongDouble:
case BuiltinType::FloatComplex:
case BuiltinType::DoubleComplex:
// FIXME: mapping long double onto double.
return llvm::Type::DoubleTy;
case BuiltinType::FloatComplex: {
std::vector<const llvm::Type*> Elts;
Elts.push_back(llvm::Type::FloatTy);
Elts.push_back(llvm::Type::FloatTy);
return llvm::StructType::get(Elts);
}
case BuiltinType::LongDoubleComplex:
;
// FIXME: mapping long double complex onto double complex.
case BuiltinType::DoubleComplex: {
std::vector<const llvm::Type*> Elts;
Elts.push_back(llvm::Type::DoubleTy);
Elts.push_back(llvm::Type::DoubleTy);
return llvm::StructType::get(Elts);
}
}
break;
}

View File

@ -190,7 +190,7 @@
84916BE60C161E800080778F /* Attr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Attr.h; path = clang/AST/Attr.h; sourceTree = "<group>"; };
84D9A8870C1A57E100AC7ABC /* AttributeList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = AttributeList.cpp; path = Parse/AttributeList.cpp; sourceTree = "<group>"; };
84D9A88B0C1A581300AC7ABC /* AttributeList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AttributeList.h; path = clang/Parse/AttributeList.h; sourceTree = "<group>"; };
8DD76F6C0486A84900D96B5E /* clang */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = clang; sourceTree = BUILT_PRODUCTS_DIR; };
8DD76F6C0486A84900D96B5E /* clang */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = clang; sourceTree = BUILT_PRODUCTS_DIR; };
DE01DA480B12ADA300AC22CE /* PPCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PPCallbacks.h; sourceTree = "<group>"; };
DE06756B0C051CFE00EBBFD8 /* ParseExprCXX.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ParseExprCXX.cpp; path = Parse/ParseExprCXX.cpp; sourceTree = "<group>"; };
DE06B73D0A8307640050E87E /* LangOptions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LangOptions.h; sourceTree = "<group>"; };