aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2020-01-14 13:37:04 -0800
committerAdrian Prantl <aprantl@apple.com>2020-01-17 09:36:48 -0800
commit12e479475a896f664fb721f98c2d6805185ac352 (patch)
treee765d8cdcdf28a6368adcaae3b9b46b7cdc117a6 /llvm/lib/Bitcode/Reader/MetadataLoader.cpp
parent859e379ffbbb40302926940b8c87fb7a99931612 (diff)
downloadllvm-12e479475a896f664fb721f98c2d6805185ac352.zip
llvm-12e479475a896f664fb721f98c2d6805185ac352.tar.gz
llvm-12e479475a896f664fb721f98c2d6805185ac352.tar.bz2
Rename DW_AT_LLVM_isysroot to DW_AT_LLVM_sysroot
This is a purely cosmetic change that is NFC in terms of the binary output. I bugs me that I called the attribute DW_AT_LLVM_isysroot since the "i" is an artifact of GCC command line option syntax (-isysroot is in the category of -i options) and doesn't carry any useful information otherwise. This attribute only appears in Clang module debug info. Differential Revision: https://reviews.llvm.org/D71722
Diffstat (limited to 'llvm/lib/Bitcode/Reader/MetadataLoader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/MetadataLoader.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
index d16c3b0..3cff468 100644
--- a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
+++ b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
@@ -1418,15 +1418,14 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
}
case bitc::METADATA_MODULE: {
- if (Record.size() != 6)
+ if (Record.size() < 5 || Record.size() > 6)
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]), getMDString(Record[5]))),
+ GET_OR_DISTINCT(
+ DIModule, (Context, getMDOrNull(Record[1]), getMDString(Record[2]),
+ getMDString(Record[3]), getMDString(Record[4]))),
NextMetadataNo);
NextMetadataNo++;
break;
@@ -1457,7 +1456,7 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
break;
}
case bitc::METADATA_COMPILE_UNIT: {
- if (Record.size() < 14 || Record.size() > 19)
+ if (Record.size() < 14 || Record.size() > 21)
return error("Invalid record");
// Ignore Record[0], which indicates whether this compile unit is
@@ -1473,7 +1472,9 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
Record.size() <= 16 ? true : Record[16],
Record.size() <= 17 ? false : Record[17],
Record.size() <= 18 ? 0 : Record[18],
- Record.size() <= 19 ? 0 : Record[19]);
+ false, // FIXME: https://reviews.llvm.org/rGc51b45e32ef7f35c11891f60871aa9c2c04cd991
+ // Record.size() <= 19 ? 0 : Record[19],
+ Record.size() <= 20 ? nullptr : getMDString(Record[20]));
MetadataList.assignValue(CU, NextMetadataNo);
NextMetadataNo++;