diff options
-rw-r--r-- | include/llvm/DebugInfo.h | 2 | ||||
-rw-r--r-- | lib/VMCore/DebugInfo.cpp | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h index fdbafd69f2..618220fcb0 100644 --- a/include/llvm/DebugInfo.h +++ b/include/llvm/DebugInfo.h @@ -754,6 +754,8 @@ namespace llvm { }; class DIObjCProperty : public DIDescriptor { + friend class DIDescriptor; + void printInternal(raw_ostream &OS) const; public: explicit DIObjCProperty(const MDNode *N) : DIDescriptor(N) { } diff --git a/lib/VMCore/DebugInfo.cpp b/lib/VMCore/DebugInfo.cpp index d7144adcb0..bb700a9481 100644 --- a/lib/VMCore/DebugInfo.cpp +++ b/lib/VMCore/DebugInfo.cpp @@ -1018,6 +1018,8 @@ void DIDescriptor::print(raw_ostream &OS) const { DIGlobalVariable(DbgNode).printInternal(OS); } else if (this->isVariable()) { DIVariable(DbgNode).printInternal(OS); + } else if (this->isObjCProperty()) { + DIObjCProperty(DbgNode).printInternal(OS); } } @@ -1121,6 +1123,15 @@ void DIVariable::printInternal(raw_ostream &OS) const { OS << " [line " << getLineNumber() << ']'; } +void DIObjCProperty::printInternal(raw_ostream &OS) const { + StringRef Name = getObjCPropertyName(); + if (!Name.empty()) + OS << " [" << Name << ']'; + + OS << " [line " << getLineNumber() + << ", properties " << getUnsignedField(6) << ']'; +} + static void printDebugLoc(DebugLoc DL, raw_ostream &CommentOS, const LLVMContext &Ctx) { if (!DL.isUnknown()) { // Print source line info. |