summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-17 22:34:15 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-17 22:34:15 +0000
commita55dcaf427eeaa5665ef1ccd636bdc1e4b0c3ded (patch)
tree24a4282e4038f43318f3b3619cc10ab34d61af2e /llvm/lib
parent57bab0bc97d1e6ff118fb2f3a2a6856cbedff1de (diff)
downloadbcm5719-llvm-a55dcaf427eeaa5665ef1ccd636bdc1e4b0c3ded.tar.gz
bcm5719-llvm-a55dcaf427eeaa5665ef1ccd636bdc1e4b0c3ded.zip
IR: fieldIsMDNode() should be false for MDString
Simplify the code. It has been a while since the schema has been so "flexible". llvm-svn: 229573
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 76b21d8d09d..9a7ff062de0 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -385,16 +385,9 @@ bool DIObjCProperty::Verify() const {
}
/// \brief 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).
Metadata *Fld = getField(DbgNode, Elt);
- if (Fld && isa<MDString>(Fld) && !cast<MDString>(Fld)->getString().empty())
- return false;
- return true;
+ return !Fld || isa<MDNode>(Fld);
}
/// \brief Check if a field at position Elt of a MDNode is a MDString.
OpenPOWER on IntegriCloud