diff options
| author | Torok Edwin <edwintorok@gmail.com> | 2008-12-13 08:25:29 +0000 |
|---|---|---|
| committer | Torok Edwin <edwintorok@gmail.com> | 2008-12-13 08:25:29 +0000 |
| commit | 040688f1b2ab0c5ad29c8817ad94c946c6746e3d (patch) | |
| tree | 1586759d527174a37cd2217f4120d8a5d6ea90e8 /llvm/lib/Analysis | |
| parent | 472cd640fae612f51af0a0018c5b72c3130aa7bd (diff) | |
| download | bcm5719-llvm-040688f1b2ab0c5ad29c8817ad94c946c6746e3d.tar.gz bcm5719-llvm-040688f1b2ab0c5ad29c8817ad94c946c6746e3d.zip | |
Fix getFieldAs() to use the parameter instead of 6.
Add missing DIType constructor, needed by DIVariable::getType().
llvm-svn: 60976
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/DebugInfo.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp index 01db8abf4e2..29175a6a2d4 100644 --- a/llvm/lib/Analysis/DebugInfo.cpp +++ b/llvm/lib/Analysis/DebugInfo.cpp @@ -100,6 +100,14 @@ DIGlobalVariable::DIGlobalVariable(GlobalVariable *GV) : DIGlobal(GV, dwarf::DW_TAG_variable) {} DIBlock::DIBlock(GlobalVariable *GV) : DIDescriptor(GV, dwarf::DW_TAG_lexical_block) {} +// needed by DIVariable::getType() +DIType::DIType(GlobalVariable *GV) : DIDescriptor(GV) { + if (!GV) return; + unsigned tag = getTag(); + if (tag != dwarf::DW_TAG_base_type && !DIDerivedType::isDerivedType(tag) && + !DICompositeType::isCompositeType(tag)) + GV = 0; +} /// isDerivedType - Return true if the specified tag is legal for /// DIDerivedType. |

