diff options
| author | Devang Patel <dpatel@apple.com> | 2009-01-05 18:33:01 +0000 | 
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2009-01-05 18:33:01 +0000 | 
| commit | 758e7d778186a426b5169ac78af2e134e4b1539c (patch) | |
| tree | 0f39356df3c50fe9369247d2113838e61ed897c8 /llvm/lib/Analysis | |
| parent | 96fce00dc0046aa0ad8e4589b280b0b253db43bf (diff) | |
| download | bcm5719-llvm-758e7d778186a426b5169ac78af2e134e4b1539c.tar.gz bcm5719-llvm-758e7d778186a426b5169ac78af2e134e4b1539c.zip | |
Construct array/vector type DIEs using DebugInfo.
llvm-svn: 61724
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/DebugInfo.cpp | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp index f1f7d8eff35..8b802d7fffa 100644 --- a/llvm/lib/Analysis/DebugInfo.cpp +++ b/llvm/lib/Analysis/DebugInfo.cpp @@ -174,7 +174,12 @@ DIVariable::DIVariable(GlobalVariable *GV) : DIDescriptor(GV) {      GV = 0;  } - +unsigned DIArray::getNumElements() const { +  assert (GV && "Invalid DIArray"); +  Constant *C = GV->getInitializer(); +  assert (C && "Invalid DIArray initializer"); +  return C->getNumOperands(); +}  //===----------------------------------------------------------------------===//  // DIFactory: Basic Helpers | 

