projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79b4538
)
DebugInfo Verifier: verify the actual type.
author
Manman Ren
<manman.ren@gmail.com>
Tue, 23 Jul 2013 18:14:25 +0000
(18:14 +0000)
committer
Manman Ren
<manman.ren@gmail.com>
Tue, 23 Jul 2013 18:14:25 +0000
(18:14 +0000)
llvm-svn: 186972
llvm/lib/IR/DebugInfo.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/IR/DebugInfo.cpp
b/llvm/lib/IR/DebugInfo.cpp
index
9d88ce0
..
28b703f
100644
(file)
--- a/
llvm/lib/IR/DebugInfo.cpp
+++ b/
llvm/lib/IR/DebugInfo.cpp
@@
-458,6
+458,16
@@
bool DIType::Verify() const {
Tag != dwarf::DW_TAG_friend &&
getFilename().empty())
return false;
+ // DIType is abstract, it should be a BasicType, a DerivedType or
+ // a CompositeType.
+ if (isBasicType())
+ DIBasicType(DbgNode).Verify();
+ else if (isCompositeType())
+ DICompositeType(DbgNode).Verify();
+ else if (isDerivedType())
+ DIDerivedType(DbgNode).Verify();
+ else
+ return false;
return true;
}