mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Add missing vtable anchors
Summary: This patch adds anchor() for MemoryBuffer, raw_fd_ostream, RTDyldMemoryManager, SectionMemoryManager, etc. Reviewers: jlebar, eli.friedman, dblaikie Reviewed By: dblaikie Subscribers: mehdi_amini, mgorny, dblaikie, weimingz, llvm-commits Differential Revision: https://reviews.llvm.org/D45244 llvm-svn: 329861
This commit is contained in:
parent
5fa636dda8
commit
ce3b1c3276
@ -56,6 +56,7 @@ public:
|
||||
private:
|
||||
SmallVector<char, 0> SV;
|
||||
std::string BufferName;
|
||||
void anchor() override;
|
||||
};
|
||||
|
||||
} // namespace llvm
|
||||
|
@ -47,6 +47,9 @@ public:
|
||||
/// newly loaded object.
|
||||
virtual void notifyObjectLoaded(ExecutionEngine *EE,
|
||||
const object::ObjectFile &) {}
|
||||
|
||||
private:
|
||||
void anchor() override;
|
||||
};
|
||||
|
||||
// RuntimeDyld clients often want to handle the memory management of
|
||||
@ -142,6 +145,9 @@ protected:
|
||||
};
|
||||
typedef std::vector<EHFrame> EHFrameInfos;
|
||||
EHFrameInfos EHFrames;
|
||||
|
||||
private:
|
||||
void anchor() override;
|
||||
};
|
||||
|
||||
// Create wrappers for C Binding types (see CBindingWrapping.h).
|
||||
|
@ -182,6 +182,8 @@ private:
|
||||
std::error_code applyMemoryGroupPermissions(MemoryGroup &MemGroup,
|
||||
unsigned Permissions);
|
||||
|
||||
void anchor() override;
|
||||
|
||||
MemoryGroup CodeMem;
|
||||
MemoryGroup RWDataMem;
|
||||
MemoryGroup RODataMem;
|
||||
|
@ -148,6 +148,9 @@ public:
|
||||
virtual BufferKind getBufferKind() const = 0;
|
||||
|
||||
MemoryBufferRef getMemBufferRef() const;
|
||||
|
||||
private:
|
||||
virtual void anchor();
|
||||
};
|
||||
|
||||
/// This class is an extension of MemoryBuffer, which allows copy-on-write
|
||||
|
@ -329,6 +329,8 @@ private:
|
||||
/// Copy data into the buffer. Size must not be greater than the number of
|
||||
/// unused bytes in the buffer.
|
||||
void copy_to_buffer(const char *Ptr, size_t Size);
|
||||
|
||||
virtual void anchor();
|
||||
};
|
||||
|
||||
/// An abstract base class for streams implementations that also support a
|
||||
@ -336,6 +338,7 @@ private:
|
||||
/// but needs to patch in a header that needs to know the output size.
|
||||
class raw_pwrite_stream : public raw_ostream {
|
||||
virtual void pwrite_impl(const char *Ptr, size_t Size, uint64_t Offset) = 0;
|
||||
void anchor() override;
|
||||
|
||||
public:
|
||||
explicit raw_pwrite_stream(bool Unbuffered = false)
|
||||
@ -383,6 +386,8 @@ class raw_fd_ostream : public raw_pwrite_stream {
|
||||
/// Set the flag indicating that an output error has been encountered.
|
||||
void error_detected(std::error_code EC) { this->EC = EC; }
|
||||
|
||||
void anchor() override;
|
||||
|
||||
public:
|
||||
/// Open the specified file for writing. If an error occurs, information
|
||||
/// about the error is put into EC, and the stream should be immediately
|
||||
|
@ -28,6 +28,8 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
void llvm::ObjectMemoryBuffer::anchor() {}
|
||||
|
||||
namespace {
|
||||
|
||||
static struct RegisterJIT {
|
||||
@ -665,3 +667,5 @@ LinkingSymbolResolver::findSymbol(const std::string &Name) {
|
||||
return nullptr;
|
||||
return ClientResolver->findSymbol(Name);
|
||||
}
|
||||
|
||||
void LinkingSymbolResolver::anchor() {}
|
||||
|
@ -42,6 +42,7 @@ public:
|
||||
private:
|
||||
MCJIT &ParentEngine;
|
||||
std::shared_ptr<LegacyJITSymbolResolver> ClientResolver;
|
||||
void anchor() override;
|
||||
};
|
||||
|
||||
// About Module states: added->loaded->finalized.
|
||||
|
@ -298,4 +298,6 @@ void *RTDyldMemoryManager::getPointerToNamedFunction(const std::string &Name,
|
||||
return (void*)Addr;
|
||||
}
|
||||
|
||||
void RTDyldMemoryManager::anchor() {}
|
||||
void MCJITMemoryManager::anchor() {}
|
||||
} // namespace llvm
|
||||
|
@ -232,6 +232,8 @@ SectionMemoryManager::~SectionMemoryManager() {
|
||||
|
||||
SectionMemoryManager::MemoryMapper::~MemoryMapper() {}
|
||||
|
||||
void SectionMemoryManager::anchor() {}
|
||||
|
||||
namespace {
|
||||
// Trivial implementation of SectionMemoryManager::MemoryMapper that just calls
|
||||
// into sys::Memory.
|
||||
|
@ -37,3 +37,4 @@ required_libraries =
|
||||
Support
|
||||
Target
|
||||
TransformUtils
|
||||
MCJIT
|
||||
|
@ -531,3 +531,5 @@ MemoryBufferRef MemoryBuffer::getMemBufferRef() const {
|
||||
StringRef Identifier = getBufferIdentifier();
|
||||
return MemoryBufferRef(Data, Identifier);
|
||||
}
|
||||
|
||||
void MemoryBuffer::anchor() {}
|
||||
|
@ -474,6 +474,8 @@ raw_ostream &raw_ostream::indent(unsigned NumSpaces) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
void raw_ostream::anchor() {}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Formatted Output
|
||||
//===----------------------------------------------------------------------===//
|
||||
@ -727,6 +729,8 @@ bool raw_fd_ostream::has_colors() const {
|
||||
return sys::Process::FileDescriptorHasColors(FD);
|
||||
}
|
||||
|
||||
void raw_fd_ostream::anchor() {}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// outs(), errs(), nulls()
|
||||
//===----------------------------------------------------------------------===//
|
||||
@ -804,3 +808,5 @@ uint64_t raw_null_ostream::current_pos() const {
|
||||
|
||||
void raw_null_ostream::pwrite_impl(const char *Ptr, size_t Size,
|
||||
uint64_t Offset) {}
|
||||
|
||||
void raw_pwrite_stream::anchor() {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user