diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-09-17 22:18:59 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-09-17 22:18:59 +0000 |
commit | 6a51dbdb3c163bea935462519f663df3dda34070 (patch) | |
tree | cee2ab35845f314665128b61f0553481a20c7ad5 /llvm/lib/Bitcode/Writer | |
parent | bf19a11116c60d472bfc3062cbae9341a9debe37 (diff) | |
download | bcm5719-llvm-6a51dbdb3c163bea935462519f663df3dda34070.tar.gz bcm5719-llvm-6a51dbdb3c163bea935462519f663df3dda34070.zip |
[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.
llvm-svn: 247952
Diffstat (limited to 'llvm/lib/Bitcode/Writer')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 1acb7d02d86..3ab738a2c02 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -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)); |