aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2020-03-03 16:05:23 -0800
committerAdrian Prantl <aprantl@apple.com>2020-03-11 18:47:30 -0700
commitd5180ea134796f96b0c6c4ab23c592d58f25733d (patch)
tree9a6b1036e3e428b9f313184794742030f8295f91 /llvm/lib/Bitcode/Reader/MetadataLoader.cpp
parent49d4e0e3278c640164c29c92ee624d8935bc19b6 (diff)
downloadllvm-d5180ea134796f96b0c6c4ab23c592d58f25733d.zip
llvm-d5180ea134796f96b0c6c4ab23c592d58f25733d.tar.gz
llvm-d5180ea134796f96b0c6c4ab23c592d58f25733d.tar.bz2
Add debug info support for Swift/Clang APINotes.
In order for dsymutil to collect .apinotes files (which capture attributes such as nullability, Swift import names, and availability), I want to propose adding an apinotes: field to DIModule that gets translated into a DW_AT_LLVM_apinotes (path) nested inside DW_TAG_module. This will be primarily used by LLDB to indirectly extract the Swift names of Clang declarations that were deserialized from DWARF. <rdar://problem/59514626> Differential Revision: https://reviews.llvm.org/D75585
Diffstat (limited to 'llvm/lib/Bitcode/Reader/MetadataLoader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/MetadataLoader.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
index 17778e7..c1fa91d 100644
--- a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
+++ b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
@@ -1418,14 +1418,15 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
}
case bitc::METADATA_MODULE: {
- if (Record.size() < 5 || Record.size() > 6)
+ if (Record.size() < 5 || Record.size() > 7)
return error("Invalid record");
IsDistinct = Record[0];
MetadataList.assignValue(
- GET_OR_DISTINCT(
- DIModule, (Context, getMDOrNull(Record[1]), getMDString(Record[2]),
- getMDString(Record[3]), getMDString(Record[4]))),
+ GET_OR_DISTINCT(DIModule,
+ (Context, getMDOrNull(Record[1]),
+ getMDString(Record[2]), getMDString(Record[3]),
+ getMDString(Record[4]), getMDString(Record[5]))),
NextMetadataNo);
NextMetadataNo++;
break;