[llvm-commits] [llvm] r159848 - in /llvm/trunk: include/llvm/DebugInfo.h lib/VMCore/DebugInfo.cpp

Bill Wendling isanbard at gmail.com
Fri Jul 6 12:12:31 PDT 2012


Author: void
Date: Fri Jul  6 14:12:31 2012
New Revision: 159848

URL: http://llvm.org/viewvc/llvm-project?rev=159848&view=rev
Log:
Add a print method to the ObjC property object.

Modified:
    llvm/trunk/include/llvm/DebugInfo.h
    llvm/trunk/lib/VMCore/DebugInfo.cpp

Modified: llvm/trunk/include/llvm/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo.h?rev=159848&r1=159847&r2=159848&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/DebugInfo.h Fri Jul  6 14:12:31 2012
@@ -754,6 +754,8 @@
   };
 
   class DIObjCProperty : public DIDescriptor {
+    friend class DIDescriptor;
+    void printInternal(raw_ostream &OS) const;
   public:
     explicit DIObjCProperty(const MDNode *N) : DIDescriptor(N) { }
 

Modified: llvm/trunk/lib/VMCore/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/DebugInfo.cpp?rev=159848&r1=159847&r2=159848&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/DebugInfo.cpp (original)
+++ llvm/trunk/lib/VMCore/DebugInfo.cpp Fri Jul  6 14:12:31 2012
@@ -1018,6 +1018,8 @@
     DIGlobalVariable(DbgNode).printInternal(OS);
   } else if (this->isVariable()) {
     DIVariable(DbgNode).printInternal(OS);
+  } else if (this->isObjCProperty()) {
+    DIObjCProperty(DbgNode).printInternal(OS);
   }
 }
 
@@ -1121,6 +1123,15 @@
   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.





More information about the llvm-commits mailing list