add support for incorporating and purging functions to the value enumerator

llvm-svn: 36465
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.h b/llvm/lib/Bitcode/Writer/ValueEnumerator.h
index 83c2fb9..c0db9d9 100644
--- a/llvm/lib/Bitcode/Writer/ValueEnumerator.h
+++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.h
@@ -43,6 +43,9 @@
   ValueMapType ValueMap;
   ValueList Values;
   
+  /// When a function is incorporated, this is the size of the Values list
+  /// before incorporation.
+  unsigned ModuleLevel;
   
   ValueEnumerator(const ValueEnumerator &);  // DO NOT IMPLEMENT
   void operator=(const ValueEnumerator &);   // DO NOT IMPLEMENT
@@ -72,7 +75,7 @@
   /// incorporateFunction/purgeFunction - If you'd like to deal with a function,
   /// use these two methods to get its data into the ValueEnumerator!
   ///
-  void incorporateFunction(const Function *F);
+  void incorporateFunction(const Function &F);
   void purgeFunction();
 
 private: