diff options
author | Devang Patel <dpatel@apple.com> | 2010-03-08 20:53:17 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-03-08 20:53:17 +0000 |
commit | d3cbaa1ddfa4f3a07b90ac87dff54e0bb9f06927 (patch) | |
tree | 78423c0985551a78847ac9d9e6f8256f1acecbc0 /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | 3b548aa8e2c32460b21dd47b89fd1267fcd35504 (diff) | |
download | bcm5719-llvm-d3cbaa1ddfa4f3a07b90ac87dff54e0bb9f06927.tar.gz bcm5719-llvm-d3cbaa1ddfa4f3a07b90ac87dff54e0bb9f06927.zip |
Avoid using DIDescriptor.isNull().
llvm-svn: 97976
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 0f3502e9bea..9b469452a37 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -98,7 +98,7 @@ llvm::DICompileUnit CGDebugInfo::getOrCreateCompileUnit(SourceLocation Loc) { // 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 @@ CollectCXXBases(const CXXRecordDecl *RD, llvm::DICompileUnit Unit, /// 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 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, QualType FnType, 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; |