From: Reid Kleckner Date: Thu, 7 Nov 2019 17:39:13 +0000 (-0800) Subject: Revert "[XCOFF] Fix link errors from explicit template instantiation" X-Git-Tag: llvmorg-11-init~4779 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2cb3bfe9759a134a2e85207643109b69a86c4bf7;p=platform%2Fupstream%2Fllvm.git Revert "[XCOFF] Fix link errors from explicit template instantiation" 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. --- diff --git a/llvm/include/llvm/Object/XCOFFObjectFile.h b/llvm/include/llvm/Object/XCOFFObjectFile.h index fcdbf7a..4f80297 100644 --- a/llvm/include/llvm/Object/XCOFFObjectFile.h +++ b/llvm/include/llvm/Object/XCOFFObjectFile.h @@ -60,12 +60,6 @@ public: bool isReservedSectionType() const; }; -// Explicit extern template declarations. -struct XCOFFSectionHeader32; -struct XCOFFSectionHeader64; -extern template struct XCOFFSectionHeader; -extern template struct XCOFFSectionHeader; - struct XCOFFSectionHeader32 : XCOFFSectionHeader { char Name[XCOFF::NameSize]; support::ubig32_t PhysicalAddress; diff --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp index 3ea42bb..5ca2a6a 100644 --- a/llvm/lib/Object/XCOFFObjectFile.cpp +++ b/llvm/lib/Object/XCOFFObjectFile.cpp @@ -61,10 +61,6 @@ bool XCOFFSectionHeader::isReservedSectionType() const { return getSectionType() & SectionFlagsReservedMask; } -// Explictly instantiate template classes. -template struct XCOFFSectionHeader; -template struct XCOFFSectionHeader; - bool XCOFFRelocation32::isRelocationSigned() const { return Info & XR_SIGN_INDICATOR_MASK; }