[cfe-commits] r39668 - in /cfe/cfe/trunk: CodeGen/CodeGenTypes.cpp clang.xcodeproj/project.pbxproj

clattner at cs.uiuc.edu clattner at cs.uiuc.edu
Wed Jul 11 09:46:56 PDT 2007


Author: clattner
Date: Wed Jul 11 11:46:56 2007
New Revision: 39668

URL: http://llvm.org/viewvc/llvm-project?rev=39668&view=rev
Log:
implement lowering of complex types

Modified:
    cfe/cfe/trunk/CodeGen/CodeGenTypes.cpp
    cfe/cfe/trunk/clang.xcodeproj/project.pbxproj

Modified: cfe/cfe/trunk/CodeGen/CodeGenTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/CodeGen/CodeGenTypes.cpp?rev=39668&r1=39667&r2=39668&view=diff

==============================================================================
--- cfe/cfe/trunk/CodeGen/CodeGenTypes.cpp (original)
+++ cfe/cfe/trunk/CodeGen/CodeGenTypes.cpp Wed Jul 11 11:46:56 2007
@@ -61,10 +61,23 @@
     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;
   }

Modified: cfe/cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=39668&r1=39667&r2=39668&view=diff

==============================================================================
--- cfe/cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/cfe/trunk/clang.xcodeproj/project.pbxproj Wed Jul 11 11:46:56 2007
@@ -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>"; };





More information about the cfe-commits mailing list