Add ObjC method list atom type. NFC.
authorPete Cooper <peter_cooper@apple.com>
Mon, 1 Feb 2016 23:56:27 +0000 (23:56 +0000)
committerPete Cooper <peter_cooper@apple.com>
Mon, 1 Feb 2016 23:56:27 +0000 (23:56 +0000)
An upcoming patch will use this to create lists of ObjC methods.

Adding it now to reduce the amount of code in that patch.

Test cases will follow in the other patch too.

llvm-svn: 259440

lld/include/lld/Core/DefinedAtom.h
lld/lib/Core/DefinedAtom.cpp
lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp

index baca7ee..70fd60d 100644 (file)
@@ -136,6 +136,7 @@ public:
     typeObjCClassPtr,       // pointer to ObjC class [Darwin]
     typeObjC2CategoryList,  // pointers to ObjC category [Darwin]
     typeObjCImageInfo,      // pointer to ObjC class [Darwin]
+    typeObjCMethodList,     // pointer to ObjC method list [Darwin]
     typeDTraceDOF,          // runtime data for Dtrace [Darwin]
     typeInterposingTuples,  // tuples of interposing info for dyld [Darwin]
     typeTempLTO,            // temporary atom for bitcode reader
index 71d0f67..1e56f66 100644 (file)
@@ -44,6 +44,7 @@ DefinedAtom::ContentPermissions DefinedAtom::permissions(ContentType type) {
   case typeRONote:
   case typeNoAlloc:
   case typeObjCImageInfo:
+  case typeObjCMethodList:
     return permR__;
 
   case typeData:
index 528e80c..a28237b 100644 (file)
@@ -420,6 +420,8 @@ template <> struct ScalarEnumerationTraits<lld::DefinedAtom::ContentType> {
                                           DefinedAtom::typeObjC2CategoryList);
     io.enumCase(value, "objc-image-info",
                                           DefinedAtom::typeObjCImageInfo);
+    io.enumCase(value, "objc-method-list",
+                                          DefinedAtom::typeObjCMethodList);
     io.enumCase(value, "objc-class1",     DefinedAtom::typeObjC1Class);
     io.enumCase(value, "dtraceDOF",       DefinedAtom::typeDTraceDOF);
     io.enumCase(value, "interposing-tuples",