DI: Disallow uniquable DICompileUnits
Since r241097, `DIBuilder` has only created distinct `DICompileUnit`s.
The backend is liable to start relying on that (if it hasn't already),
so make uniquable `DICompileUnit`s illegal and automatically upgrade old
bitcode. This is a nice cleanup, since we can remove an unnecessary
`DenseSet` (and the associated uniquing info) from `LLVMContextImpl`.
Almost all the testcases were updated with this script:
git grep -e '= !DICompileUnit' -l -- test |
grep -v test/Bitcode |
xargs sed -i '' -e 's,= !DICompileUnit,= distinct !DICompileUnit,'
I imagine something similar should work for out-of-tree testcases.
llvm-svn: 243885
This commit is contained in:
@@ -943,7 +943,8 @@ static void WriteDICompileUnit(const DICompileUnit *N,
|
||||
BitstreamWriter &Stream,
|
||||
SmallVectorImpl<uint64_t> &Record,
|
||||
unsigned Abbrev) {
|
||||
Record.push_back(N->isDistinct());
|
||||
assert(N->isDistinct() && "Expected distinct compile units");
|
||||
Record.push_back(/* IsDistinct */ true);
|
||||
Record.push_back(N->getSourceLanguage());
|
||||
Record.push_back(VE.getMetadataOrNullID(N->getFile()));
|
||||
Record.push_back(VE.getMetadataOrNullID(N->getRawProducer()));
|
||||
|
||||
Reference in New Issue
Block a user