class DIBuilder {
private:
Module &M;
- LLVMContext & VMContext;
+ LLVMContext &VMContext;
MDNode *TempEnumTypes;
MDNode *TempRetainTypes;
SmallVector<TrackingVH<MDNode>, 4> AllRetainTypes;
SmallVector<Value *, 4> AllSubprograms;
SmallVector<Value *, 4> AllGVs;
- SmallVector<Value *, 4> AllImportedModules;
+ SmallVector<TrackingVH<MDNode>, 4> AllImportedModules;
+ // Private use for multiple types of template parameters.
DITemplateValueParameter
createTemplateValueParameter(unsigned Tag, DIDescriptor Scope,
StringRef Name, DIType Ty, Value *Val,
public:
explicit DIBuilder(Module &M);
enum ComplexAddrKind { OpPlus=1, OpDeref };
+ enum DebugEmissionKind { FullDebug=1, LineTablesOnly };
/// finalize - Construct any deferred debug info descriptors.
void finalize();
/// @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
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.
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);
/// through debug info anchors.
void retainType(DIType T);
- /// createUnspecifiedParameter - Create unspeicified type descriptor
+ /// createUnspecifiedParameter - Create unspecified type descriptor
/// for a subroutine type.
DIDescriptor createUnspecifiedParameter();
/// @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.