X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FDIBuilder.h;h=ba7bca7ac5d979d44806a26f5a75f6e88837ff22;hb=0b949e0e9f01a7fafc96d1cd81113a44045d40ae;hp=924aab586fbe3bad989a51d3d3651101233bc98b;hpb=3fbf1a698921f5fca1b2fff96c898cca6d0b665e;p=oota-llvm.git diff --git a/include/llvm/DIBuilder.h b/include/llvm/DIBuilder.h index 924aab586fb..ba7bca7ac5d 100644 --- a/include/llvm/DIBuilder.h +++ b/include/llvm/DIBuilder.h @@ -55,7 +55,7 @@ namespace llvm { class DIBuilder { private: Module &M; - LLVMContext & VMContext; + LLVMContext &VMContext; MDNode *TempEnumTypes; MDNode *TempRetainTypes; @@ -72,8 +72,9 @@ namespace llvm { SmallVector, 4> AllRetainTypes; SmallVector AllSubprograms; SmallVector AllGVs; - SmallVector AllImportedModules; + SmallVector, 4> AllImportedModules; + // Private use for multiple types of template parameters. DITemplateValueParameter createTemplateValueParameter(unsigned Tag, DIDescriptor Scope, StringRef Name, DIType Ty, Value *Val, @@ -86,6 +87,7 @@ namespace llvm { public: explicit DIBuilder(Module &M); enum ComplexAddrKind { OpPlus=1, OpDeref }; + enum DebugEmissionKind { FullDebug=1, LineTablesOnly }; /// finalize - Construct any deferred debug info descriptors. void finalize(); @@ -95,8 +97,8 @@ namespace llvm { /// @param Lang Source programming language, eg. dwarf::DW_LANG_C99 /// @param File File name /// @param Dir Directory - /// @param Producer String identify producer of debugging information. - /// Usuall this is a compiler version string. + /// @param Producer Identify the producer of debugging information and code. + /// Usually this is a compiler version string. /// @param isOptimized A boolean flag which indicates whether optimization /// is ON or not. /// @param Flags This string lists command line options. This string is @@ -110,7 +112,8 @@ namespace llvm { StringRef Dir, StringRef Producer, bool isOptimized, StringRef Flags, unsigned RV, - StringRef SplitName = StringRef()); + StringRef SplitName = StringRef(), + DebugEmissionKind Kind = FullDebug); /// createFile - Create a file descriptor to hold debugging information /// for a file. @@ -415,10 +418,13 @@ namespace llvm { StringRef UniqueIdentifier = StringRef()); /// createSubroutineType - Create subroutine type. - /// @param File File in which this subroutine is defined. - /// @param ParameterTypes An array of subroutine parameter types. This - /// includes return type at 0th index. - DICompositeType createSubroutineType(DIFile File, DIArray ParameterTypes); + /// @param File File in which this subroutine is defined. + /// @param ParameterTypes An array of subroutine parameter types. This + /// includes return type at 0th index. + /// @param Flags E.g.: LValueReference. + /// These flags are used to emit dwarf attributes. + DICompositeType createSubroutineType(DIFile File, DIArray ParameterTypes, + unsigned Flags = 0); /// createArtificialType - Create a new DIType with "artificial" flag set. DIType createArtificialType(DIType Ty); @@ -439,7 +445,7 @@ namespace llvm { /// through debug info anchors. void retainType(DIType T); - /// createUnspecifiedParameter - Create unspeicified type descriptor + /// createUnspecifiedParameter - Create unspecified type descriptor /// for a subroutine type. DIDescriptor createUnspecifiedParameter(); @@ -542,7 +548,7 @@ namespace llvm { /// @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 isLocalToUnit True if this function is not externally visible. /// @param isDefinition True if this is a function definition. /// @param ScopeLine Set to the beginning of the scope this starts /// @param Flags e.g. is this function prototyped or not.