[llvm-commits] CVS: llvm/lib/VMCore/Type.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Jul 13 13:10:01 PDT 2004



Changes in directory llvm/lib/VMCore:

Type.cpp updated: 1.110 -> 1.111

---
Log message:

Catch aggregates passed by value sooner rather than later.


---
Diffs of the changes:  (+3 -0)

Index: llvm/lib/VMCore/Type.cpp
diff -u llvm/lib/VMCore/Type.cpp:1.110 llvm/lib/VMCore/Type.cpp:1.111
--- llvm/lib/VMCore/Type.cpp:1.110	Fri Jul  9 11:47:54 2004
+++ llvm/lib/VMCore/Type.cpp	Tue Jul 13 15:09:51 2004
@@ -364,6 +364,9 @@
   ContainedTys.push_back(PATypeHandle(Result, this));
 
   for (unsigned i = 0; i != Params.size(); ++i) {
+    assert((Params[i]->isFirstClassType() || isa<OpaqueType>(Params[i])) &&
+           "Function arguments must be value types!");
+
     ContainedTys.push_back(PATypeHandle(Params[i], this));
     isAbstract |= Params[i]->isAbstract();
   }





More information about the llvm-commits mailing list