aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ELF.cpp
diff options
context:
space:
mode:
authorThomas Fransham <tfransham@gmail.com>2024-09-20 07:50:45 +0100
committerGitHub <noreply@github.com>2024-09-20 09:50:45 +0300
commit92da37b08f95844576c5d5502712bab0961e2f27 (patch)
tree3e50a150ab5ca56db7948ec15c058de6f8e3f91f /llvm/lib/Object/ELF.cpp
parent2c6e5ef6873e9c80190beb62c625e16802c9901d (diff)
downloadllvm-92da37b08f95844576c5d5502712bab0961e2f27.zip
llvm-92da37b08f95844576c5d5502712bab0961e2f27.tar.gz
llvm-92da37b08f95844576c5d5502712bab0961e2f27.tar.bz2
[Object][NFC] Add extern template declarations needed by llvm-objdump (#109156)
These symbols are implicitly imported from the LLVM shared library by llvm-objdump on ELF like platforms, but for windows they need to be explicitly exported when LLVM is built as shared library. I also add visibility macros for XCOFFObjectFile::getExceptionEntries that can't automatically be added by clang tooling since it doesn't store the source locations for explicit function template instantiations.
Diffstat (limited to 'llvm/lib/Object/ELF.cpp')
-rw-r--r--llvm/lib/Object/ELF.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Object/ELF.cpp b/llvm/lib/Object/ELF.cpp
index c66736f..9a9e762 100644
--- a/llvm/lib/Object/ELF.cpp
+++ b/llvm/lib/Object/ELF.cpp
@@ -9,6 +9,7 @@
#include "llvm/Object/ELF.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/BinaryFormat/ELF.h"
+#include "llvm/Support/Compiler.h"
#include "llvm/Support/DataExtractor.h"
using namespace llvm;
@@ -980,7 +981,7 @@ ELFFile<ELFT>::getSectionAndRelocations(
return SecToRelocMap;
}
-template class llvm::object::ELFFile<ELF32LE>;
-template class llvm::object::ELFFile<ELF32BE>;
-template class llvm::object::ELFFile<ELF64LE>;
-template class llvm::object::ELFFile<ELF64BE>;
+template class LLVM_EXPORT_TEMPLATE llvm::object::ELFFile<ELF32LE>;
+template class LLVM_EXPORT_TEMPLATE llvm::object::ELFFile<ELF32BE>;
+template class LLVM_EXPORT_TEMPLATE llvm::object::ELFFile<ELF64LE>;
+template class LLVM_EXPORT_TEMPLATE llvm::object::ELFFile<ELF64BE>;