Don't create a whole new string just to copy the elements into it.
llvm-svn: 52785
This commit is contained in:
parent
1fb47ad928
commit
7df0d58535
|
@ -231,11 +231,9 @@ public:
|
||||||
}
|
}
|
||||||
virtual void Apply(std::string &Field) {
|
virtual void Apply(std::string &Field) {
|
||||||
Constant *C = CI->getOperand(I++);
|
Constant *C = CI->getOperand(I++);
|
||||||
std::string S;
|
// Fills in the string if it succeeds
|
||||||
if (GetConstantStringInfo(C, S))
|
if (!GetConstantStringInfo(C, Field))
|
||||||
Field = S;
|
Field.clear();
|
||||||
else
|
|
||||||
Field = "";
|
|
||||||
}
|
}
|
||||||
virtual void Apply(DebugInfoDesc *&Field) {
|
virtual void Apply(DebugInfoDesc *&Field) {
|
||||||
Constant *C = CI->getOperand(I++);
|
Constant *C = CI->getOperand(I++);
|
||||||
|
|
Loading…
Reference in New Issue