projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3987f8e
)
Don't create a whole new string just to copy the elements into it.
author
Owen Anderson
<resistor@mac.com>
Thu, 26 Jun 2008 17:06:02 +0000
(17:06 +0000)
committer
Owen Anderson
<resistor@mac.com>
Thu, 26 Jun 2008 17:06:02 +0000
(17:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52785
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/MachineModuleInfo.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/MachineModuleInfo.cpp
b/lib/CodeGen/MachineModuleInfo.cpp
index 1720745e4459fede06d5fbbd7a370ad2b9e71419..60526643fdfc68c4cfbf8febef734ed46cf3e20e 100644
(file)
--- a/
lib/CodeGen/MachineModuleInfo.cpp
+++ b/
lib/CodeGen/MachineModuleInfo.cpp
@@
-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++);