Verifier: Check for incompatible bit piece expressions
[oota-llvm.git] / lib / IR / DebugInfo.cpp
index 1fbc53c195b1def1c3055f2a4dd8a0e859323e3a..19b799e0892d1a3e6ebc95283bfd729b3a9c2cd9 100644 (file)
 using namespace llvm;
 using namespace llvm::dwarf;
 
-/// \brief Return the size reported by the variable's type.
-unsigned DIVariable::getSizeInBits(const DITypeIdentifierMap &Map) {
-  DIType Ty = getType().resolve(Map);
-  // Follow derived types until we reach a type that
-  // reports back a size.
-  while (isa<MDDerivedType>(Ty) && !Ty.getSizeInBits()) {
-    DIDerivedType DT = cast<MDDerivedType>(Ty);
-    Ty = DT.getTypeDerivedFrom().resolve(Map);
-  }
-  assert(Ty.getSizeInBits() && "type with size 0");
-  return Ty.getSizeInBits();
-}
-
 //===----------------------------------------------------------------------===//
 // Simple Descriptor Constructors and other Methods
 //===----------------------------------------------------------------------===//