[LTO] Avoid calling GlobalValue::getGUID (MD5) twice

llvm-svn: 371593
This commit is contained in:
Fangrui Song 2019-09-11 07:38:21 +00:00
parent c161653f4c
commit 41ef1c755f

View File

@ -907,8 +907,7 @@ Error LTO::run(AddStreamFn AddStream, NativeObjectCache Cache) {
GlobalValue::dropLLVMManglingEscape(Res.second.IRName));
if (Res.second.VisibleOutsideSummary && Res.second.Prevailing)
GUIDPreservedSymbols.insert(GlobalValue::getGUID(
GlobalValue::dropLLVMManglingEscape(Res.second.IRName)));
GUIDPreservedSymbols.insert(GUID);
GUIDPrevailingResolutions[GUID] =
Res.second.Prevailing ? PrevailingType::Yes : PrevailingType::No;