[llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Oct 9 15:32:01 PDT 2003
Changes in directory llvm/lib/ExecutionEngine/Interpreter:
ExternalFunctions.cpp updated: 1.58 -> 1.59
---
Log message:
Do not read past the end of the contained type list
---
Diffs of the changes: (+2 -2)
Index: llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
diff -u llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.58 llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.59
--- llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.58 Fri Sep 5 13:42:00 2003
+++ llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp Thu Oct 9 15:31:18 2003
@@ -57,8 +57,8 @@
// composite function name should be.
std::string ExtName = "lle_";
const FunctionType *MT = M->getFunctionType();
- for (unsigned i = 0; const Type *Ty = MT->getContainedType(i); ++i)
- ExtName += getTypeID(Ty);
+ for (unsigned i = 0, e = MT->getNumContainedTypes(); i != e; ++i)
+ ExtName += getTypeID(MT->getContainedType(i));
ExtName += "_" + M->getName();
//std::cout << "Tried: '" << ExtName << "'\n";
More information about the llvm-commits
mailing list