diff options
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index d36d04e..2ce285c 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -84,6 +84,15 @@ static void GetObjCImageInfo(Module &M, unsigned &Version, unsigned &Flags, } else if (Key == "Objective-C Image Info Section") { Section = cast<MDString>(MFE.Val)->getString(); } + // Backend generates L_OBJC_IMAGE_INFO from Swift ABI version + major + minor + + // "Objective-C Garbage Collection". + else if (Key == "Swift ABI Version") { + Flags |= (mdconst::extract<ConstantInt>(MFE.Val)->getZExtValue()) << 8; + } else if (Key == "Swift Major Version") { + Flags |= (mdconst::extract<ConstantInt>(MFE.Val)->getZExtValue()) << 24; + } else if (Key == "Swift Minor Version") { + Flags |= (mdconst::extract<ConstantInt>(MFE.Val)->getZExtValue()) << 16; + } } } |