diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-08-13 04:21:38 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-08-13 04:21:38 +0000 |
commit | 80d28de87a2d8d1f1bf72418a7523e4debe0e948 (patch) | |
tree | 75a952b061a2bcc4d00f695a4455e16b34975aaa | |
parent | a11bd8a7dc7edefd5dbdabfb4ef0391a09b93235 (diff) | |
download | bcm5719-llvm-80d28de87a2d8d1f1bf72418a7523e4debe0e948.tar.gz bcm5719-llvm-80d28de87a2d8d1f1bf72418a7523e4debe0e948.zip |
Drive by cleanup
llvm-svn: 188251
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index f45a2005794..1d3bad9f6dd 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1926,10 +1926,7 @@ llvm::DIType CGDebugInfo::getCompletedTypeOrNull(QualType Ty) { } // 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::getOrCreateType(QualType Ty, llvm::DIFile Unit, // 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)) |