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
This commit is contained in:
Brian Gaeke 2004-06-08 20:08:30 +00:00
parent 0bbcd6bfd1
commit 8e6e7c90ce

View File

@ -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);