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

@@ -466,7 +466,7 @@ namespace llvm {
/// @param Val llvm::Value of the variable.
DIGlobalVariable
createGlobalVariable(StringRef Name, DIFile File, unsigned LineNo,
DIType Ty, bool isLocalToUnit, llvm::Value *Val);
DITypeRef Ty, bool isLocalToUnit, llvm::Value *Val);
/// \brief Create a new descriptor for the specified global.
/// @param Name Name of the variable.
@@ -479,7 +479,7 @@ namespace llvm {
/// @param Val llvm::Value of the variable.
DIGlobalVariable
createGlobalVariable(StringRef Name, StringRef LinkageName, DIFile File,
unsigned LineNo, DIType Ty, bool isLocalToUnit,
unsigned LineNo, DITypeRef Ty, bool isLocalToUnit,
llvm::Value *Val);
/// createStaticVariable - Create a new descriptor for the specified
@@ -497,7 +497,7 @@ namespace llvm {
DIGlobalVariable
createStaticVariable(DIDescriptor Context, StringRef Name,
StringRef LinkageName, DIFile File, unsigned LineNo,
DIType Ty, bool isLocalToUnit, llvm::Value *Val,
DITypeRef Ty, bool isLocalToUnit, llvm::Value *Val,
MDNode *Decl = NULL);
@@ -518,7 +518,7 @@ namespace llvm {
DIVariable createLocalVariable(unsigned Tag, DIDescriptor Scope,
StringRef Name,
DIFile File, unsigned LineNo,
DIType Ty, bool AlwaysPreserve = false,
DITypeRef Ty, bool AlwaysPreserve = false,
unsigned Flags = 0,
unsigned ArgNo = 0);
@@ -537,7 +537,7 @@ namespace llvm {
/// number. 1 indicates 1st argument.
DIVariable createComplexVariable(unsigned Tag, DIDescriptor Scope,
StringRef Name, DIFile F, unsigned LineNo,
DIType Ty, ArrayRef<Value *> Addr,
DITypeRef Ty, ArrayRef<Value *> Addr,
unsigned ArgNo = 0);
/// createFunction - Create a new descriptor for the specified subprogram.