Revert "[XCOFF] Fix link errors from explicit template instantiation"
authorReid Kleckner <rnk@google.com>
Thu, 7 Nov 2019 17:39:13 +0000 (09:39 -0800)
committerReid Kleckner <rnk@google.com>
Thu, 7 Nov 2019 17:39:13 +0000 (09:39 -0800)
This reverts commit c989993ba1a666f04f7aee7df51d9f4de0588b71.

maskray already fixed the explicit instantiation definition in the .cpp
file, and these extern template declarations seem to be causing
warnings that I don't understand.

llvm/include/llvm/Object/XCOFFObjectFile.h
llvm/lib/Object/XCOFFObjectFile.cpp

index fcdbf7a..4f80297 100644 (file)
@@ -60,12 +60,6 @@ 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;
index 3ea42bb..5ca2a6a 100644 (file)
@@ -61,10 +61,6 @@ bool XCOFFSectionHeader<T>::isReservedSectionType() const {
   return getSectionType() & SectionFlagsReservedMask;
 }
 
-// Explictly instantiate template classes.
-template struct XCOFFSectionHeader<XCOFFSectionHeader32>;
-template struct XCOFFSectionHeader<XCOFFSectionHeader64>;
-
 bool XCOFFRelocation32::isRelocationSigned() const {
   return Info & XR_SIGN_INDICATOR_MASK;
 }