Avoid extra string copy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29684 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2006-08-14 23:27:36 +00:00
parent 9977ea6f33
commit 64d128de9c

View File

@ -55,8 +55,9 @@ namespace llvm {
LTOLinkageTypes getLinkage() const { return linkage; }
void mayBeNotUsed();
LLVMSymbol (enum LTOLinkageTypes lt, GlobalValue *g, std::string n,
std::string m) : linkage(lt), gv(g), name(n), mangledName(m) {}
LLVMSymbol (enum LTOLinkageTypes lt, GlobalValue *g, const std::string &n,
const std::string &m) : linkage(lt), gv(g), name(n),
mangledName(m) {}
const char *getName() { return name.c_str(); }
const char *getMangledName() { return mangledName.c_str(); }