isSubroutineType does not test for isCompositeType

Yaron Keren yaron.keren at gmail.com
Sat Dec 13 11:07:58 PST 2014


The test for isCompositeType() seems to have no purpose, as getTag() is
tested for specific value anyhow.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141213/1545828e/attachment.html>
-------------- next part --------------
Index: lib/IR/DebugInfo.cpp
===================================================================
--- lib/IR/DebugInfo.cpp	(revision 224196)
+++ lib/IR/DebugInfo.cpp	(working copy)
@@ -166,7 +166,7 @@
 //===----------------------------------------------------------------------===//
 
 bool DIDescriptor::isSubroutineType() const {
-  return isCompositeType() && getTag() == dwarf::DW_TAG_subroutine_type;
+  return DbgNode && getTag() == dwarf::DW_TAG_subroutine_type;
 }
 
 bool DIDescriptor::isBasicType() const {


More information about the llvm-commits mailing list