aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-03-08 19:20:58 +0000
committerDevang Patel <dpatel@apple.com>2010-03-08 19:20:58 +0000
commitdd7b0d5d2763be1061cc99ca3e55a99cdee70816 (patch)
tree3750f30cd4472bc3c83ef9506bdcba6f2fe1d35a /lib/CodeGen/CGDebugInfo.cpp
parentf6f8d5a47c314ee9ffeca744250f3430540bdf36 (diff)
Revert r97949.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97964 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 9b469452a3..0f3502e9be 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/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.Verify()) return Unit;
+ if (!Unit.isNull()) 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.isValid())
+ if (!VTablePtrType.isNull())
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::DIDescriptor SP(dyn_cast_or_null<llvm::MDNode>(FI->second));
- if (SP.isSubprogram() && llvm::DISubprogram(SP.getNode()).isDefinition()) {
+ llvm::DISubprogram SP(dyn_cast_or_null<llvm::MDNode>(FI->second));
+ if (!SP.isNull() && SP.isSubprogram() && SP.isDefinition()) {
RegionStack.push_back(SP.getNode());
RegionMap[D] = llvm::WeakVH(SP.getNode());
return;