From f7b367ce455d034843c8992b69dd41df6bde383e Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 16 Feb 2012 01:10:50 +0000 Subject: [PATCH] Give a description of the Objective-C garbage collection module flags. The rule governing the flags is this: no-gc + no-gc = no-gc no-gc + gc = no-gc no-gc + gc-only = error gc + gc = gc gc + gc-only = gc-only gc-only + gc-only = gc-only git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150646 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.html | 73 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/docs/LangRef.html b/docs/LangRef.html index 074e91e684c..5d3c7458c2d 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -110,6 +110,7 @@
  • Module Flags Metadata
      +
    1. Objective-C Garbage Collection Module Flags Metadata
  • Intrinsic Global Variables @@ -3147,12 +3148,84 @@ call void @llvm.dbg.value(metadata !24, i64 0, metadata !25)
     metadata !{ metadata !"foo", i32 1 }
     
    +

    The behavior is to emit an error if the llvm.module.flags does not contain a flag with the ID !"foo" that has the value '1'. If two or more !"qux" flags exist, then they must have the same value or an error will be issued.

  • + + +

    +Objective-C Garbage Collection Module Flags Metadata +

    + +
    + +

    On the Mach-O platform, Objective-C stores metadata about garbage collection + in a special section called "image info". The metadata consists of a version + number and a bitmask specifying what types of garbage collection are + supported (if any) by the file. If two or more modules are linked together + their garbage collection metadata needs to be merged rather than appended + together.

    + +

    The Objective-C garbage collection module flags metadata consists of the + following key-value pairs:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    KeyValue
    Objective-C Version[Required] — The Objective-C ABI + version. Valid values are 1 and 2.
    Objective-C Image Info Version[Required] — The version of the image info + section. Currently always 0.
    Objective-C Image Info Section[Required] — The section to place the + metadata. Valid values are "__OBJC, __image_info, regular" for + Objective-C ABI version 1, and "__DATA,__objc_imageinfo, regular, + no_dead_strip" for Objective-C ABI version 2.
    Objective-C Garbage Collection[Required] — Specifies whether garbage + collection is supported or not. Valid values are 0, for no garbage + collection, and 2, for garbage collection supported.
    Objective-C GC Only[Optional] — Specifies that only garbage + collection is supported. If present, its value must be 6. This flag + requires that the Objective-C Garbage Collection flag have the + value 2.
    + +

    Some important flag interactions:

    + + + +
    +