aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/DIBuilder.h
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-12-08 20:42:44 +0000
committerDevang Patel <dpatel@apple.com>2010-12-08 20:42:44 +0000
commit44498a640daa827220bc4758770190318f0ec69f (patch)
tree583e382914fed153bf524ce6ee8d1387a7197a2e /include/llvm/Analysis/DIBuilder.h
parent0c2c217244573cdfb4be8b7fa62670412b4c1e71 (diff)
downloadexternal_llvm-44498a640daa827220bc4758770190318f0ec69f.tar.gz
external_llvm-44498a640daa827220bc4758770190318f0ec69f.tar.bz2
external_llvm-44498a640daa827220bc4758770190318f0ec69f.zip
Add support to create debug info for functions and methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121281 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/DIBuilder.h')
-rw-r--r--include/llvm/Analysis/DIBuilder.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/include/llvm/Analysis/DIBuilder.h b/include/llvm/Analysis/DIBuilder.h
index 0140f9313c..2fb9ed0e96 100644
--- a/include/llvm/Analysis/DIBuilder.h
+++ b/include/llvm/Analysis/DIBuilder.h
@@ -37,6 +37,7 @@ namespace llvm {
class DIVariable;
class DISubrange;
class DILexicalBlock;
+ class DISubprogram;
class DIBuilder {
private:
@@ -315,6 +316,57 @@ namespace llvm {
DIType Ty, Value *const *Addr,
unsigned NumAddr);
+ /// CreateFunction - Create a new descriptor for the specified subprogram.
+ /// See comments in DISubprogram for descriptions of these fields.
+ /// @param Scope Function scope.
+ /// @param Name Function name.
+ /// @param LinkageName Mangled function name.
+ /// @param File File where this variable is defined.
+ /// @param LineNo Line number.
+ /// @param Ty Function type.
+ /// @param isLocalToUnit True if this function is not externally visible..
+ /// @param isDefinition True if this is a function definition.
+ /// @param Flags e.g. is this function prototyped or not.
+ /// This flags are used to emit dwarf attributes.
+ /// @param isOptimized True if optimization is ON.
+ /// @param Fn llvm::Function pointer.
+ DISubprogram CreateFunction(DIDescriptor Scope, StringRef Name,
+ StringRef LinkageName,
+ DIFile File, unsigned LineNo,
+ DIType Ty, bool isLocalToUnit,
+ bool isDefinition,
+ unsigned Flags = 0,
+ bool isOptimized = false,
+ Function *Fn = 0);
+
+ /// CreateMethod - Create a new descriptor for the specified C++ method.
+ /// See comments in DISubprogram for descriptions of these fields.
+ /// @param Scope Function scope.
+ /// @param Name Function name.
+ /// @param LinkageName Mangled function name.
+ /// @param File File where this variable is defined.
+ /// @param LineNo Line number.
+ /// @param Ty Function type.
+ /// @param isLocalToUnit True if this function is not externally visible..
+ /// @param isDefinition True if this is a function definition.
+ /// @param Virtuality Attributes describing virutallness. e.g. pure
+ /// virtual function.
+ /// @param VTableIndex Index no of this method in virtual table.
+ /// @param VTableHolder Type that holds vtable.
+ /// @param Flags e.g. is this function prototyped or not.
+ /// This flags are used to emit dwarf attributes.
+ /// @param isOptimized True if optimization is ON.
+ /// @param Fn llvm::Function pointer.
+ DISubprogram CreateMethod(DIDescriptor Scope, StringRef Name,
+ StringRef LinkageName,
+ DIFile File, unsigned LineNo,
+ DIType Ty, bool isLocalToUnit,
+ bool isDefinition,
+ unsigned Virtuality = 0, unsigned VTableIndex = 0,
+ MDNode *VTableHolder = 0,
+ unsigned Flags = 0,
+ bool isOptimized = false,
+ Function *Fn = 0);
/// CreateNameSpace - This creates new descriptor for a namespace
/// with the specified parent scope.