r188251 - Drive by cleanup
David Blaikie
dblaikie at gmail.com
Mon Aug 12 21:21:39 PDT 2013
Author: dblaikie
Date: Mon Aug 12 23:21:38 2013
New Revision: 188251
URL: http://llvm.org/viewvc/llvm-project?rev=188251&view=rev
Log:
Drive by cleanup
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=188251&r1=188250&r2=188251&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Mon Aug 12 23:21:38 2013
@@ -1926,10 +1926,7 @@ llvm::DIType CGDebugInfo::getCompletedTy
}
// Verify that any cached debug info still exists.
- if (V != 0)
- return llvm::DIType(cast<llvm::MDNode>(V));
-
- return llvm::DIType();
+ return llvm::DIType(cast_or_null<llvm::MDNode>(V));
}
void CGDebugInfo::completeFwdDecl(const RecordDecl &RD) {
@@ -1972,9 +1969,7 @@ llvm::DIType CGDebugInfo::getOrCreateTyp
// Unwrap the type as needed for debug information.
Ty = UnwrapTypeForDebugInfo(Ty, CGM.getContext());
- llvm::DIType T = getCompletedTypeOrNull(Ty);
-
- if (T) {
+ if (llvm::DIType T = getCompletedTypeOrNull(Ty)) {
// If we're looking for a definition, make sure we have definitions of any
// underlying types.
if (const TypedefType* TTy = dyn_cast<TypedefType>(Ty))
More information about the cfe-commits
mailing list