llvm.org GIT mirror llvm / 66258c9
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329861 91177308-0d34-0410-b5e6-96231b3b80d8 Weiming Zhao 2 years ago
12 changed file(s) with 35 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
5555 private:
5656 SmallVector SV;
5757 std::string BufferName;
58 void anchor() override;
5859 };
5960
6061 } // namespace llvm
4646 /// newly loaded object.
4747 virtual void notifyObjectLoaded(ExecutionEngine *EE,
4848 const object::ObjectFile &) {}
49
50 private:
51 void anchor() override;
4952 };
5053
5154 // RuntimeDyld clients often want to handle the memory management of
141144 };
142145 typedef std::vector EHFrameInfos;
143146 EHFrameInfos EHFrames;
147
148 private:
149 void anchor() override;
144150 };
145151
146152 // Create wrappers for C Binding types (see CBindingWrapping.h).
181181 std::error_code applyMemoryGroupPermissions(MemoryGroup &MemGroup,
182182 unsigned Permissions);
183183
184 void anchor() override;
185
184186 MemoryGroup CodeMem;
185187 MemoryGroup RWDataMem;
186188 MemoryGroup RODataMem;
147147 virtual BufferKind getBufferKind() const = 0;
148148
149149 MemoryBufferRef getMemBufferRef() const;
150
151 private:
152 virtual void anchor();
150153 };
151154
152155 /// This class is an extension of MemoryBuffer, which allows copy-on-write
328328 /// Copy data into the buffer. Size must not be greater than the number of
329329 /// unused bytes in the buffer.
330330 void copy_to_buffer(const char *Ptr, size_t Size);
331
332 virtual void anchor();
331333 };
332334
333335 /// An abstract base class for streams implementations that also support a
335337 /// but needs to patch in a header that needs to know the output size.
336338 class raw_pwrite_stream : public raw_ostream {
337339 virtual void pwrite_impl(const char *Ptr, size_t Size, uint64_t Offset) = 0;
340 void anchor() override;
338341
339342 public:
340343 explicit raw_pwrite_stream(bool Unbuffered = false)
382385 /// Set the flag indicating that an output error has been encountered.
383386 void error_detected(std::error_code EC) { this->EC = EC; }
384387
388 void anchor() override;
389
385390 public:
386391 /// Open the specified file for writing. If an error occurs, information
387392 /// about the error is put into EC, and the stream should be immediately
2626 #include "llvm/Support/MutexGuard.h"
2727
2828 using namespace llvm;
29
30 void llvm::ObjectMemoryBuffer::anchor() {}
2931
3032 namespace {
3133
664666 return nullptr;
665667 return ClientResolver->findSymbol(Name);
666668 }
669
670 void LinkingSymbolResolver::anchor() {}
4141 private:
4242 MCJIT &ParentEngine;
4343 std::shared_ptr ClientResolver;
44 void anchor() override;
4445 };
4546
4647 // About Module states: added->loaded->finalized.
297297 return (void*)Addr;
298298 }
299299
300 void RTDyldMemoryManager::anchor() {}
301 void MCJITMemoryManager::anchor() {}
300302 } // namespace llvm
231231
232232 SectionMemoryManager::MemoryMapper::~MemoryMapper() {}
233233
234 void SectionMemoryManager::anchor() {}
235
234236 namespace {
235237 // Trivial implementation of SectionMemoryManager::MemoryMapper that just calls
236238 // into sys::Memory.
3636 Support
3737 Target
3838 TransformUtils
39 MCJIT
530530 StringRef Identifier = getBufferIdentifier();
531531 return MemoryBufferRef(Data, Identifier);
532532 }
533
534 void MemoryBuffer::anchor() {}
473473 return *this;
474474 }
475475
476 void raw_ostream::anchor() {}
477
476478 //===----------------------------------------------------------------------===//
477479 // Formatted Output
478480 //===----------------------------------------------------------------------===//
726728 return sys::Process::FileDescriptorHasColors(FD);
727729 }
728730
731 void raw_fd_ostream::anchor() {}
732
729733 //===----------------------------------------------------------------------===//
730734 // outs(), errs(), nulls()
731735 //===----------------------------------------------------------------------===//
803807
804808 void raw_null_ostream::pwrite_impl(const char *Ptr, size_t Size,
805809 uint64_t Offset) {}
810
811 void raw_pwrite_stream::anchor() {}