summaryrefslogtreecommitdiff
path: root/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-07-25 21:19:31 +0000
committerManman Ren <manman.ren@gmail.com>2013-07-25 21:19:31 +0000
commit3367ed322026a475273dc676896c0d03c1e8102f (patch)
treeea10c55edcfdb80242fdbf55cbfe350b5eabc349 /lib/IR/DebugInfo.cpp
parent1a9e24844fc8e9f147d0722c7384523e843bd5bb (diff)
downloadllvm-3367ed322026a475273dc676896c0d03c1e8102f.tar.gz
llvm-3367ed322026a475273dc676896c0d03c1e8102f.tar.bz2
llvm-3367ed322026a475273dc676896c0d03c1e8102f.tar.xz
Debug Info: update comments and add a FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187157 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/DebugInfo.cpp')
-rw-r--r--lib/IR/DebugInfo.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp
index bbdff5e483..750231658f 100644
--- a/lib/IR/DebugInfo.cpp
+++ b/lib/IR/DebugInfo.cpp
@@ -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())