Diff of /cmajor++/Llvm/Llvm.Ir/Metadata.hpp [r402] .. [r403]  Maximize  Restore

Switch to side-by-side view

--- a/cmajor++/Llvm/Llvm.Ir/Metadata.hpp
+++ b/cmajor++/Llvm/Llvm.Ir/Metadata.hpp
@@ -20,39 +20,57 @@
 {
 public:
     MetadataString(const std::string& value_);
+    virtual void InitTo(Emitter& emitter, TypePtr type, ObjectPtr to);
+    virtual void InitFrom(Emitter& emitter, TypePtr type, Constant& constant);
+    virtual void InitFrom(Emitter& emitter, TypePtr type, Global& global);
+    virtual void InitFrom(Emitter& emitter, TypePtr type, RegVar& regVar);
+    virtual void InitFrom(Emitter& emitter, TypePtr type, StackVar& stackVar);
+    virtual void InitFrom(Emitter& emitter, TypePtr type, MemberVar& memberVar);
+    virtual void InitFrom(Emitter& emitter, TypePtr type, RefVar& refVar);
+    virtual void InitFrom(Emitter& emitter, TypePtr type, Parameter& parameter);
+    virtual void AssignTo(Emitter& emitter, TypePtr type, ObjectPtr to);
+    virtual void AssignFrom(Emitter& emitter, TypePtr type, Constant& constant);
+    virtual void AssignFrom(Emitter& emitter, TypePtr type, Global& global);
+    virtual void AssignFrom(Emitter& emitter, TypePtr type, RegVar& regVar);
+    virtual void AssignFrom(Emitter& emitter, TypePtr type, StackVar& stackVar);
+    virtual void AssignFrom(Emitter& emitter, TypePtr type, MemberVar& memberVar);
+    virtual void AssignFrom(Emitter& emitter, TypePtr type, RefVar& refVar);
+    virtual void AssignFrom(Emitter& emitter, TypePtr type, Parameter& parameter);
 };
+
+typedef MetadataString* MetadataStringPtr;
 
 class MetadataNode: public Object
 {
 public:
-    MetadataNode();
+    MetadataNode(int id_);
     void AddToContent(ObjectPtr object);
     void Write(CodeFormatter& formatter);
+    virtual void InitTo(Emitter& emitter, TypePtr type, ObjectPtr to);
+    virtual void InitFrom(Emitter& emitter, TypePtr type, Constant& constant);
+    virtual void InitFrom(Emitter& emitter, TypePtr type, Global& global);
+    virtual void InitFrom(Emitter& emitter, TypePtr type, RegVar& regVar);
+    virtual void InitFrom(Emitter& emitter, TypePtr type, StackVar& stackVar);
+    virtual void InitFrom(Emitter& emitter, TypePtr type, MemberVar& memberVar);
+    virtual void InitFrom(Emitter& emitter, TypePtr type, RefVar& refVar);
+    virtual void InitFrom(Emitter& emitter, TypePtr type, Parameter& parameter);
+    virtual void AssignTo(Emitter& emitter, TypePtr type, ObjectPtr to);
+    virtual void AssignFrom(Emitter& emitter, TypePtr type, Constant& constant);
+    virtual void AssignFrom(Emitter& emitter, TypePtr type, Global& global);
+    virtual void AssignFrom(Emitter& emitter, TypePtr type, RegVar& regVar);
+    virtual void AssignFrom(Emitter& emitter, TypePtr type, StackVar& stackVar);
+    virtual void AssignFrom(Emitter& emitter, TypePtr type, MemberVar& memberVar);
+    virtual void AssignFrom(Emitter& emitter, TypePtr type, RefVar& refVar);
+    virtual void AssignFrom(Emitter& emitter, TypePtr type, Parameter& parameter);
+    int Id() const { return id; }
 private:
+    int id;
     std::vector<ObjectPtr> content;
     std::vector<UniqueObjectPtr> ownedContent;
 };
 
 typedef MetadataNode* MetadataNodePtr;
-
 typedef std::unique_ptr<MetadataNode> UniqueMetadataNodePtr;
-
-class MetadataNodeRef: public Object
-{
-public:
-    MetadataNodeRef(const std::string& nodeId_);
-};
-
-class MetadataClause
-{
-public:
-    MetadataClause(const std::string& id_, MetadataNodePtr metadataNode_);
-    void Write(CodeFormatter& formatter);
-private:
-    std::string id;
-    MetadataNodePtr metadataNode;
-    UniqueMetadataNodePtr ownedMetadataNode;
-};
 
 } } // namespace Llvm::Ir
 

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks