LTO: call getRealLinkageName on IRNames before feeding to getGUID
authorBob Haarman <llvm@inglorion.net>
Fri, 31 Mar 2017 21:56:30 +0000 (21:56 +0000)
committerBob Haarman <llvm@inglorion.net>
Fri, 31 Mar 2017 21:56:30 +0000 (21:56 +0000)
commitd6aea71957abee564b16990207b608d9a5d9d3c8
tree2235cfb6211d9de46594f4bbd76c7693f7e5b3c7
parente625d742714f4f5a866685575702f2a1273a8494
LTO: call getRealLinkageName on IRNames before feeding to getGUID

Summary: GlobalValue has two getGUID methods: an instance method and a static method. The static method takes a string, which is expected to be what GlobalValue::getRealLinkageName() would return. In LTO.cpp, we were not doing this consistently, sometimes passing an IR name instead. This change makes it so that we call getRealLinkageName() first, making the static getGUID return value consistent with the instance method. Without this change, compiling FileCheck with ThinLTO on Windows fails with numerous undefined symbol errors. With the change, it builds successfully.

Reviewers: pcc, rnk

Reviewed By: pcc

Subscribers: tejohnson, mehdi_amini, llvm-commits

Differential Revision: https://reviews.llvm.org/D31444

llvm-svn: 299268
llvm/lib/LTO/LTO.cpp