Switch this API to StringRef.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 21 Jul 2009 08:57:31 +0000 (08:57 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 21 Jul 2009 08:57:31 +0000 (08:57 +0000)
llvm-svn: 76554

llvm/lib/Target/MSIL/MSILWriter.cpp
llvm/lib/Target/MSIL/MSILWriter.h

index af5e722..ad03649 100644 (file)
@@ -1619,17 +1619,18 @@ void MSILWriter::printGlobalVariables() {
 
 
 const char* MSILWriter::getLibraryName(const Function* F) {
-  return getLibraryForSymbol(F->getName().c_str(), true, F->getCallingConv());
+  return getLibraryForSymbol(F->getName(), true, F->getCallingConv());
 }
 
 
 const char* MSILWriter::getLibraryName(const GlobalVariable* GV) {
-  return getLibraryForSymbol(Mang->getMangledName(GV).c_str(), false, 0);
+  return getLibraryForSymbol(Mang->getMangledName(GV), false, 0);
 }
 
 
-const char* MSILWriter::getLibraryForSymbol(const char* Name, bool isFunction,
-                                           unsigned CallingConv) {
+const char* MSILWriter::getLibraryForSymbol(const StringRef &Name, 
+                                            bool isFunction,
+                                            unsigned CallingConv) {
   // TODO: Read *.def file with function and libraries definitions.
   return "MSVCRT.DLL";  
 }
index 0d0d0ff..5dab0e8 100644 (file)
@@ -252,7 +252,7 @@ namespace {
 
     const char* getLibraryName(const GlobalVariable* GV); 
     
-    const char* getLibraryForSymbol(const char* Name, bool isFunction,
+    const char* getLibraryForSymbol(const StringRef &Name, bool isFunction,
                                     unsigned CallingConv);
 
     void printExternals();