From 43a6f2e332eb54796a2e85188aa89c0dfee03ef3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 29 Oct 2001 16:55:41 +0000 Subject: [PATCH] Pull method symbols over when linking. Otherwise the result of the link will appear stripped git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1033 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Linker/LinkModules.cpp | 1 + lib/Transforms/Utils/Linker.cpp | 1 + lib/VMCore/Linker.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index 3e8a35cde4e..3cb1ffecd26 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -260,6 +260,7 @@ static bool LinkMethodBody(Method *Dest, const Method *Src, II != IE; ++II) { const Instruction *SI = *II; Instruction *DI = SI->clone(); + DI->setName(SI->getName()); DBB->getInstList().push_back(DI); LocalMap.insert(make_pair(SI, DI)); } diff --git a/lib/Transforms/Utils/Linker.cpp b/lib/Transforms/Utils/Linker.cpp index 3e8a35cde4e..3cb1ffecd26 100644 --- a/lib/Transforms/Utils/Linker.cpp +++ b/lib/Transforms/Utils/Linker.cpp @@ -260,6 +260,7 @@ static bool LinkMethodBody(Method *Dest, const Method *Src, II != IE; ++II) { const Instruction *SI = *II; Instruction *DI = SI->clone(); + DI->setName(SI->getName()); DBB->getInstList().push_back(DI); LocalMap.insert(make_pair(SI, DI)); } diff --git a/lib/VMCore/Linker.cpp b/lib/VMCore/Linker.cpp index 3e8a35cde4e..3cb1ffecd26 100644 --- a/lib/VMCore/Linker.cpp +++ b/lib/VMCore/Linker.cpp @@ -260,6 +260,7 @@ static bool LinkMethodBody(Method *Dest, const Method *Src, II != IE; ++II) { const Instruction *SI = *II; Instruction *DI = SI->clone(); + DI->setName(SI->getName()); DBB->getInstList().push_back(DI); LocalMap.insert(make_pair(SI, DI)); } -- 2.34.1