Don't create a whole new string just to copy the elements into it.

llvm-svn: 52785
This commit is contained in:
Owen Anderson 2008-06-26 17:06:02 +00:00
parent 1fb47ad928
commit 7df0d58535
1 changed files with 3 additions and 5 deletions

View File

@ -231,11 +231,9 @@ public:
}
virtual void Apply(std::string &Field) {
Constant *C = CI->getOperand(I++);
std::string S;
if (GetConstantStringInfo(C, S))
Field = S;
else
Field = "";
// Fills in the string if it succeeds
if (!GetConstantStringInfo(C, Field))
Field.clear();
}
virtual void Apply(DebugInfoDesc *&Field) {
Constant *C = CI->getOperand(I++);