[llvm-branch-commits] [cfe-branch] r134791 - /cfe/branches/type-system-rewrite/lib/CodeGen/CodeGenModule.cpp

Chris Lattner sabre at nondot.org
Fri Jul 8 22:09:15 PDT 2011


Author: lattner
Date: Sat Jul  9 00:09:15 2011
New Revision: 134791

URL: http://llvm.org/viewvc/llvm-project?rev=134791&view=rev
Log:
with a previous change, this code goes back to being simple.  We fudge unconvertible
function types with {} not with void.

Modified:
    cfe/branches/type-system-rewrite/lib/CodeGen/CodeGenModule.cpp

Modified: cfe/branches/type-system-rewrite/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/type-system-rewrite/lib/CodeGen/CodeGenModule.cpp?rev=134791&r1=134790&r2=134791&view=diff
==============================================================================
--- cfe/branches/type-system-rewrite/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/branches/type-system-rewrite/lib/CodeGen/CodeGenModule.cpp Sat Jul  9 00:09:15 2011
@@ -856,15 +856,8 @@
     if (Entry->getType()->getElementType() == Ty)
       return Entry;
 
-#if 0
     // Make sure the result is of the correct type.
-    const llvm::Type *PTy =
-      llvm::PointerType::getUnqual(Ty->isVoidTy() ? Int8Ty : Ty);
-    return llvm::ConstantExpr::getBitCast(Entry, PTy);
-#else
-    abort();
-    return Entry;
-#endif
+    return llvm::ConstantExpr::getBitCast(Entry, Ty->getPointerTo());
   }
 
   // This function doesn't have a complete type (for example, the return





More information about the llvm-branch-commits mailing list