Remove static global GCNames from Function.cpp and move it to the Context
[oota-llvm.git] / lib / IR / LLVMContextImpl.h
index a24114d0a0ae17715289c832b426c5a71d13259d..d42047d4e775945ee6a7b7f46a964736e5b18b8e 100644 (file)
@@ -1027,6 +1027,13 @@ public:
   void getOperandBundleTags(SmallVectorImpl<StringRef> &Tags) const;
   uint32_t getOperandBundleTagID(StringRef Tag) const;
 
+  /// Maintain the GC name for each function.
+  ///
+  /// This saves allocating an additional word in Function for programs which
+  /// do not use GC (i.e., most programs) at the cost of increased overhead for
+  /// clients which do use GC.
+  DenseMap<const Function*, std::string> GCNames;
+
   LLVMContextImpl(LLVMContext &C);
   ~LLVMContextImpl();