class Function;
class Module;
class Value;
+ class Constant;
class LLVMContext;
class MDNode;
class StringRef;
/// @param Ty Type of the static member.
/// @param Flags Flags to encode member attribute, e.g. private.
/// @param Val Const initializer of the member.
- DIDerivedType
- createStaticMemberType(DIDescriptor Scope, StringRef Name,
- DIFile File, unsigned LineNo, DIType Ty,
- unsigned Flags, llvm::Value *Val);
+ DIDerivedType createStaticMemberType(DIDescriptor Scope, StringRef Name,
+ DIFile File, unsigned LineNo,
+ DIType Ty, unsigned Flags,
+ llvm::Constant *Val);
/// createObjCIVar - Create debugging information entry for Objective-C
/// instance variable.
/// @param LineNo Line number.
/// @param ColumnNo Column Number.
DITemplateValueParameter
- createTemplateValueParameter(DIDescriptor Scope, StringRef Name,
- DIType Ty, Value *Val, MDNode *File = nullptr,
+ createTemplateValueParameter(DIDescriptor Scope, StringRef Name, DIType Ty,
+ Constant *Val, MDNode *File = nullptr,
unsigned LineNo = 0, unsigned ColumnNo = 0);
/// \brief Create debugging information for a template template parameter.
/// externally visible or not.
/// @param Val llvm::Value of the variable.
/// @param Decl Reference to the corresponding declaration.
- DIGlobalVariable
- createGlobalVariable(DIDescriptor Context, StringRef Name,
- StringRef LinkageName, DIFile File, unsigned LineNo,
- DITypeRef Ty, bool isLocalToUnit, llvm::Value *Val,
- MDNode *Decl = nullptr);
+ DIGlobalVariable createGlobalVariable(DIDescriptor Context, StringRef Name,
+ StringRef LinkageName, DIFile File,
+ unsigned LineNo, DITypeRef Ty,
+ bool isLocalToUnit,
+ llvm::Constant *Val,
+ MDNode *Decl = nullptr);
/// createTempGlobalVariableFwdDecl - Identical to createGlobalVariable
/// except that the resulting DbgNode is temporary and meant to be RAUWed.
- DIGlobalVariable
- createTempGlobalVariableFwdDecl(DIDescriptor Context, StringRef Name,
- StringRef LinkageName, DIFile File,
- unsigned LineNo, DITypeRef Ty,
- bool isLocalToUnit, llvm::Value *Val,
- MDNode *Decl = nullptr);
-
+ DIGlobalVariable createTempGlobalVariableFwdDecl(
+ DIDescriptor Context, StringRef Name, StringRef LinkageName,
+ DIFile File, unsigned LineNo, DITypeRef Ty, bool isLocalToUnit,
+ llvm::Constant *Val, MDNode *Decl = nullptr);
/// createLocalVariable - Create a new descriptor for the specified
/// local variable.
return DIDerivedType(MDNode::get(VMContext, Elts));
}
-DIDerivedType
-DIBuilder::createStaticMemberType(DIDescriptor Scope, StringRef Name,
- DIFile File, unsigned LineNumber,
- DIType Ty, unsigned Flags,
- llvm::Value *Val) {
+DIDerivedType DIBuilder::createStaticMemberType(DIDescriptor Scope,
+ StringRef Name, DIFile File,
+ unsigned LineNumber, DIType Ty,
+ unsigned Flags,
+ llvm::Constant *Val) {
// TAG_member is encoded in DIDerivedType format.
Flags |= DIDescriptor::FlagStaticMember;
Value *Elts[] = {HeaderBuilder::get(dwarf::DW_TAG_member)
DITemplateValueParameter
DIBuilder::createTemplateValueParameter(DIDescriptor Context, StringRef Name,
- DIType Ty, Value *Val,
- MDNode *File, unsigned LineNo,
- unsigned ColumnNo) {
+ DIType Ty, Constant *Val, MDNode *File,
+ unsigned LineNo, unsigned ColumnNo) {
return createTemplateValueParameterHelper(
VMContext, dwarf::DW_TAG_template_value_parameter, Context, Name, Ty, Val,
File, LineNo, ColumnNo);
return DISubrange(MDNode::get(VMContext, Elts));
}
-static DIGlobalVariable
-createGlobalVariableHelper(LLVMContext &VMContext, DIDescriptor Context,
- StringRef Name, StringRef LinkageName, DIFile F,
- unsigned LineNumber, DITypeRef Ty, bool isLocalToUnit,
- Value *Val, MDNode *Decl, bool isDefinition,
- std::function<MDNode *(ArrayRef<Value *>)> CreateFunc) {
+static DIGlobalVariable createGlobalVariableHelper(
+ LLVMContext &VMContext, DIDescriptor Context, StringRef Name,
+ StringRef LinkageName, DIFile F, unsigned LineNumber, DITypeRef Ty,
+ bool isLocalToUnit, Constant *Val, MDNode *Decl, bool isDefinition,
+ std::function<MDNode *(ArrayRef<Value *>)> CreateFunc) {
Value *Elts[] = {HeaderBuilder::get(dwarf::DW_TAG_variable)
.concat(Name)
.concat(Name)
return DIGlobalVariable(CreateFunc(Elts));
}
-DIGlobalVariable DIBuilder::createGlobalVariable(DIDescriptor Context,
- StringRef Name,
- StringRef LinkageName,
- DIFile F, unsigned LineNumber,
- DITypeRef Ty,
- bool isLocalToUnit,
- Value *Val, MDNode *Decl) {
+DIGlobalVariable DIBuilder::createGlobalVariable(
+ DIDescriptor Context, StringRef Name, StringRef LinkageName, DIFile F,
+ unsigned LineNumber, DITypeRef Ty, bool isLocalToUnit, Constant *Val,
+ MDNode *Decl) {
return createGlobalVariableHelper(VMContext, Context, Name, LinkageName, F,
LineNumber, Ty, isLocalToUnit, Val, Decl, true,
[&] (ArrayRef<Value *> Elts) -> MDNode * {
});
}
-DIGlobalVariable
-DIBuilder::createTempGlobalVariableFwdDecl(DIDescriptor Context,
- StringRef Name,
- StringRef LinkageName,
- DIFile F, unsigned LineNumber,
- DITypeRef Ty,
- bool isLocalToUnit,
- Value *Val, MDNode *Decl) {
+DIGlobalVariable DIBuilder::createTempGlobalVariableFwdDecl(
+ DIDescriptor Context, StringRef Name, StringRef LinkageName, DIFile F,
+ unsigned LineNumber, DITypeRef Ty, bool isLocalToUnit, Constant *Val,
+ MDNode *Decl) {
return createGlobalVariableHelper(VMContext, Context, Name, LinkageName, F,
LineNumber, Ty, isLocalToUnit, Val, Decl, false,
[&] (ArrayRef<Value *> Elts) {