[vmkit-commits] [vmkit] r140949 - /vmkit/trunk/lib/Mvm/StaticGCPrinter/VmkitGCPrinter.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Sat Oct 1 08:08:46 PDT 2011
Author: geoffray
Date: Sat Oct 1 10:08:41 2011
New Revision: 140949
URL: http://llvm.org/viewvc/llvm-project?rev=140949&view=rev
Log:
Use std::string, instead of StringRef.
Modified:
vmkit/trunk/lib/Mvm/StaticGCPrinter/VmkitGCPrinter.cpp
Modified: vmkit/trunk/lib/Mvm/StaticGCPrinter/VmkitGCPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/StaticGCPrinter/VmkitGCPrinter.cpp?rev=140949&r1=140948&r2=140949&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/StaticGCPrinter/VmkitGCPrinter.cpp (original)
+++ vmkit/trunk/lib/Mvm/StaticGCPrinter/VmkitGCPrinter.cpp Sat Oct 1 10:08:41 2011
@@ -201,11 +201,11 @@
StringRef name = F.getName();
if (name.startswith("JnJVM")) {
// Metadata for customized methods.
- StringRef methods = name.substr(0, name.find("__"));
- StringRef methodName = name.substr(methods.rfind('_') + 1);
+ std::string methods = name.substr(0, name.find("__"));
+ std::string methodName = name.substr(methods.rfind('_') + 1);
methodName = methodName.substr(0, methodName.rfind("__"));
methods = methods.substr(6, methods.rfind('_') - 5);
- methods = std::string(methods) + "VirtualMethods";
+ methods = methods + "VirtualMethods";
Constant* VirtualMethods = cast<Constant>(F.getParent()->getNamedValue(methods));
assert(VirtualMethods);
Constant* MethodsArray = cast<Constant>(VirtualMethods->getOperand(0));
More information about the vmkit-commits
mailing list