[llvm] r187157 - Debug Info: update comments and add a FIXME.

Manman Ren manman.ren at gmail.com
Thu Jul 25 14:19:31 PDT 2013


Author: mren
Date: Thu Jul 25 16:19:31 2013
New Revision: 187157

URL: http://llvm.org/viewvc/llvm-project?rev=187157&view=rev
Log:
Debug Info: update comments and add a FIXME.

Modified:
    llvm/trunk/lib/IR/DebugInfo.cpp

Modified: llvm/trunk/lib/IR/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=187157&r1=187156&r2=187157&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfo.cpp Thu Jul 25 16:19:31 2013
@@ -406,9 +406,12 @@ bool DIObjCProperty::Verify() const {
   return DbgNode->getNumOperands() == 8;
 }
 
-/// We allow an empty string to represent null. But we don't allow
-/// a non-empty string in a MDNode field.
+/// Check if a field at position Elt of a MDNode is a MDNode.
+/// We currently allow an empty string and an integer.
+/// But we don't allow a non-empty string in a MDNode field.
 static bool fieldIsMDNode(const MDNode *DbgNode, unsigned Elt) {
+  // FIXME: This function should return true, if the field is null or the field
+  // is indeed a MDNode: return !Fld || isa<MDNode>(Fld).
   Value *Fld = getField(DbgNode, Elt);
   if (Fld && isa<MDString>(Fld) &&
       !cast<MDString>(Fld)->getString().empty())





More information about the llvm-commits mailing list