diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/DwarfWriter.cpp | 6 | ||||
-rw-r--r-- | lib/CodeGen/MachineDebugInfo.cpp | 9 | ||||
-rw-r--r-- | lib/VMCore/IntrinsicInst.cpp | 4 |
3 files changed, 16 insertions, 3 deletions
diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp index 55bac8b..14bb962 100644 --- a/lib/CodeGen/DwarfWriter.cpp +++ b/lib/CodeGen/DwarfWriter.cpp @@ -1383,6 +1383,12 @@ DIE *DwarfWriter::NewType(DIE *Context, TypeDesc *TyDesc, CompileUnit *Unit) { Block->AddUInt(DW_FORM_udata, FieldOffset >> 3); Block->ComputeSize(*this); Member->AddBlock(DW_AT_data_member_location, 0, Block); + + if (MemberDesc->isProtected()) { + Member->AddUInt(DW_AT_accessibility, 0, DW_ACCESS_protected); + } else if (MemberDesc->isPrivate()) { + Member->AddUInt(DW_AT_accessibility, 0, DW_ACCESS_private); + } Ty->AddChild(Member); } diff --git a/lib/CodeGen/MachineDebugInfo.cpp b/lib/CodeGen/MachineDebugInfo.cpp index c1aac50..54fb1b9 100644 --- a/lib/CodeGen/MachineDebugInfo.cpp +++ b/lib/CodeGen/MachineDebugInfo.cpp @@ -671,6 +671,7 @@ TypeDesc::TypeDesc(unsigned T) , Size(0) , Align(0) , Offset(0) +, Flags(0) {} /// ApplyToFields - Target the visitor to the fields of the TypeDesc. @@ -685,6 +686,7 @@ void TypeDesc::ApplyToFields(DIVisitor *Visitor) { Visitor->Apply(Size); Visitor->Apply(Align); Visitor->Apply(Offset); + if (getVersion() > LLVMDebugVersion4) Visitor->Apply(Flags); } /// getDescString - Return a string used to compose global names and labels. @@ -710,7 +712,8 @@ void TypeDesc::dump() { << "Line(" << Line << "), " << "Size(" << Size << "), " << "Align(" << Align << "), " - << "Offset(" << Offset << ")\n"; + << "Offset(" << Offset << "), " + << "Flags(" << Flags << ")\n"; } #endif @@ -1029,6 +1032,7 @@ GlobalDesc::GlobalDesc(unsigned T) : AnchoredDesc(T) , Context(0) , Name("") +, DisplayName("") , File(NULL) , Line(0) , TyDesc(NULL) @@ -1043,6 +1047,7 @@ void GlobalDesc::ApplyToFields(DIVisitor *Visitor) { Visitor->Apply(Context); Visitor->Apply(Name); + if (getVersion() > LLVMDebugVersion4) Visitor->Apply(DisplayName); Visitor->Apply(File); Visitor->Apply(Line); Visitor->Apply(TyDesc); @@ -1096,6 +1101,7 @@ void GlobalVariableDesc::dump() { << "Tag(" << getTag() << "), " << "Anchor(" << getAnchor() << "), " << "Name(\"" << getName() << "\"), " + << "DisplayName(\"" << getDisplayName() << "\"), " << "File(" << getFile() << ")," << "Line(" << getLine() << ")," << "Type(\"" << getType() << "\"), " @@ -1148,6 +1154,7 @@ void SubprogramDesc::dump() { << "Tag(" << getTag() << "), " << "Anchor(" << getAnchor() << "), " << "Name(\"" << getName() << "\"), " + << "DisplayName(\"" << getDisplayName() << "\"), " << "File(" << getFile() << ")," << "Line(" << getLine() << ")," << "Type(\"" << getType() << "\"), " diff --git a/lib/VMCore/IntrinsicInst.cpp b/lib/VMCore/IntrinsicInst.cpp index 9c2efc3..a85d9a4 100644 --- a/lib/VMCore/IntrinsicInst.cpp +++ b/lib/VMCore/IntrinsicInst.cpp @@ -61,7 +61,7 @@ Value *DbgInfoIntrinsic::StripCast(Value *C) { std::string DbgStopPointInst::getFileName() const { // Once the operand indices are verified, update this assert - assert(LLVMDebugVersion == (4 << 16) && "Verify operand indices"); + assert(LLVMDebugVersion == (5 << 16) && "Verify operand indices"); GlobalVariable *GV = cast<GlobalVariable>(getContext()); ConstantStruct *CS = cast<ConstantStruct>(GV->getInitializer()); return CS->getOperand(3)->getStringValue(); @@ -69,7 +69,7 @@ std::string DbgStopPointInst::getFileName() const { std::string DbgStopPointInst::getDirectory() const { // Once the operand indices are verified, update this assert - assert(LLVMDebugVersion == (4 << 16) && "Verify operand indices"); + assert(LLVMDebugVersion == (5 << 16) && "Verify operand indices"); GlobalVariable *GV = cast<GlobalVariable>(getContext()); ConstantStruct *CS = cast<ConstantStruct>(GV->getInitializer()); return CS->getOperand(4)->getStringValue(); |