summaryrefslogtreecommitdiff
path: root/lib/Target/MSIL
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-21 08:57:31 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-21 08:57:31 +0000
commitbda9653f5b7a3731803e58ef486687749310dd96 (patch)
tree39cabe2e192218fba49160d724a6a5c185a2bf72 /lib/Target/MSIL
parentfbee579ed46016166d88b4defb81a2e7e253062d (diff)
downloadllvm-bda9653f5b7a3731803e58ef486687749310dd96.tar.gz
llvm-bda9653f5b7a3731803e58ef486687749310dd96.tar.bz2
llvm-bda9653f5b7a3731803e58ef486687749310dd96.tar.xz
Switch this API to StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76554 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MSIL')
-rw-r--r--lib/Target/MSIL/MSILWriter.cpp9
-rw-r--r--lib/Target/MSIL/MSILWriter.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/Target/MSIL/MSILWriter.cpp b/lib/Target/MSIL/MSILWriter.cpp
index af5e722b90..ad0364907f 100644
--- a/lib/Target/MSIL/MSILWriter.cpp
+++ b/lib/Target/MSIL/MSILWriter.cpp
@@ -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";
}
diff --git a/lib/Target/MSIL/MSILWriter.h b/lib/Target/MSIL/MSILWriter.h
index 0d0d0ff271..5dab0e8d33 100644
--- a/lib/Target/MSIL/MSILWriter.h
+++ b/lib/Target/MSIL/MSILWriter.h
@@ -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();