CodeGen: Push the ModuleSlotTracker through Metadata
[oota-llvm.git] / include / llvm / IR / ModuleSlotTracker.h
index 995467edf36dc5f4deebad9ebc888284940c1ff9..c37dcecf8e4022375dd6719c7cdcb9220c937cb0 100644 (file)
@@ -41,8 +41,13 @@ public:
 
   /// Construct a slot tracker from a module.
   ///
-  /// If \a M is \c nullptr, uses a null slot tracker.
-  explicit ModuleSlotTracker(const Module *M);
+  /// If \a M is \c nullptr, uses a null slot tracker.  Otherwise, initializes
+  /// a slot tracker, and initializes all metadata slots.  \c
+  /// ShouldInitializeAllMetadata defaults to true because this is expected to
+  /// be shared between multiple callers, and otherwise MDNode references will
+  /// not match up.
+  explicit ModuleSlotTracker(const Module *M,
+                             bool ShouldInitializeAllMetadata = true);
 
   /// Destructor to clean up storage.
   ~ModuleSlotTracker();