clean up some really strange code.
[oota-llvm.git] / lib / AsmParser / LLParser.h
index eec524a5e65f282ae120f7a8f2762175850a9208..f56207a443c1d2f6058dcc2b65a04a55ed41e4d7 100644 (file)
@@ -17,8 +17,8 @@
 #include "LLLexer.h"
 #include "llvm/Module.h"
 #include "llvm/Type.h"
-#include <map>
 #include "llvm/Support/ValueHandle.h"
+#include <map>
 
 namespace llvm {
   class Module;
@@ -80,8 +80,8 @@ namespace llvm {
     std::map<unsigned, std::pair<PATypeHolder, LocTy> > ForwardRefTypeIDs;
     std::vector<PATypeHolder> NumberedTypes;
     /// MetadataCache - This map keeps track of parsed metadata constants.
-    std::map<unsigned, WeakVH> MetadataCache;
-    std::map<unsigned, std::pair<WeakVH, LocTy> > ForwardRefMDNodes;
+    std::map<unsigned, TrackingVH<MDNode> > MetadataCache;
+    std::map<unsigned, std::pair<TrackingVH<MDNode>, LocTy> > ForwardRefMDNodes;
     SmallVector<std::pair<unsigned, MDNode *>, 2> MDsOnInst;
     struct UpRefRecord {
       /// Loc - This is the location of the upref.
@@ -193,8 +193,8 @@ namespace llvm {
     bool ParseAlias(const std::string &Name, LocTy Loc, unsigned Visibility);
     bool ParseStandaloneMetadata();
     bool ParseNamedMetadata();
-    bool ParseMDString(MetadataBase *&S);
-    bool ParseMDNode(MetadataBase *&N);
+    bool ParseMDString(MDString *&Result);
+    bool ParseMDNode(MDNode *&Result);
 
     // Type Parsing.
     bool ParseType(PATypeHolder &Result, bool AllowVoid = false);