[opaque pointer types] Add an explicit pointee type to alias records in the IR

Since aliases actually use and verify their explicit type already, no
further invalid testing is required here. The
invalid.test:ALIAS-TYPE-MISMATCH case catches errors due to emitting a
non-pointee type in the new format or a non-pointer type in the old
format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247952 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2015-09-17 22:18:59 +00:00
parent 7f61c22d41
commit 5fab6109a3
3 changed files with 45 additions and 25 deletions
+2 -1
View File
@@ -756,7 +756,8 @@ static uint64_t WriteModuleInfo(const Module *M, const ValueEnumerator &VE,
// Emit the alias information.
for (const GlobalAlias &A : M->aliases()) {
// ALIAS: [alias type, aliasee val#, linkage, visibility]
Vals.push_back(VE.getTypeID(A.getType()));
Vals.push_back(VE.getTypeID(A.getValueType()));
Vals.push_back(A.getType()->getAddressSpace());
Vals.push_back(VE.getValueID(A.getAliasee()));
Vals.push_back(getEncodedLinkage(A));
Vals.push_back(getEncodedVisibility(A));