llvm-objdump when printing the Objective-C meta data also prints the Swift ABI

from the value stored in swift_version bits in the flags field in the
objc_image_info struct.  ABI version 3 thru 6 were previously added but this
code was not updated to print the Swift version.

rdar://35624067

llvm-svn: 324767
This commit is contained in:
Kevin Enderby 2018-02-09 19:31:27 +00:00
parent 205c0e085e
commit cda2ced725
1 changed files with 16 additions and 0 deletions

View File

@ -5563,6 +5563,14 @@ static void print_image_info64(SectionRef S, struct DisassembleInfo *info) {
outs() << " Swift 1.0";
else if (swift_version == 2)
outs() << " Swift 1.1";
else if(swift_version == 3)
outs() << " Swift 2.0";
else if(swift_version == 4)
outs() << " Swift 3.0";
else if(swift_version == 5)
outs() << " Swift 4.0";
else if(swift_version == 6)
outs() << " Swift 4.1";
else
outs() << " unknown future Swift version (" << swift_version << ")";
}
@ -5606,6 +5614,14 @@ static void print_image_info32(SectionRef S, struct DisassembleInfo *info) {
outs() << " Swift 1.0";
else if (swift_version == 2)
outs() << " Swift 1.1";
else if(swift_version == 3)
outs() << " Swift 2.0";
else if(swift_version == 4)
outs() << " Swift 3.0";
else if(swift_version == 5)
outs() << " Swift 4.0";
else if(swift_version == 6)
outs() << " Swift 4.1";
else
outs() << " unknown future Swift version (" << swift_version << ")";
}