[llvm-commits] [llvm] r69935 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp

Dan Gohman gohman at apple.com
Thu Apr 23 15:50:03 PDT 2009


Author: djg
Date: Thu Apr 23 17:50:03 2009
New Revision: 69935

URL: http://llvm.org/viewvc/llvm-project?rev=69935&view=rev
Log:
Handle Void types in ComputeValueVTs. This doesn't currently occur,
but this change makes the code more general and easier to adapt for
new purposes.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=69935&r1=69934&r2=69935&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Thu Apr 23 17:50:03 2009
@@ -135,6 +135,9 @@
                       StartingOffset + i * EltSize);
     return;
   }
+  // Interpret void as zero return values.
+  if (Ty == Type::VoidTy)
+    return;
   // Base case: we can get an MVT for this LLVM IR type.
   ValueVTs.push_back(TLI.getValueType(Ty));
   if (Offsets)





More information about the llvm-commits mailing list