diff options
| author | Pete Cooper <peter_cooper@apple.com> | 2016-01-16 00:07:22 +0000 |
|---|---|---|
| committer | Pete Cooper <peter_cooper@apple.com> | 2016-01-16 00:07:22 +0000 |
| commit | a014ffef87a537524811b041ea6b88bec14eee50 (patch) | |
| tree | af97f4b4f89a3b0dab63529c801257e963a671e5 /lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp | |
| parent | 628bc3ec00e487daefb7399e48d6364e7449a09e (diff) | |
| download | bcm5719-llvm-a014ffef87a537524811b041ea6b88bec14eee50.tar.gz bcm5719-llvm-a014ffef87a537524811b041ea6b88bec14eee50.zip | |
Add checking of differing swift versions in input files.
Swift versions are part of the objc image info section, and must match
for all files linked which actually have an image info section
llvm-svn: 257964
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp')
| -rw-r--r-- | lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp index 770b58b2270..78c930bac0f 100644 --- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp +++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp @@ -911,6 +911,9 @@ std::error_code parseObjCImageInfo(const NormalizedFile &normalizedFile, " in file " + file.path() + " should have version=0"); + uint32_t flags = read32(content.data() + 4, isBig); + file.setSwiftVersion((flags >> 8) & 0xFF); + return std::error_code(); } |

