[cfe-commits] r39693 - /cfe/cfe/trunk/CodeGen/CodeGenTypes.cpp

clattner at cs.uiuc.edu clattner at cs.uiuc.edu
Wed Jul 11 09:47:14 PDT 2007


Author: clattner
Date: Wed Jul 11 11:47:13 2007
New Revision: 39693

URL: http://llvm.org/viewvc/llvm-project?rev=39693&view=rev
Log:
fix codegen of void-returning functions

Modified:
    cfe/cfe/trunk/CodeGen/CodeGenTypes.cpp

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

==============================================================================
--- cfe/cfe/trunk/CodeGen/CodeGenTypes.cpp (original)
+++ cfe/cfe/trunk/CodeGen/CodeGenTypes.cpp Wed Jul 11 11:47:13 2007
@@ -110,7 +110,7 @@
     std::vector<const llvm::Type*> ArgTys;
     
     // Struct return passes the struct byref.
-    if (!ResultType->isFirstClassType()) {
+    if (!ResultType->isFirstClassType() && ResultType != llvm::Type::VoidTy) {
       ArgTys.push_back(llvm::PointerType::get(ResultType));
       ResultType = llvm::Type::VoidTy;
     }





More information about the cfe-commits mailing list