[cfe-commits] r97976 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Devang Patel
dpatel at apple.com
Mon Mar 8 12:53:17 PST 2010
Author: dpatel
Date: Mon Mar 8 14:53:17 2010
New Revision: 97976
URL: http://llvm.org/viewvc/llvm-project?rev=97976&view=rev
Log:
Avoid using DIDescriptor.isNull().
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=97976&r1=97975&r2=97976&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Mon Mar 8 14:53:17 2010
@@ -98,7 +98,7 @@
// See if this compile unit has been used before for this valid location.
llvm::DICompileUnit &Unit = CompileUnitCache[FID];
- if (!Unit.isNull()) return Unit;
+ if (Unit.Verify()) return Unit;
}
// Get absolute path name.
@@ -698,7 +698,7 @@
/// getOrCreateVTablePtrType - Return debug info descriptor for vtable.
llvm::DIType CGDebugInfo::getOrCreateVTablePtrType(llvm::DICompileUnit Unit) {
- if (!VTablePtrType.isNull())
+ if (VTablePtrType.isValid())
return VTablePtrType;
ASTContext &Context = CGM.getContext();
@@ -1306,8 +1306,8 @@
llvm::DenseMap<const FunctionDecl *, llvm::WeakVH>::iterator
FI = SPCache.find(FD);
if (FI != SPCache.end()) {
- llvm::DISubprogram SP(dyn_cast_or_null<llvm::MDNode>(FI->second));
- if (!SP.isNull() && SP.isSubprogram() && SP.isDefinition()) {
+ llvm::DIDescriptor SP(dyn_cast_or_null<llvm::MDNode>(FI->second));
+ if (SP.isSubprogram() && llvm::DISubprogram(SP.getNode()).isDefinition()) {
RegionStack.push_back(SP.getNode());
RegionMap[D] = llvm::WeakVH(SP.getNode());
return;
More information about the cfe-commits
mailing list