From d7401b35e3a4d08e43b4ab81dffd58099a37c90d Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sat, 12 Feb 2011 00:19:56 +0000 Subject: [PATCH] Fix a silly bug I introduced when dropping std::string. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125420 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/lto/LTOCodeGenerator.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index d102f6b899c..b2554f87b59 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -353,6 +353,7 @@ void LTOCodeGenerator::applyScopeRestrictions() { SmallString<64> Buffer; for (Module::iterator f = mergedModule->begin(), e = mergedModule->end(); f != e; ++f) { + Buffer.clear(); mangler.getNameWithPrefix(Buffer, f, false); if (!f->isDeclaration() && _mustPreserveSymbols.count(Buffer)) @@ -360,6 +361,7 @@ void LTOCodeGenerator::applyScopeRestrictions() { } for (Module::global_iterator v = mergedModule->global_begin(), e = mergedModule->global_end(); v != e; ++v) { + Buffer.clear(); mangler.getNameWithPrefix(Buffer, v, false); if (!v->isDeclaration() && _mustPreserveSymbols.count(Buffer))