[XCOFF] Add back extern template declarations
authorReid Kleckner <rnk@google.com>
Thu, 7 Nov 2019 17:42:25 +0000 (09:42 -0800)
committerReid Kleckner <rnk@google.com>
Thu, 7 Nov 2019 17:42:25 +0000 (09:42 -0800)
The extern template declarations were fine. The duplicate explicit
instantiations were both in the .cpp file.

llvm/include/llvm/Object/XCOFFObjectFile.h

index 4f80297..fcdbf7a 100644 (file)
@@ -60,6 +60,12 @@ public:
   bool isReservedSectionType() const;
 };
 
+// Explicit extern template declarations.
+struct XCOFFSectionHeader32;
+struct XCOFFSectionHeader64;
+extern template struct XCOFFSectionHeader<XCOFFSectionHeader32>;
+extern template struct XCOFFSectionHeader<XCOFFSectionHeader64>;
+
 struct XCOFFSectionHeader32 : XCOFFSectionHeader<XCOFFSectionHeader32> {
   char Name[XCOFF::NameSize];
   support::ubig32_t PhysicalAddress;