summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/ExecutionEngine/ObjectMemoryBuffer.h1
-rw-r--r--llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h6
-rw-r--r--llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h2
-rw-r--r--llvm/include/llvm/Support/MemoryBuffer.h3
-rw-r--r--llvm/include/llvm/Support/raw_ostream.h5
5 files changed, 17 insertions, 0 deletions
diff --git a/llvm/include/llvm/ExecutionEngine/ObjectMemoryBuffer.h b/llvm/include/llvm/ExecutionEngine/ObjectMemoryBuffer.h
index 0f00ad006a7..03567530fb3 100644
--- a/llvm/include/llvm/ExecutionEngine/ObjectMemoryBuffer.h
+++ b/llvm/include/llvm/ExecutionEngine/ObjectMemoryBuffer.h
@@ -56,6 +56,7 @@ public:
private:
SmallVector<char, 0> SV;
std::string BufferName;
+ void anchor() override;
};
} // namespace llvm
diff --git a/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h b/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h
index ee75202d2b6..23d651f6d1b 100644
--- a/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h
+++ b/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h
@@ -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).
diff --git a/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h b/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h
index d76e37113c6..ee7978c1299 100644
--- a/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h
+++ b/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h
@@ -182,6 +182,8 @@ private:
std::error_code applyMemoryGroupPermissions(MemoryGroup &MemGroup,
unsigned Permissions);
+ void anchor() override;
+
MemoryGroup CodeMem;
MemoryGroup RWDataMem;
MemoryGroup RODataMem;
diff --git a/llvm/include/llvm/Support/MemoryBuffer.h b/llvm/include/llvm/Support/MemoryBuffer.h
index 2997ae458e7..535579ecff5 100644
--- a/llvm/include/llvm/Support/MemoryBuffer.h
+++ b/llvm/include/llvm/Support/MemoryBuffer.h
@@ -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
diff --git a/llvm/include/llvm/Support/raw_ostream.h b/llvm/include/llvm/Support/raw_ostream.h
index d11f5a83779..14212017d04 100644
--- a/llvm/include/llvm/Support/raw_ostream.h
+++ b/llvm/include/llvm/Support/raw_ostream.h
@@ -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
OpenPOWER on IntegriCloud