diff options
Diffstat (limited to 'lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r-- | lib/CodeGen/MachineModuleInfo.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp index 1720745e44..60526643fd 100644 --- 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++); |