From fc2edad4ae6d4e69732b2d400e299d5598ba3e9d Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Wed, 7 May 2008 22:54:15 +0000 Subject: Turn StripPointerCast() into a method llvm-svn: 50836 --- llvm/lib/Linker/LinkModules.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Linker/LinkModules.cpp') diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp index ddc9081d654..57df01495b7 100644 --- a/llvm/lib/Linker/LinkModules.cpp +++ b/llvm/lib/Linker/LinkModules.cpp @@ -758,7 +758,8 @@ static bool LinkGlobalInits(Module *Dest, const Module *Src, Constant *SInit = cast(RemapOperand(SGV->getInitializer(), ValueMap)); - GlobalVariable *DGV = cast(StripPointerCasts(ValueMap[SGV])); + GlobalVariable *DGV = + cast(ValueMap[SGV]->stripPointerCasts()); if (DGV->hasInitializer()) { if (SGV->hasExternalLinkage()) { if (DGV->getInitializer() != SInit) -- cgit v1.2.3