[llvm-commits] CVS: llvm-java/lib/ClassFile/ClassFile.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Wed Sep 15 13:26:43 PDT 2004
Changes in directory llvm-java/lib/ClassFile:
ClassFile.cpp updated: 1.27 -> 1.28
---
Log message:
Add helper method to get ConstantInterfanceMethodRef's from a classfile.
---
Diffs of the changes: (+8 -0)
Index: llvm-java/lib/ClassFile/ClassFile.cpp
diff -u llvm-java/lib/ClassFile/ClassFile.cpp:1.27 llvm-java/lib/ClassFile/ClassFile.cpp:1.28
--- llvm-java/lib/ClassFile/ClassFile.cpp:1.27 Mon Sep 13 20:04:42 2004
+++ llvm-java/lib/ClassFile/ClassFile.cpp Wed Sep 15 15:26:32 2004
@@ -272,6 +272,14 @@
return static_cast<ConstantMethodRef*>(getConstant(index));
}
+ConstantInterfaceMethodRef*
+ClassFile::getConstantInterfaceMethodRef(unsigned index) const
+{
+ assert(dynamic_cast<ConstantInterfaceMethodRef*>(getConstant(index)) &&
+ "Constant is not a ConstantInterfaceMethodRef!");
+ return static_cast<ConstantInterfaceMethodRef*>(getConstant(index));
+}
+
Method* ClassFile::getMethod(const std::string& nameAndDescr) const
{
Name2MethodMap::const_iterator it = n2mMap_.find(nameAndDescr);
More information about the llvm-commits
mailing list