Switch the type field in DIVariable and DIGlobalVariable over to DITypeRefs.

This allows us to catch more opportunities for ODR-based type uniquing
during LTO.
Paired commit with CFE which updates some testcases to verify the new
DIBuilder behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204106 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Adrian Prantl
2014-03-18 02:34:58 +00:00
parent 4d82ca7462
commit 5e8144df32
9 changed files with 51 additions and 32 deletions

View File

@@ -199,10 +199,7 @@ public:
assert(Var.isVariable() && "Invalid complex DbgVariable!");
return Var.hasComplexAddress();
}
bool isBlockByrefVariable() const {
assert(Var.isVariable() && "Invalid complex DbgVariable!");
return Var.isBlockByrefVariable();
}
bool isBlockByrefVariable() const;
unsigned getNumAddrElements() const {
assert(Var.isVariable() && "Invalid complex DbgVariable!");
return Var.getNumAddrElements();
@@ -777,6 +774,11 @@ public:
return Ref.resolve(TypeIdentifierMap);
}
/// \brief Return the TypeIdentifierMap.
const DITypeIdentifierMap& getTypeIdentifierMap() const {
return TypeIdentifierMap;
}
/// Find the DwarfCompileUnit for the given CU Die.
DwarfCompileUnit *lookupUnit(const DIE *CU) const {
return CUDieMap.lookup(CU);