From b2e062c9d5a684692352a4f00cc2de191ede8783 Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Sun, 14 Nov 2004 21:02:55 +0000 Subject: Mark an unmaterialized function as having GhostLinkage llvm-svn: 17748 --- llvm/lib/Bytecode/Reader/Reader.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/Bytecode/Reader') diff --git a/llvm/lib/Bytecode/Reader/Reader.cpp b/llvm/lib/Bytecode/Reader/Reader.cpp index 18399c1db39..0984e8e0736 100644 --- a/llvm/lib/Bytecode/Reader/Reader.cpp +++ b/llvm/lib/Bytecode/Reader/Reader.cpp @@ -1735,6 +1735,10 @@ void BytecodeReader::ParseFunctionLazily() { // Save the information for future reading of the function LazyFunctionLoadMap[Func] = LazyFunctionInfo(BlockStart, BlockEnd); + // This function has a body but it's not loaded so it appears `External'. + // Mark it as a `Ghost' instead to notify the users that it has a body. + Func->setLinkage(GlobalValue::GhostLinkage); + // Pretend we've `parsed' this function At = BlockEnd; } -- cgit v1.2.3