Implement function prefix data as an IR feature.
[oota-llvm.git] / lib / Bitcode / Writer / ValueEnumerator.cpp
index 8bac6da892858283fa7583b2bebac89730a1a86e..a1641043b22aaa715def57238ff80c6726d58885 100644 (file)
@@ -60,6 +60,11 @@ ValueEnumerator::ValueEnumerator(const Module *M) {
        I != E; ++I)
     EnumerateValue(I->getAliasee());
 
+  // Enumerate the prefix data constants.
+  for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I)
+    if (I->hasPrefixData())
+      EnumerateValue(I->getPrefixData());
+
   // Insert constants and metadata that are named at module level into the slot
   // pool so that the module symbol table can refer to them...
   EnumerateValueSymbolTable(M->getValueSymbolTable());