From: Brian Gaeke Date: Tue, 8 Jun 2004 20:08:30 +0000 (+0000) Subject: Fix a minor bug in the map - since this pass adds a global symbol, it must be X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=8e6e7c90ce5ecefb78637491ba40bf98c3ca1b67;p=oota-llvm.git Fix a minor bug in the map - since this pass adds a global symbol, it must be accounted for in the map (at least, in its current format). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14075 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/SparcV9/InternalGlobalMapper.cpp b/lib/Target/SparcV9/InternalGlobalMapper.cpp index 8df87fd0006..7d4a40a13be 100644 --- a/lib/Target/SparcV9/InternalGlobalMapper.cpp +++ b/lib/Target/SparcV9/InternalGlobalMapper.cpp @@ -54,6 +54,10 @@ bool InternalGlobalMapper::run (Module &M) { // Populate the vector with internal global values and their names. for (Module::giterator i = M.gbegin (), e = M.gend (); i != e; ++i) maybeAddInternalValueToVector (gvvector, *i); + // Add an extra global for _llvm_internalGlobals itself (null, + // because it's not internal) + gvvector.push_back (ConstantPointerNull::get + (PointerType::get (Type::SByteTy))); for (Module::iterator i = M.begin (), e = M.end (); i != e; ++i) maybeAddInternalValueToVector (gvvector, *i);