Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK in bitcode file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76834 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2009-07-23 01:07:34 +00:00
parent 0aaf4e91c2
commit 104cf9e02b
17 changed files with 109 additions and 154 deletions

View File

@@ -46,8 +46,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, Constant *> MetadataCache;
std::map<unsigned, std::pair<Constant *, LocTy> > ForwardRefMDNodes;
std::map<unsigned, MetadataBase *> MetadataCache;
std::map<unsigned, std::pair<MetadataBase *, LocTy> > ForwardRefMDNodes;
struct UpRefRecord {
/// Loc - This is the location of the upref.
@@ -149,7 +149,7 @@ namespace llvm {
bool ParseAlias(const std::string &Name, LocTy Loc, unsigned Visibility);
bool ParseStandaloneMetadata();
bool ParseMDString(MetadataBase *&S);
bool ParseMDNode(Constant *&N);
bool ParseMDNode(MetadataBase *&N);
// Type Parsing.
bool ParseType(PATypeHolder &Result, bool AllowVoid = false);