Superfluous dyn_cast in DISubprogram::getFunction()
Yaron Keren
yaron.keren at gmail.com
Thu Apr 9 08:38:43 PDT 2015
This dyn_cast does not seem to be required.
Yaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150409/ebf4c154/attachment.html>
-------------- next part --------------
Index: lib/IR/DebugInfo.cpp
===================================================================
--- lib/IR/DebugInfo.cpp (revision 234493)
+++ lib/IR/DebugInfo.cpp (working copy)
@@ -110,7 +110,7 @@
Function *DISubprogram::getFunction() const {
if (auto *N = get())
- if (auto *C = dyn_cast_or_null<ConstantAsMetadata>(N->getFunction()))
+ if (auto *C = N->getFunction())
return dyn_cast<Function>(C->getValue());
return nullptr;
}
More information about the llvm-commits
mailing list