[llvm-commits] CVS: llvm/lib/Target/SparcV9/InternalGlobalMapper.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Tue Jun 8 15:09:02 PDT 2004


Changes in directory llvm/lib/Target/SparcV9:

InternalGlobalMapper.cpp updated: 1.1 -> 1.2

---
Log message:

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).


---
Diffs of the changes:  (+4 -0)

Index: llvm/lib/Target/SparcV9/InternalGlobalMapper.cpp
diff -u llvm/lib/Target/SparcV9/InternalGlobalMapper.cpp:1.1 llvm/lib/Target/SparcV9/InternalGlobalMapper.cpp:1.2
--- llvm/lib/Target/SparcV9/InternalGlobalMapper.cpp:1.1	Thu Jun  3 00:03:37 2004
+++ llvm/lib/Target/SparcV9/InternalGlobalMapper.cpp	Tue Jun  8 15:08:30 2004
@@ -54,6 +54,10 @@
   // 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);
 





More information about the llvm-commits mailing list