[llvm] f862254 - [XCOFF] Move explicit instantions after member function definitions to fix clang builds
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 7 09:26:12 PST 2019
Author: Fangrui Song
Date: 2019-11-07T09:25:55-08:00
New Revision: f8622543ad07f57618c9ecdb3b3a8c7cabe40b85
URL: https://github.com/llvm/llvm-project/commit/f8622543ad07f57618c9ecdb3b3a8c7cabe40b85
DIFF: https://github.com/llvm/llvm-project/commit/f8622543ad07f57618c9ecdb3b3a8c7cabe40b85.diff
LOG: [XCOFF] Move explicit instantions after member function definitions to fix clang builds
Added:
Modified:
llvm/lib/Object/XCOFFObjectFile.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp
index 6f1d999bc20e..5ca2a6a03f04 100644
--- a/llvm/lib/Object/XCOFFObjectFile.cpp
+++ b/llvm/lib/Object/XCOFFObjectFile.cpp
@@ -46,10 +46,6 @@ static StringRef generateXCOFFFixedNameStringRef(const char *Name) {
: StringRef(Name, XCOFF::NameSize);
}
-// Explictly instantiate template classes.
-template struct XCOFFSectionHeader<XCOFFSectionHeader32>;
-template struct XCOFFSectionHeader<XCOFFSectionHeader64>;
-
template <typename T> StringRef XCOFFSectionHeader<T>::getName() const {
const T &DerivedXCOFFSectionHeader = static_cast<const T &>(*this);
return generateXCOFFFixedNameStringRef(DerivedXCOFFSectionHeader.Name);
@@ -773,5 +769,9 @@ bool XCOFFSymbolRef::isFunction() const {
return (OwningObjectPtr->getSectionFlags(SI.get()) & XCOFF::STYP_TEXT);
}
+// Explictly instantiate template classes.
+template struct XCOFFSectionHeader<XCOFFSectionHeader32>;
+template struct XCOFFSectionHeader<XCOFFSectionHeader64>;
+
} // namespace object
} // namespace llvm
More information about the llvm-commits
mailing list