116eeb6f5ebc978b03745177b9ac82684ab1c6932Bill Wendling//===--- llvm/DIBuilder.h - Debug Information Builder -----------*- C++ -*-===// 235fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel// 335fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel// The LLVM Compiler Infrastructure 435fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel// 535fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel// This file is distributed under the University of Illinois Open Source 635fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel// License. See LICENSE.TXT for details. 735fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel// 835fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel//===----------------------------------------------------------------------===// 935fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel// 1032dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher// This file defines a DIBuilder that is useful for creating debugging 1135fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel// information entries in LLVM IR form. 1235fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel// 1335fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel//===----------------------------------------------------------------------===// 1435fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel 15674be02d525d4e24bc6943ed9274958c580bcfbcJakub Staszak#ifndef LLVM_DIBUILDER_H 16674be02d525d4e24bc6943ed9274958c580bcfbcJakub Staszak#define LLVM_DIBUILDER_H 1735fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel 18685501836bc60f53892854253b5bbea6c48b6d7fJay Foad#include "llvm/ADT/ArrayRef.h" 1935fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel#include "llvm/ADT/StringRef.h" 20255f89faee13dc491cb64fbeae3c763e7e2ea4e6Chandler Carruth#include "llvm/Support/DataTypes.h" 2135fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel 2235fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patelnamespace llvm { 23fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel class BasicBlock; 24fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel class Instruction; 25fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel class Function; 2635fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel class Module; 27fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel class Value; 2835fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel class LLVMContext; 2935fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel class MDNode; 3035fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel class StringRef; 312ce067a9fb5b2d046c92519428cafa71fae81ed4David Blaikie class DIBasicType; 321fe3f9af7ff385c28b96cc46ee1ed3737c813c3aEric Christopher class DICompileUnit; 33d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie class DICompositeType; 34d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie class DIDerivedType; 3535fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel class DIDescriptor; 3635fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel class DIFile; 3735fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel class DIEnumerator; 3835fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel class DIType; 39fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel class DIArray; 40fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel class DIGlobalVariable; 4120d9e41ddb3f531267680819b5cac4cac1c6b231David Blaikie class DIImportedEntity; 42fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel class DINameSpace; 43fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel class DIVariable; 4443c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel class DISubrange; 456618a241f7ba2571a1a55b3733c4441d467baf42Eric Christopher class DILexicalBlockFile; 4643c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel class DILexicalBlock; 47c462db6d66e683fb837c03d661483106a869a407David Blaikie class DIScope; 4844498a640daa827220bc4758770190318f0ec69fDevang Patel class DISubprogram; 497e2cb116556e1153401cd6b94d0f51db978f6902Devang Patel class DITemplateTypeParameter; 50e7d93877c6e7029d27bfd1c137fceb472f81f390Devang Patel class DITemplateValueParameter; 511ea02d467a311b4846b942377d0b00fde987be65Devang Patel class DIObjCProperty; 5235fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel 5335fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel class DIBuilder { 5435fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel private: 5535fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel Module &M; 5635fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel LLVMContext & VMContext; 5735fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel 5894c7ddb6f52a5200983fed0ce74dc602a7737879Devang Patel MDNode *TempEnumTypes; 5994c7ddb6f52a5200983fed0ce74dc602a7737879Devang Patel MDNode *TempRetainTypes; 6094c7ddb6f52a5200983fed0ce74dc602a7737879Devang Patel MDNode *TempSubprograms; 6194c7ddb6f52a5200983fed0ce74dc602a7737879Devang Patel MDNode *TempGVs; 62c462db6d66e683fb837c03d661483106a869a407David Blaikie MDNode *TempImportedModules; 6394c7ddb6f52a5200983fed0ce74dc602a7737879Devang Patel 64fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel Function *DeclareFn; // llvm.dbg.declare 65fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel Function *ValueFn; // llvm.dbg.value 66fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel 6794c7ddb6f52a5200983fed0ce74dc602a7737879Devang Patel SmallVector<Value *, 4> AllEnumTypes; 6894c7ddb6f52a5200983fed0ce74dc602a7737879Devang Patel SmallVector<Value *, 4> AllRetainTypes; 6994c7ddb6f52a5200983fed0ce74dc602a7737879Devang Patel SmallVector<Value *, 4> AllSubprograms; 7094c7ddb6f52a5200983fed0ce74dc602a7737879Devang Patel SmallVector<Value *, 4> AllGVs; 71c462db6d66e683fb837c03d661483106a869a407David Blaikie SmallVector<Value *, 4> AllImportedModules; 7294c7ddb6f52a5200983fed0ce74dc602a7737879Devang Patel 73e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie DITemplateValueParameter 74e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie createTemplateValueParameter(unsigned Tag, DIDescriptor Scope, 75e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie StringRef Name, DIType Ty, Value *Val, 76e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie MDNode *File = 0, unsigned LineNo = 0, 77e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie unsigned ColumnNo = 0); 78e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie 799f9ce61972871efcf794bdc6125835c2c32cd863Craig Topper DIBuilder(const DIBuilder &) LLVM_DELETED_FUNCTION; 809f9ce61972871efcf794bdc6125835c2c32cd863Craig Topper void operator=(const DIBuilder &) LLVM_DELETED_FUNCTION; 8135fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel 8235fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel public: 8335fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel explicit DIBuilder(Module &M); 84dc8c3fdcf15a6fff6251a63869de718527c91940Devang Patel enum ComplexAddrKind { OpPlus=1, OpDeref }; 8535fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel 866326a4238df05dafd7547cfa2cd71111cd6702a6Devang Patel /// finalize - Construct any deferred debug info descriptors. 876326a4238df05dafd7547cfa2cd71111cd6702a6Devang Patel void finalize(); 886326a4238df05dafd7547cfa2cd71111cd6702a6Devang Patel 8950d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createCompileUnit - A CompileUnit provides an anchor for all debugging 9035fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel /// information generated during this instance of compilation. 912c4c6a5e8a17909af336e3cba3d71ac354d7d9b6Devang Patel /// @param Lang Source programming language, eg. dwarf::DW_LANG_C99 922c4c6a5e8a17909af336e3cba3d71ac354d7d9b6Devang Patel /// @param File File name 932c4c6a5e8a17909af336e3cba3d71ac354d7d9b6Devang Patel /// @param Dir Directory 9432dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher /// @param Producer String identify producer of debugging information. 952c4c6a5e8a17909af336e3cba3d71ac354d7d9b6Devang Patel /// Usuall this is a compiler version string. 962c4c6a5e8a17909af336e3cba3d71ac354d7d9b6Devang Patel /// @param isOptimized A boolean flag which indicates whether optimization 972c4c6a5e8a17909af336e3cba3d71ac354d7d9b6Devang Patel /// is ON or not. 9832dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher /// @param Flags This string lists command line options. This string is 992c4c6a5e8a17909af336e3cba3d71ac354d7d9b6Devang Patel /// directly embedded in debug info output which may be used 1002c4c6a5e8a17909af336e3cba3d71ac354d7d9b6Devang Patel /// by a tool analyzing generated debugging information. 10132dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher /// @param RV This indicates runtime version for languages like 1022c4c6a5e8a17909af336e3cba3d71ac354d7d9b6Devang Patel /// Objective-C. 103e4b67906d3cc5ea365359f9b034189aaa51ca1e9Eric Christopher /// @param SplitName The name of the file that we'll split debug info out 104e4b67906d3cc5ea365359f9b034189aaa51ca1e9Eric Christopher /// into. 1051fe3f9af7ff385c28b96cc46ee1ed3737c813c3aEric Christopher DICompileUnit createCompileUnit(unsigned Lang, StringRef File, 1061fe3f9af7ff385c28b96cc46ee1ed3737c813c3aEric Christopher StringRef Dir, StringRef Producer, 1071fe3f9af7ff385c28b96cc46ee1ed3737c813c3aEric Christopher bool isOptimized, StringRef Flags, 1081fe3f9af7ff385c28b96cc46ee1ed3737c813c3aEric Christopher unsigned RV, 1091fe3f9af7ff385c28b96cc46ee1ed3737c813c3aEric Christopher StringRef SplitName = StringRef()); 11035fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel 11150d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createFile - Create a file descriptor to hold debugging information 11235fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel /// for a file. 11350d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel DIFile createFile(StringRef Filename, StringRef Directory); 11432dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher 11550d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createEnumerator - Create a single enumerator value. 1168de0a465b832052d975dc9fdced1adcf3336fabcDavid Blaikie DIEnumerator createEnumerator(StringRef Name, int64_t Val); 11735fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel 11803ccdb5b1dbb95714f2fd86540292567c8442a6bPeter Collingbourne /// \brief Create a DWARF unspecified type. 11903ccdb5b1dbb95714f2fd86540292567c8442a6bPeter Collingbourne DIBasicType createUnspecifiedType(StringRef Name); 12003ccdb5b1dbb95714f2fd86540292567c8442a6bPeter Collingbourne 12103ccdb5b1dbb95714f2fd86540292567c8442a6bPeter Collingbourne /// \brief Create C++11 nullptr type. 12203ccdb5b1dbb95714f2fd86540292567c8442a6bPeter Collingbourne DIBasicType createNullPtrType(); 123734a67cda5a02be1654a2f89b811d7b6cbe3f5e5Devang Patel 12432dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher /// createBasicType - Create debugging information entry for a basic 1252c4c6a5e8a17909af336e3cba3d71ac354d7d9b6Devang Patel /// type. 1262c4c6a5e8a17909af336e3cba3d71ac354d7d9b6Devang Patel /// @param Name Type name. 1272c4c6a5e8a17909af336e3cba3d71ac354d7d9b6Devang Patel /// @param SizeInBits Size of the type. 1282c4c6a5e8a17909af336e3cba3d71ac354d7d9b6Devang Patel /// @param AlignInBits Type alignment. 1292c4c6a5e8a17909af336e3cba3d71ac354d7d9b6Devang Patel /// @param Encoding DWARF encoding code, e.g. dwarf::DW_ATE_float. 1302ce067a9fb5b2d046c92519428cafa71fae81ed4David Blaikie DIBasicType createBasicType(StringRef Name, uint64_t SizeInBits, 1312ce067a9fb5b2d046c92519428cafa71fae81ed4David Blaikie uint64_t AlignInBits, unsigned Encoding); 13235fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel 13350d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createQualifiedType - Create debugging information entry for a qualified 13435fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel /// type, e.g. 'const int'. 1352c4c6a5e8a17909af336e3cba3d71ac354d7d9b6Devang Patel /// @param Tag Tag identifing type, e.g. dwarf::TAG_volatile_type 1362c4c6a5e8a17909af336e3cba3d71ac354d7d9b6Devang Patel /// @param FromTy Base Type. 137d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie DIDerivedType createQualifiedType(unsigned Tag, DIType FromTy); 13835fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel 13950d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createPointerType - Create debugging information entry for a pointer. 140fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param PointeeTy Type pointed by this pointer. 141fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param SizeInBits Size. 142fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param AlignInBits Alignment. (optional) 143fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Name Pointer type name. (optional) 144d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie DIDerivedType 145d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie createPointerType(DIType PointeeTy, uint64_t SizeInBits, 146d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie uint64_t AlignInBits = 0, StringRef Name = StringRef()); 14735fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel 14862fdfb5fa7efdfd61339e4abe6fd87e60e939e58David Blaikie /// \brief Create debugging information entry for a pointer to member. 14962fdfb5fa7efdfd61339e4abe6fd87e60e939e58David Blaikie /// @param PointeeTy Type pointed to by this pointer. 15062fdfb5fa7efdfd61339e4abe6fd87e60e939e58David Blaikie /// @param Class Type for which this pointer points to members of. 151d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie DIDerivedType createMemberPointerType(DIType PointeeTy, DIType Class); 15262fdfb5fa7efdfd61339e4abe6fd87e60e939e58David Blaikie 15350d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createReferenceType - Create debugging information entry for a c++ 154791e629deef7e4a410e67527da26405916415d3aEric Christopher /// style reference or rvalue reference type. 155d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie DIDerivedType createReferenceType(unsigned Tag, DIType RTy); 15635fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel 15750d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createTypedef - Create debugging information entry for a typedef. 158fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Ty Original type. 159fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Name Typedef name. 160fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param File File where this type is defined. 161fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param LineNo Line number. 162da174c1d3b1fa31d7c5c47a645c66d600b4b7bd8Devang Patel /// @param Context The surrounding context for the typedef. 163d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie DIDerivedType createTypedef(DIType Ty, StringRef Name, DIFile File, 164d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie unsigned LineNo, DIDescriptor Context); 16535fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel 16650d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createFriend - Create debugging information entry for a 'friend'. 167576d49a775043931d81bba172b9b11f40d858cb6Manman Ren DIDerivedType createFriend(DIType Ty, DIType FriendTy); 16835fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel 16950d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createInheritance - Create debugging information entry to establish 1702c4c6a5e8a17909af336e3cba3d71ac354d7d9b6Devang Patel /// inheritance relationship between two types. 171fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Ty Original type. 172fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param BaseTy Base type. Ty is inherits from base. 173fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param BaseOffset Base offset. 17432dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher /// @param Flags Flags to describe inheritance attribute, 175fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// e.g. private 176d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie DIDerivedType createInheritance(DIType Ty, DIType BaseTy, 177d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie uint64_t BaseOffset, unsigned Flags); 17835fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel 17950d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createMemberType - Create debugging information entry for a member. 180fa3f9c001fe771af7dfcd7663b9d5dc345649d43Devang Patel /// @param Scope Member scope. 181fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Name Member name. 182fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param File File where this member is defined. 183fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param LineNo Line number. 184fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param SizeInBits Member size. 185fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param AlignInBits Member alignment. 186fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param OffsetInBits Member offset. 187fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Flags Flags to encode member attribute, e.g. private 188fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Ty Parent type. 189d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie DIDerivedType 190d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie createMemberType(DIDescriptor Scope, StringRef Name, DIFile File, 191d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie unsigned LineNo, uint64_t SizeInBits, uint64_t AlignInBits, 192d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie uint64_t OffsetInBits, unsigned Flags, DIType Ty); 19335fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel 1946b6061f01171bd3d4e32022efa45428d4f9941eeEric Christopher /// createStaticMemberType - Create debugging information entry for a 1956b6061f01171bd3d4e32022efa45428d4f9941eeEric Christopher /// C++ static data member. 1966b6061f01171bd3d4e32022efa45428d4f9941eeEric Christopher /// @param Scope Member scope. 1976b6061f01171bd3d4e32022efa45428d4f9941eeEric Christopher /// @param Name Member name. 1986b6061f01171bd3d4e32022efa45428d4f9941eeEric Christopher /// @param File File where this member is declared. 1996b6061f01171bd3d4e32022efa45428d4f9941eeEric Christopher /// @param LineNo Line number. 2006b6061f01171bd3d4e32022efa45428d4f9941eeEric Christopher /// @param Ty Type of the static member. 2016b6061f01171bd3d4e32022efa45428d4f9941eeEric Christopher /// @param Flags Flags to encode member attribute, e.g. private. 2026b6061f01171bd3d4e32022efa45428d4f9941eeEric Christopher /// @param Val Const initializer of the member. 203576d49a775043931d81bba172b9b11f40d858cb6Manman Ren DIDerivedType 204576d49a775043931d81bba172b9b11f40d858cb6Manman Ren createStaticMemberType(DIDescriptor Scope, StringRef Name, 205576d49a775043931d81bba172b9b11f40d858cb6Manman Ren DIFile File, unsigned LineNo, DIType Ty, 206576d49a775043931d81bba172b9b11f40d858cb6Manman Ren unsigned Flags, llvm::Value *Val); 2076b6061f01171bd3d4e32022efa45428d4f9941eeEric Christopher 208e9db5e29e3af91eec572bfeb8dcec908213298b0Devang Patel /// createObjCIVar - Create debugging information entry for Objective-C 209e9db5e29e3af91eec572bfeb8dcec908213298b0Devang Patel /// instance variable. 210e9db5e29e3af91eec572bfeb8dcec908213298b0Devang Patel /// @param Name Member name. 211e9db5e29e3af91eec572bfeb8dcec908213298b0Devang Patel /// @param File File where this member is defined. 212e9db5e29e3af91eec572bfeb8dcec908213298b0Devang Patel /// @param LineNo Line number. 213e9db5e29e3af91eec572bfeb8dcec908213298b0Devang Patel /// @param SizeInBits Member size. 214e9db5e29e3af91eec572bfeb8dcec908213298b0Devang Patel /// @param AlignInBits Member alignment. 215e9db5e29e3af91eec572bfeb8dcec908213298b0Devang Patel /// @param OffsetInBits Member offset. 216e9db5e29e3af91eec572bfeb8dcec908213298b0Devang Patel /// @param Flags Flags to encode member attribute, e.g. private 217e9db5e29e3af91eec572bfeb8dcec908213298b0Devang Patel /// @param Ty Parent type. 218d9b0b025612992a0b724eeca8bdf10b1d7a5c355Benjamin Kramer /// @param PropertyName Name of the Objective C property associated with 219e9db5e29e3af91eec572bfeb8dcec908213298b0Devang Patel /// this ivar. 220a00b80b04c5edb08639c1c6b32e9231fd8b066f7Dmitri Gribenko /// @param PropertyGetterName Name of the Objective C property getter 221a00b80b04c5edb08639c1c6b32e9231fd8b066f7Dmitri Gribenko /// selector. 222a00b80b04c5edb08639c1c6b32e9231fd8b066f7Dmitri Gribenko /// @param PropertySetterName Name of the Objective C property setter 223a00b80b04c5edb08639c1c6b32e9231fd8b066f7Dmitri Gribenko /// selector. 224e9db5e29e3af91eec572bfeb8dcec908213298b0Devang Patel /// @param PropertyAttributes Objective C property attributes. 225576d49a775043931d81bba172b9b11f40d858cb6Manman Ren DIDerivedType createObjCIVar(StringRef Name, DIFile File, 226576d49a775043931d81bba172b9b11f40d858cb6Manman Ren unsigned LineNo, uint64_t SizeInBits, 227576d49a775043931d81bba172b9b11f40d858cb6Manman Ren uint64_t AlignInBits, uint64_t OffsetInBits, 228576d49a775043931d81bba172b9b11f40d858cb6Manman Ren unsigned Flags, DIType Ty, 229576d49a775043931d81bba172b9b11f40d858cb6Manman Ren StringRef PropertyName = StringRef(), 230576d49a775043931d81bba172b9b11f40d858cb6Manman Ren StringRef PropertyGetterName = StringRef(), 231576d49a775043931d81bba172b9b11f40d858cb6Manman Ren StringRef PropertySetterName = StringRef(), 232576d49a775043931d81bba172b9b11f40d858cb6Manman Ren unsigned PropertyAttributes = 0); 233e9db5e29e3af91eec572bfeb8dcec908213298b0Devang Patel 2346588abf377b7381274236e651462ec83052f6013Devang Patel /// createObjCIVar - Create debugging information entry for Objective-C 2356588abf377b7381274236e651462ec83052f6013Devang Patel /// instance variable. 2366588abf377b7381274236e651462ec83052f6013Devang Patel /// @param Name Member name. 2376588abf377b7381274236e651462ec83052f6013Devang Patel /// @param File File where this member is defined. 2386588abf377b7381274236e651462ec83052f6013Devang Patel /// @param LineNo Line number. 2396588abf377b7381274236e651462ec83052f6013Devang Patel /// @param SizeInBits Member size. 2406588abf377b7381274236e651462ec83052f6013Devang Patel /// @param AlignInBits Member alignment. 2416588abf377b7381274236e651462ec83052f6013Devang Patel /// @param OffsetInBits Member offset. 2426588abf377b7381274236e651462ec83052f6013Devang Patel /// @param Flags Flags to encode member attribute, e.g. private 2436588abf377b7381274236e651462ec83052f6013Devang Patel /// @param Ty Parent type. 244a00b80b04c5edb08639c1c6b32e9231fd8b066f7Dmitri Gribenko /// @param PropertyNode Property associated with this ivar. 245576d49a775043931d81bba172b9b11f40d858cb6Manman Ren DIDerivedType createObjCIVar(StringRef Name, DIFile File, 246576d49a775043931d81bba172b9b11f40d858cb6Manman Ren unsigned LineNo, uint64_t SizeInBits, 247576d49a775043931d81bba172b9b11f40d858cb6Manman Ren uint64_t AlignInBits, uint64_t OffsetInBits, 248576d49a775043931d81bba172b9b11f40d858cb6Manman Ren unsigned Flags, DIType Ty, 249576d49a775043931d81bba172b9b11f40d858cb6Manman Ren MDNode *PropertyNode); 2506588abf377b7381274236e651462ec83052f6013Devang Patel 2511ea02d467a311b4846b942377d0b00fde987be65Devang Patel /// createObjCProperty - Create debugging information entry for Objective-C 2521ea02d467a311b4846b942377d0b00fde987be65Devang Patel /// property. 2531ea02d467a311b4846b942377d0b00fde987be65Devang Patel /// @param Name Property name. 254b8ca98874316bfe8e46b27e7a034a8a764c92e08Eric Christopher /// @param File File where this property is defined. 255b8ca98874316bfe8e46b27e7a034a8a764c92e08Eric Christopher /// @param LineNumber Line number. 2561ea02d467a311b4846b942377d0b00fde987be65Devang Patel /// @param GetterName Name of the Objective C property getter selector. 2571ea02d467a311b4846b942377d0b00fde987be65Devang Patel /// @param SetterName Name of the Objective C property setter selector. 2581ea02d467a311b4846b942377d0b00fde987be65Devang Patel /// @param PropertyAttributes Objective C property attributes. 259b8ca98874316bfe8e46b27e7a034a8a764c92e08Eric Christopher /// @param Ty Type. 260b8ca98874316bfe8e46b27e7a034a8a764c92e08Eric Christopher DIObjCProperty createObjCProperty(StringRef Name, 26117689b13be2f3f6e56c3a9dc3bc6193b7c732abcBill Wendling DIFile File, unsigned LineNumber, 26217689b13be2f3f6e56c3a9dc3bc6193b7c732abcBill Wendling StringRef GetterName, 26317689b13be2f3f6e56c3a9dc3bc6193b7c732abcBill Wendling StringRef SetterName, 26417689b13be2f3f6e56c3a9dc3bc6193b7c732abcBill Wendling unsigned PropertyAttributes, 26517689b13be2f3f6e56c3a9dc3bc6193b7c732abcBill Wendling DIType Ty); 26632dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher 26750d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createClassType - Create debugging information entry for a class. 2680a2551de2c61b372d45b236b413a5d2e15225c0fDevang Patel /// @param Scope Scope in which this class is defined. 2690a2551de2c61b372d45b236b413a5d2e15225c0fDevang Patel /// @param Name class name. 2700a2551de2c61b372d45b236b413a5d2e15225c0fDevang Patel /// @param File File where this member is defined. 271a00b80b04c5edb08639c1c6b32e9231fd8b066f7Dmitri Gribenko /// @param LineNumber Line number. 2720a2551de2c61b372d45b236b413a5d2e15225c0fDevang Patel /// @param SizeInBits Member size. 2730a2551de2c61b372d45b236b413a5d2e15225c0fDevang Patel /// @param AlignInBits Member alignment. 2740a2551de2c61b372d45b236b413a5d2e15225c0fDevang Patel /// @param OffsetInBits Member offset. 2750a2551de2c61b372d45b236b413a5d2e15225c0fDevang Patel /// @param Flags Flags to encode member attribute, e.g. private 2760a2551de2c61b372d45b236b413a5d2e15225c0fDevang Patel /// @param Elements class members. 2770a2551de2c61b372d45b236b413a5d2e15225c0fDevang Patel /// @param VTableHolder Debug info of the base class that contains vtable 27832dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher /// for this type. This is used in 2790a2551de2c61b372d45b236b413a5d2e15225c0fDevang Patel /// DW_AT_containing_type. See DWARF documentation 2800a2551de2c61b372d45b236b413a5d2e15225c0fDevang Patel /// for more info. 2817e2cb116556e1153401cd6b94d0f51db978f6902Devang Patel /// @param TemplateParms Template type parameters. 282ca442a4a1aabf6199e5aee09ec604e79916d9b92David Blaikie DICompositeType createClassType(DIDescriptor Scope, StringRef Name, 283ca442a4a1aabf6199e5aee09ec604e79916d9b92David Blaikie DIFile File, unsigned LineNumber, 284ca442a4a1aabf6199e5aee09ec604e79916d9b92David Blaikie uint64_t SizeInBits, uint64_t AlignInBits, 285ca442a4a1aabf6199e5aee09ec604e79916d9b92David Blaikie uint64_t OffsetInBits, unsigned Flags, 286ca442a4a1aabf6199e5aee09ec604e79916d9b92David Blaikie DIType DerivedFrom, DIArray Elements, 287ca442a4a1aabf6199e5aee09ec604e79916d9b92David Blaikie MDNode *VTableHolder = 0, 288ca442a4a1aabf6199e5aee09ec604e79916d9b92David Blaikie MDNode *TemplateParms = 0); 2890a2551de2c61b372d45b236b413a5d2e15225c0fDevang Patel 29050d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createStructType - Create debugging information entry for a struct. 29143c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param Scope Scope in which this struct is defined. 29243c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param Name Struct name. 29343c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param File File where this member is defined. 294a00b80b04c5edb08639c1c6b32e9231fd8b066f7Dmitri Gribenko /// @param LineNumber Line number. 29543c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param SizeInBits Member size. 29643c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param AlignInBits Member alignment. 29743c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param Flags Flags to encode member attribute, e.g. private 29843c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param Elements Struct elements. 29943c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param RunTimeLang Optional parameter, Objective-C runtime version. 3006172f0298391e00cb669cc246e70ae2531f2cdecDavid Blaikie DICompositeType createStructType(DIDescriptor Scope, StringRef Name, 3016172f0298391e00cb669cc246e70ae2531f2cdecDavid Blaikie DIFile File, unsigned LineNumber, 3026172f0298391e00cb669cc246e70ae2531f2cdecDavid Blaikie uint64_t SizeInBits, uint64_t AlignInBits, 3036172f0298391e00cb669cc246e70ae2531f2cdecDavid Blaikie unsigned Flags, DIType DerivedFrom, 3046172f0298391e00cb669cc246e70ae2531f2cdecDavid Blaikie DIArray Elements, unsigned RunTimeLang = 0, 3056172f0298391e00cb669cc246e70ae2531f2cdecDavid Blaikie MDNode *VTableHolder = 0); 306fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel 30750d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createUnionType - Create debugging information entry for an union. 30843c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param Scope Scope in which this union is defined. 30943c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param Name Union name. 31043c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param File File where this member is defined. 311a00b80b04c5edb08639c1c6b32e9231fd8b066f7Dmitri Gribenko /// @param LineNumber Line number. 31243c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param SizeInBits Member size. 31343c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param AlignInBits Member alignment. 31443c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param Flags Flags to encode member attribute, e.g. private 31543c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param Elements Union elements. 31643c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param RunTimeLang Optional parameter, Objective-C runtime version. 317d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie DICompositeType createUnionType( 318d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie DIDescriptor Scope, StringRef Name, DIFile File, unsigned LineNumber, 319d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie uint64_t SizeInBits, uint64_t AlignInBits, unsigned Flags, 320d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie DIArray Elements, unsigned RunTimeLang = 0); 32143c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel 32250d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createTemplateTypeParameter - Create debugging information for template 3237e2cb116556e1153401cd6b94d0f51db978f6902Devang Patel /// type parameter. 324e7d93877c6e7029d27bfd1c137fceb472f81f390Devang Patel /// @param Scope Scope in which this type is defined. 3257e2cb116556e1153401cd6b94d0f51db978f6902Devang Patel /// @param Name Type parameter name. 3267e2cb116556e1153401cd6b94d0f51db978f6902Devang Patel /// @param Ty Parameter type. 3277e2cb116556e1153401cd6b94d0f51db978f6902Devang Patel /// @param File File where this type parameter is defined. 3287e2cb116556e1153401cd6b94d0f51db978f6902Devang Patel /// @param LineNo Line number. 3297e2cb116556e1153401cd6b94d0f51db978f6902Devang Patel /// @param ColumnNo Column Number. 3307e2cb116556e1153401cd6b94d0f51db978f6902Devang Patel DITemplateTypeParameter 33150d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel createTemplateTypeParameter(DIDescriptor Scope, StringRef Name, DIType Ty, 3327e2cb116556e1153401cd6b94d0f51db978f6902Devang Patel MDNode *File = 0, unsigned LineNo = 0, 3337e2cb116556e1153401cd6b94d0f51db978f6902Devang Patel unsigned ColumnNo = 0); 3347e2cb116556e1153401cd6b94d0f51db978f6902Devang Patel 33550d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createTemplateValueParameter - Create debugging information for template 336e7d93877c6e7029d27bfd1c137fceb472f81f390Devang Patel /// value parameter. 337e7d93877c6e7029d27bfd1c137fceb472f81f390Devang Patel /// @param Scope Scope in which this type is defined. 338e7d93877c6e7029d27bfd1c137fceb472f81f390Devang Patel /// @param Name Value parameter name. 339e7d93877c6e7029d27bfd1c137fceb472f81f390Devang Patel /// @param Ty Parameter type. 34013b11cd81039d7b90be9e5bfbd823c1ceb3e1856David Blaikie /// @param Val Constant parameter value. 341e7d93877c6e7029d27bfd1c137fceb472f81f390Devang Patel /// @param File File where this type parameter is defined. 342e7d93877c6e7029d27bfd1c137fceb472f81f390Devang Patel /// @param LineNo Line number. 343e7d93877c6e7029d27bfd1c137fceb472f81f390Devang Patel /// @param ColumnNo Column Number. 344e7d93877c6e7029d27bfd1c137fceb472f81f390Devang Patel DITemplateValueParameter 3454de9d72883eebe4e86bffdaad89483dfe822e2a5David Blaikie createTemplateValueParameter(DIDescriptor Scope, StringRef Name, 3464de9d72883eebe4e86bffdaad89483dfe822e2a5David Blaikie DIType Ty, Value *Val, MDNode *File = 0, 3474de9d72883eebe4e86bffdaad89483dfe822e2a5David Blaikie unsigned LineNo = 0, unsigned ColumnNo = 0); 348e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie 349e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie /// \brief Create debugging information for a template template parameter. 350e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie /// @param Scope Scope in which this type is defined. 351e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie /// @param Name Value parameter name. 352e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie /// @param Ty Parameter type. 353e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie /// @param Val The fully qualified name of the template. 354e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie /// @param File File where this type parameter is defined. 355e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie /// @param LineNo Line number. 356e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie /// @param ColumnNo Column Number. 357e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie DITemplateValueParameter 358e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie createTemplateTemplateParameter(DIDescriptor Scope, StringRef Name, 359e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie DIType Ty, StringRef Val, MDNode *File = 0, 360e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie unsigned LineNo = 0, unsigned ColumnNo = 0); 361e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie 362e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie /// \brief Create debugging information for a template parameter pack. 363e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie /// @param Scope Scope in which this type is defined. 364e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie /// @param Name Value parameter name. 365e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie /// @param Ty Parameter type. 366e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie /// @param Val An array of types in the pack. 367e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie /// @param File File where this type parameter is defined. 368e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie /// @param LineNo Line number. 369e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie /// @param ColumnNo Column Number. 370e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie DITemplateValueParameter 371e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie createTemplateParameterPack(DIDescriptor Scope, StringRef Name, 372e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie DIType Ty, DIArray Val, MDNode *File = 0, 373e88939cfebbc98133553c6fc03a52b8fb1adbb70David Blaikie unsigned LineNo = 0, unsigned ColumnNo = 0); 374e7d93877c6e7029d27bfd1c137fceb472f81f390Devang Patel 37550d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createArrayType - Create debugging information entry for an array. 37643c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param Size Array size. 37743c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param AlignInBits Alignment. 37843c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param Ty Element type. 37943c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param Subscripts Subscripts. 380d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie DICompositeType createArrayType(uint64_t Size, uint64_t AlignInBits, 381d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie DIType Ty, DIArray Subscripts); 38243c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel 38350d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createVectorType - Create debugging information entry for a vector type. 38443c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param Size Array size. 38543c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param AlignInBits Alignment. 38643c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param Ty Element type. 38743c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param Subscripts Subscripts. 38837bfb18f8f0557611fbdf238abe200813f07d298Manman Ren DICompositeType createVectorType(uint64_t Size, uint64_t AlignInBits, 38937bfb18f8f0557611fbdf238abe200813f07d298Manman Ren DIType Ty, DIArray Subscripts); 39043c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel 3912f445be5a75b4d1a907dd694c9e5c518229df48eAdrian Prantl /// createEnumerationType - Create debugging information entry for an 39243c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// enumeration. 3932f445be5a75b4d1a907dd694c9e5c518229df48eAdrian Prantl /// @param Scope Scope in which this enumeration is defined. 3942f445be5a75b4d1a907dd694c9e5c518229df48eAdrian Prantl /// @param Name Union name. 3952f445be5a75b4d1a907dd694c9e5c518229df48eAdrian Prantl /// @param File File where this member is defined. 3962f445be5a75b4d1a907dd694c9e5c518229df48eAdrian Prantl /// @param LineNumber Line number. 3972f445be5a75b4d1a907dd694c9e5c518229df48eAdrian Prantl /// @param SizeInBits Member size. 3982f445be5a75b4d1a907dd694c9e5c518229df48eAdrian Prantl /// @param AlignInBits Member alignment. 3992f445be5a75b4d1a907dd694c9e5c518229df48eAdrian Prantl /// @param Elements Enumeration elements. 4002f445be5a75b4d1a907dd694c9e5c518229df48eAdrian Prantl /// @param UnderlyingType Underlying type of a C++11/ObjC fixed enum. 40132dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher DICompositeType createEnumerationType(DIDescriptor Scope, StringRef Name, 40232dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher DIFile File, unsigned LineNumber, 40332dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher uint64_t SizeInBits, 40432dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher uint64_t AlignInBits, 40532dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher DIArray Elements, 40632dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher DIType UnderlyingType); 40743c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel 40850d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createSubroutineType - Create subroutine type. 409a00b80b04c5edb08639c1c6b32e9231fd8b066f7Dmitri Gribenko /// @param File File in which this subroutine is defined. 410a00b80b04c5edb08639c1c6b32e9231fd8b066f7Dmitri Gribenko /// @param ParameterTypes An array of subroutine parameter types. This 411a00b80b04c5edb08639c1c6b32e9231fd8b066f7Dmitri Gribenko /// includes return type at 0th index. 412d67c5cab3b770b0709dcb05256aef51b35f3f113David Blaikie DICompositeType createSubroutineType(DIFile File, DIArray ParameterTypes); 41343c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel 41450d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createArtificialType - Create a new DIType with "artificial" flag set. 41550d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel DIType createArtificialType(DIType Ty); 416fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel 417e521278f00cf5f4ea0cc4aac126df30924d3e705Eric Christopher /// createObjectPointerType - Create a new DIType with the "object pointer" 418e521278f00cf5f4ea0cc4aac126df30924d3e705Eric Christopher /// flag set. 419e521278f00cf5f4ea0cc4aac126df30924d3e705Eric Christopher DIType createObjectPointerType(DIType Ty); 420e521278f00cf5f4ea0cc4aac126df30924d3e705Eric Christopher 4214fe345729285ae634c657ab854057464d03220f7Eric Christopher /// createForwardDecl - Create a temporary forward-declared type. 422216432df5ac897327a0cb6323f08811910481038Eric Christopher DIType createForwardDecl(unsigned Tag, StringRef Name, DIDescriptor Scope, 423ce3da6f1d532c909238c14fa67cf955a404a6bc2Eli Friedman DIFile F, unsigned Line, unsigned RuntimeLang = 0, 424ce3da6f1d532c909238c14fa67cf955a404a6bc2Eli Friedman uint64_t SizeInBits = 0, uint64_t AlignInBits = 0); 4254fe345729285ae634c657ab854057464d03220f7Eric Christopher 42632dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher /// retainType - Retain DIType in a module even if it is not referenced 42743c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// through debug info anchors. 42850d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel void retainType(DIType T); 42943c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel 43050d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createUnspecifiedParameter - Create unspeicified type descriptor 43143c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// for a subroutine type. 43250d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel DIDescriptor createUnspecifiedParameter(); 43343c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel 43450d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// getOrCreateArray - Get a DIArray, create one if required. 435685501836bc60f53892854253b5bbea6c48b6d7fJay Foad DIArray getOrCreateArray(ArrayRef<Value *> Elements); 436fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel 43750d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// getOrCreateSubrange - Create a descriptor for a value range. This 43843c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// implicitly uniques the values returned. 4399493dae613847b01b79914502f337814fe3e00acBill Wendling DISubrange getOrCreateSubrange(int64_t Lo, int64_t Count); 44043c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel 44150d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createGlobalVariable - Create a new descriptor for the specified global. 442fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Name Name of the variable. 443fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param File File where this variable is defined. 444fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param LineNo Line number. 445fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Ty Variable Type. 446fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param isLocalToUnit Boolean flag indicate whether this variable is 447fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// externally visible or not. 448fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Val llvm::Value of the variable. 449fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel DIGlobalVariable 45050d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel createGlobalVariable(StringRef Name, DIFile File, unsigned LineNo, 451fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel DIType Ty, bool isLocalToUnit, llvm::Value *Val); 452fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel 4533fac43d8b4111feca59d77941ac2ebd1f858dd33David Blaikie /// \brief Create a new descriptor for the specified global. 4543fac43d8b4111feca59d77941ac2ebd1f858dd33David Blaikie /// @param Name Name of the variable. 4553fac43d8b4111feca59d77941ac2ebd1f858dd33David Blaikie /// @param LinkageName Mangled variable name. 4563fac43d8b4111feca59d77941ac2ebd1f858dd33David Blaikie /// @param File File where this variable is defined. 4573fac43d8b4111feca59d77941ac2ebd1f858dd33David Blaikie /// @param LineNo Line number. 4583fac43d8b4111feca59d77941ac2ebd1f858dd33David Blaikie /// @param Ty Variable Type. 4593fac43d8b4111feca59d77941ac2ebd1f858dd33David Blaikie /// @param isLocalToUnit Boolean flag indicate whether this variable is 4603fac43d8b4111feca59d77941ac2ebd1f858dd33David Blaikie /// externally visible or not. 4613fac43d8b4111feca59d77941ac2ebd1f858dd33David Blaikie /// @param Val llvm::Value of the variable. 4623fac43d8b4111feca59d77941ac2ebd1f858dd33David Blaikie DIGlobalVariable 4633fac43d8b4111feca59d77941ac2ebd1f858dd33David Blaikie createGlobalVariable(StringRef Name, StringRef LinkageName, DIFile File, 4643fac43d8b4111feca59d77941ac2ebd1f858dd33David Blaikie unsigned LineNo, DIType Ty, bool isLocalToUnit, 4653fac43d8b4111feca59d77941ac2ebd1f858dd33David Blaikie llvm::Value *Val); 466fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel 46732dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher /// createStaticVariable - Create a new descriptor for the specified 468fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// variable. 469a00b80b04c5edb08639c1c6b32e9231fd8b066f7Dmitri Gribenko /// @param Context Variable scope. 470fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Name Name of the variable. 471a00b80b04c5edb08639c1c6b32e9231fd8b066f7Dmitri Gribenko /// @param LinkageName Mangled name of the variable. 472fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param File File where this variable is defined. 473fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param LineNo Line number. 474fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Ty Variable Type. 475fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param isLocalToUnit Boolean flag indicate whether this variable is 476fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// externally visible or not. 477fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Val llvm::Value of the variable. 4786b6061f01171bd3d4e32022efa45428d4f9941eeEric Christopher /// @param Decl Reference to the corresponding declaration. 479fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel DIGlobalVariable 48032dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher createStaticVariable(DIDescriptor Context, StringRef Name, 48132dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher StringRef LinkageName, DIFile File, unsigned LineNo, 4826b6061f01171bd3d4e32022efa45428d4f9941eeEric Christopher DIType Ty, bool isLocalToUnit, llvm::Value *Val, 4836b6061f01171bd3d4e32022efa45428d4f9941eeEric Christopher MDNode *Decl = NULL); 484fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel 485fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel 48632dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher /// createLocalVariable - Create a new descriptor for the specified 48748f17ba2a611d197082d4de730b646a4ecf68df4Devang Patel /// local variable. 48848f17ba2a611d197082d4de730b646a4ecf68df4Devang Patel /// @param Tag Dwarf TAG. Usually DW_TAG_auto_variable or 48948f17ba2a611d197082d4de730b646a4ecf68df4Devang Patel /// DW_TAG_arg_variable. 49048f17ba2a611d197082d4de730b646a4ecf68df4Devang Patel /// @param Scope Variable scope. 49148f17ba2a611d197082d4de730b646a4ecf68df4Devang Patel /// @param Name Variable name. 49248f17ba2a611d197082d4de730b646a4ecf68df4Devang Patel /// @param File File where this variable is defined. 49348f17ba2a611d197082d4de730b646a4ecf68df4Devang Patel /// @param LineNo Line number. 49448f17ba2a611d197082d4de730b646a4ecf68df4Devang Patel /// @param Ty Variable Type 49548f17ba2a611d197082d4de730b646a4ecf68df4Devang Patel /// @param AlwaysPreserve Boolean. Set to true if debug info for this 49648f17ba2a611d197082d4de730b646a4ecf68df4Devang Patel /// variable should be preserved in optimized build. 49748f17ba2a611d197082d4de730b646a4ecf68df4Devang Patel /// @param Flags Flags, e.g. artificial variable. 498e9e16c5f52c4a093f4de234d448cdebedab8938eDevang Patel /// @param ArgNo If this variable is an arugment then this argument's 499e9e16c5f52c4a093f4de234d448cdebedab8938eDevang Patel /// number. 1 indicates 1st argument. 50050d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel DIVariable createLocalVariable(unsigned Tag, DIDescriptor Scope, 50148f17ba2a611d197082d4de730b646a4ecf68df4Devang Patel StringRef Name, 50248f17ba2a611d197082d4de730b646a4ecf68df4Devang Patel DIFile File, unsigned LineNo, 50348f17ba2a611d197082d4de730b646a4ecf68df4Devang Patel DIType Ty, bool AlwaysPreserve = false, 504e9e16c5f52c4a093f4de234d448cdebedab8938eDevang Patel unsigned Flags = 0, 505e9e16c5f52c4a093f4de234d448cdebedab8938eDevang Patel unsigned ArgNo = 0); 50648f17ba2a611d197082d4de730b646a4ecf68df4Devang Patel 50748f17ba2a611d197082d4de730b646a4ecf68df4Devang Patel 50850d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createComplexVariable - Create a new descriptor for the specified 509fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// variable which has a complex address expression for its address. 510fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Tag Dwarf TAG. Usually DW_TAG_auto_variable or 511fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// DW_TAG_arg_variable. 512fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Scope Variable scope. 513fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Name Variable name. 514a00b80b04c5edb08639c1c6b32e9231fd8b066f7Dmitri Gribenko /// @param F File where this variable is defined. 515fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param LineNo Line number. 516fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Ty Variable Type 517685501836bc60f53892854253b5bbea6c48b6d7fJay Foad /// @param Addr An array of complex address operations. 518e9e16c5f52c4a093f4de234d448cdebedab8938eDevang Patel /// @param ArgNo If this variable is an arugment then this argument's 519e9e16c5f52c4a093f4de234d448cdebedab8938eDevang Patel /// number. 1 indicates 1st argument. 52050d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel DIVariable createComplexVariable(unsigned Tag, DIDescriptor Scope, 521fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel StringRef Name, DIFile F, unsigned LineNo, 522685501836bc60f53892854253b5bbea6c48b6d7fJay Foad DIType Ty, ArrayRef<Value *> Addr, 523685501836bc60f53892854253b5bbea6c48b6d7fJay Foad unsigned ArgNo = 0); 524fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel 52550d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createFunction - Create a new descriptor for the specified subprogram. 52644498a640daa827220bc4758770190318f0ec69fDevang Patel /// See comments in DISubprogram for descriptions of these fields. 52744498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param Scope Function scope. 52844498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param Name Function name. 52944498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param LinkageName Mangled function name. 53044498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param File File where this variable is defined. 53144498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param LineNo Line number. 53244498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param Ty Function type. 53344498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param isLocalToUnit True if this function is not externally visible.. 53444498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param isDefinition True if this is a function definition. 5356126a1e1894f346fae02a514a20aa56b879aeb99Eric Christopher /// @param ScopeLine Set to the beginning of the scope this starts 53644498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param Flags e.g. is this function prototyped or not. 53744498a640daa827220bc4758770190318f0ec69fDevang Patel /// This flags are used to emit dwarf attributes. 53844498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param isOptimized True if optimization is ON. 53944498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param Fn llvm::Function pointer. 540da19475328ece3da19437a2e9eef035dcafa2814Devang Patel /// @param TParam Function template parameters. 54150d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel DISubprogram createFunction(DIDescriptor Scope, StringRef Name, 54244498a640daa827220bc4758770190318f0ec69fDevang Patel StringRef LinkageName, 54344498a640daa827220bc4758770190318f0ec69fDevang Patel DIFile File, unsigned LineNo, 5443d33184d9da02fb699827249e0631106252f72faDavid Blaikie DICompositeType Ty, bool isLocalToUnit, 54544498a640daa827220bc4758770190318f0ec69fDevang Patel bool isDefinition, 5466126a1e1894f346fae02a514a20aa56b879aeb99Eric Christopher unsigned ScopeLine, 54744498a640daa827220bc4758770190318f0ec69fDevang Patel unsigned Flags = 0, 54844498a640daa827220bc4758770190318f0ec69fDevang Patel bool isOptimized = false, 549da19475328ece3da19437a2e9eef035dcafa2814Devang Patel Function *Fn = 0, 5505e06bb83f4d7b1b86659ad851324350afb04f5b0Devang Patel MDNode *TParam = 0, 5515e06bb83f4d7b1b86659ad851324350afb04f5b0Devang Patel MDNode *Decl = 0); 55244498a640daa827220bc4758770190318f0ec69fDevang Patel 55350d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createMethod - Create a new descriptor for the specified C++ method. 55444498a640daa827220bc4758770190318f0ec69fDevang Patel /// See comments in DISubprogram for descriptions of these fields. 55544498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param Scope Function scope. 55644498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param Name Function name. 55744498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param LinkageName Mangled function name. 55844498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param File File where this variable is defined. 55944498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param LineNo Line number. 56044498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param Ty Function type. 56144498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param isLocalToUnit True if this function is not externally visible.. 56244498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param isDefinition True if this is a function definition. 56332dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher /// @param Virtuality Attributes describing virtualness. e.g. pure 56444498a640daa827220bc4758770190318f0ec69fDevang Patel /// virtual function. 56544498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param VTableIndex Index no of this method in virtual table. 56644498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param VTableHolder Type that holds vtable. 56744498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param Flags e.g. is this function prototyped or not. 56844498a640daa827220bc4758770190318f0ec69fDevang Patel /// This flags are used to emit dwarf attributes. 56944498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param isOptimized True if optimization is ON. 57044498a640daa827220bc4758770190318f0ec69fDevang Patel /// @param Fn llvm::Function pointer. 571da19475328ece3da19437a2e9eef035dcafa2814Devang Patel /// @param TParam Function template parameters. 57250d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel DISubprogram createMethod(DIDescriptor Scope, StringRef Name, 57344498a640daa827220bc4758770190318f0ec69fDevang Patel StringRef LinkageName, 57444498a640daa827220bc4758770190318f0ec69fDevang Patel DIFile File, unsigned LineNo, 5753d33184d9da02fb699827249e0631106252f72faDavid Blaikie DICompositeType Ty, bool isLocalToUnit, 57644498a640daa827220bc4758770190318f0ec69fDevang Patel bool isDefinition, 57744498a640daa827220bc4758770190318f0ec69fDevang Patel unsigned Virtuality = 0, unsigned VTableIndex = 0, 57844498a640daa827220bc4758770190318f0ec69fDevang Patel MDNode *VTableHolder = 0, 57944498a640daa827220bc4758770190318f0ec69fDevang Patel unsigned Flags = 0, 58044498a640daa827220bc4758770190318f0ec69fDevang Patel bool isOptimized = false, 581da19475328ece3da19437a2e9eef035dcafa2814Devang Patel Function *Fn = 0, 582da19475328ece3da19437a2e9eef035dcafa2814Devang Patel MDNode *TParam = 0); 583fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel 58450d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createNameSpace - This creates new descriptor for a namespace 585fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// with the specified parent scope. 586fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Scope Namespace scope 587fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Name Name of this namespace 588fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param File Source file 589fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param LineNo Line number 59050d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel DINameSpace createNameSpace(DIDescriptor Scope, StringRef Name, 591fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel DIFile File, unsigned LineNo); 592fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel 593fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel 5946618a241f7ba2571a1a55b3733c4441d467baf42Eric Christopher /// createLexicalBlockFile - This creates a descriptor for a lexical 5956618a241f7ba2571a1a55b3733c4441d467baf42Eric Christopher /// block with a new file attached. This merely extends the existing 5966618a241f7ba2571a1a55b3733c4441d467baf42Eric Christopher /// lexical block as it crosses a file. 5976618a241f7ba2571a1a55b3733c4441d467baf42Eric Christopher /// @param Scope Lexical block. 5986618a241f7ba2571a1a55b3733c4441d467baf42Eric Christopher /// @param File Source file. 5996618a241f7ba2571a1a55b3733c4441d467baf42Eric Christopher DILexicalBlockFile createLexicalBlockFile(DIDescriptor Scope, 6009f99721a1882cdef9f7cca25de7ea43627d23958Devang Patel DIFile File); 60132dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher 60250d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// createLexicalBlock - This creates a descriptor for a lexical block 60343c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// with the specified parent context. 60443c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param Scope Parent lexical scope. 60543c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param File Source file 60643c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param Line Line number 60743c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel /// @param Col Column number 60850d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel DILexicalBlock createLexicalBlock(DIDescriptor Scope, DIFile File, 60943c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel unsigned Line, unsigned Col); 61043c249cf1e417083ec8cbdfb4866a42861a7f638Devang Patel 611c462db6d66e683fb837c03d661483106a869a407David Blaikie /// \brief Create a descriptor for an imported module. 612c462db6d66e683fb837c03d661483106a869a407David Blaikie /// @param Context The scope this module is imported into 613c462db6d66e683fb837c03d661483106a869a407David Blaikie /// @param NS The namespace being imported here 6144b233c773f4cc3efacb6b8702b5bcf601ffbc8cbBenjamin Kramer /// @param Line Line number 61520d9e41ddb3f531267680819b5cac4cac1c6b231David Blaikie DIImportedEntity createImportedModule(DIScope Context, DINameSpace NS, 6167b72cc7782716f469eb1b0963423a5b414215705David Blaikie unsigned Line, 6177b72cc7782716f469eb1b0963423a5b414215705David Blaikie StringRef Name = StringRef()); 618c462db6d66e683fb837c03d661483106a869a407David Blaikie 6197b72cc7782716f469eb1b0963423a5b414215705David Blaikie /// \brief Create a descriptor for an imported module. 6207b72cc7782716f469eb1b0963423a5b414215705David Blaikie /// @param Context The scope this module is imported into 6217b72cc7782716f469eb1b0963423a5b414215705David Blaikie /// @param NS An aliased namespace 6227b72cc7782716f469eb1b0963423a5b414215705David Blaikie /// @param Line Line number 6237b72cc7782716f469eb1b0963423a5b414215705David Blaikie DIImportedEntity createImportedModule(DIScope Context, DIImportedEntity NS, 6247b72cc7782716f469eb1b0963423a5b414215705David Blaikie unsigned Line, StringRef Name); 6257b72cc7782716f469eb1b0963423a5b414215705David Blaikie 6267b72cc7782716f469eb1b0963423a5b414215705David Blaikie /// \brief Create a descriptor for an imported function. 62720d9e41ddb3f531267680819b5cac4cac1c6b231David Blaikie /// @param Context The scope this module is imported into 62820d9e41ddb3f531267680819b5cac4cac1c6b231David Blaikie /// @param Decl The declaration (or definition) of a function, type, or 62920d9e41ddb3f531267680819b5cac4cac1c6b231David Blaikie /// variable 63020d9e41ddb3f531267680819b5cac4cac1c6b231David Blaikie /// @param Line Line number 63120d9e41ddb3f531267680819b5cac4cac1c6b231David Blaikie DIImportedEntity createImportedDeclaration(DIScope Context, 63220d9e41ddb3f531267680819b5cac4cac1c6b231David Blaikie DIDescriptor Decl, 63320d9e41ddb3f531267680819b5cac4cac1c6b231David Blaikie unsigned Line); 63420d9e41ddb3f531267680819b5cac4cac1c6b231David Blaikie 63550d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// insertDeclare - Insert a new llvm.dbg.declare intrinsic call. 636fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Storage llvm::Value of the variable 637fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param VarInfo Variable's debug info descriptor. 638fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param InsertAtEnd Location for the new intrinsic. 63950d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel Instruction *insertDeclare(llvm::Value *Storage, DIVariable VarInfo, 640fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel BasicBlock *InsertAtEnd); 641fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel 64250d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// insertDeclare - Insert a new llvm.dbg.declare intrinsic call. 643fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Storage llvm::Value of the variable 644fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param VarInfo Variable's debug info descriptor. 645fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param InsertBefore Location for the new intrinsic. 64650d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel Instruction *insertDeclare(llvm::Value *Storage, DIVariable VarInfo, 647fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel Instruction *InsertBefore); 648fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel 649fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel 65050d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// insertDbgValueIntrinsic - Insert a new llvm.dbg.value intrinsic call. 651fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Val llvm::Value of the variable 652fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Offset Offset 653fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param VarInfo Variable's debug info descriptor. 654fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param InsertAtEnd Location for the new intrinsic. 65550d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel Instruction *insertDbgValueIntrinsic(llvm::Value *Val, uint64_t Offset, 65632dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher DIVariable VarInfo, 657fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel BasicBlock *InsertAtEnd); 65832dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher 65950d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel /// insertDbgValueIntrinsic - Insert a new llvm.dbg.value intrinsic call. 660fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Val llvm::Value of the variable 661fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param Offset Offset 662fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param VarInfo Variable's debug info descriptor. 663fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel /// @param InsertBefore Location for the new intrinsic. 66450d280c14ee1c25fc8e6cb6f59af44f754edce42Devang Patel Instruction *insertDbgValueIntrinsic(llvm::Value *Val, uint64_t Offset, 66532dc092351fafaf9805da93b82a88a264ab987e0Eric Christopher DIVariable VarInfo, 666fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel Instruction *InsertBefore); 667fe58f95f3604b394916bee7bd289e1f0e0488ec5Devang Patel 66835fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel }; 66935fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel} // end namespace llvm 67035fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel 67135fcd6557f53aab69c2990b80fed4653fbaa3473Devang Patel#endif 672