DI: Reverse direction of subprogram -> function edge.
[oota-llvm.git] / include / llvm / IR / DIBuilder.h
index b957704b8b8b640564aaf8bad2f69b01906f0968..ae2330a667a24c804e39696a70af0ba1a5d7d15f 100644 (file)
@@ -515,14 +515,15 @@ namespace llvm {
     ///                      These flags are used to emit dwarf attributes.
     /// \param isOptimized   True if optimization is ON.
     /// \param Fn            llvm::Function pointer.
-    /// \param TParam        Function template parameters.
-    DISubprogram *
-    createFunction(DIScope *Scope, StringRef Name, StringRef LinkageName,
-                   DIFile *File, unsigned LineNo, DISubroutineType *Ty,
-                   bool isLocalToUnit, bool isDefinition, unsigned ScopeLine,
-                   unsigned Flags = 0, bool isOptimized = false,
-                   Function *Fn = nullptr, MDNode *TParam = nullptr,
-                   MDNode *Decl = nullptr);
+    /// \param TParams       Function template parameters.
+    DISubprogram *createFunction(DIScope *Scope, StringRef Name,
+                                 StringRef LinkageName, DIFile *File,
+                                 unsigned LineNo, DISubroutineType *Ty,
+                                 bool isLocalToUnit, bool isDefinition,
+                                 unsigned ScopeLine, unsigned Flags = 0,
+                                 bool isOptimized = false,
+                                 DITemplateParameterArray TParams = nullptr,
+                                 DISubprogram *Decl = nullptr);
 
     /// Identical to createFunction,
     /// except that the resulting DbgNode is meant to be RAUWed.
@@ -530,18 +531,19 @@ namespace llvm {
         DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File,
         unsigned LineNo, DISubroutineType *Ty, bool isLocalToUnit,
         bool isDefinition, unsigned ScopeLine, unsigned Flags = 0,
-        bool isOptimized = false, Function *Fn = nullptr,
-        MDNode *TParam = nullptr, MDNode *Decl = nullptr);
+        bool isOptimized = false, DITemplateParameterArray TParams = nullptr,
+        DISubprogram *Decl = nullptr);
 
     /// FIXME: this is added for dragonegg. Once we update dragonegg
     /// to call resolve function, this will be removed.
-    DISubprogram *
-    createFunction(DIScopeRef Scope, StringRef Name, StringRef LinkageName,
-                   DIFile *File, unsigned LineNo, DISubroutineType *Ty,
-                   bool isLocalToUnit, bool isDefinition, unsigned ScopeLine,
-                   unsigned Flags = 0, bool isOptimized = false,
-                   Function *Fn = nullptr, MDNode *TParam = nullptr,
-                   MDNode *Decl = nullptr);
+    DISubprogram *createFunction(DIScopeRef Scope, StringRef Name,
+                                 StringRef LinkageName, DIFile *File,
+                                 unsigned LineNo, DISubroutineType *Ty,
+                                 bool isLocalToUnit, bool isDefinition,
+                                 unsigned ScopeLine, unsigned Flags = 0,
+                                 bool isOptimized = false,
+                                 DITemplateParameterArray TParams = nullptr,
+                                 DISubprogram *Decl = nullptr);
 
     /// Create a new descriptor for the specified C++ method.
     /// See comments in \a DISubprogram* for descriptions of these fields.
@@ -561,14 +563,14 @@ namespace llvm {
     ///                      This flags are used to emit dwarf attributes.
     /// \param isOptimized   True if optimization is ON.
     /// \param Fn            llvm::Function pointer.
-    /// \param TParam        Function template parameters.
+    /// \param TParams       Function template parameters.
     DISubprogram *
     createMethod(DIScope *Scope, StringRef Name, StringRef LinkageName,
                  DIFile *File, unsigned LineNo, DISubroutineType *Ty,
                  bool isLocalToUnit, bool isDefinition, unsigned Virtuality = 0,
                  unsigned VTableIndex = 0, DIType *VTableHolder = nullptr,
                  unsigned Flags = 0, bool isOptimized = false,
-                 Function *Fn = nullptr, MDNode *TParam = nullptr);
+                 DITemplateParameterArray TParams = nullptr);
 
     /// This creates new descriptor for a namespace with the specified
     /// parent scope.