mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
[weak vtables] Remove a bunch of weak vtables
This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. The memory leaks in this version have been fixed. Thanks Alexey for pointing them out. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195064 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -16,6 +16,7 @@ namespace llvm {
|
||||
|
||||
/// Global access point for the JIT debugging interface.
|
||||
class JITRegistrar {
|
||||
virtual void anchor();
|
||||
public:
|
||||
/// Instantiates the JIT service.
|
||||
JITRegistrar() {}
|
||||
|
@@ -23,6 +23,7 @@ namespace llvm {
|
||||
class ObjectImageCommon : public ObjectImage {
|
||||
ObjectImageCommon(); // = delete
|
||||
ObjectImageCommon(const ObjectImageCommon &other); // = delete
|
||||
virtual void anchor();
|
||||
|
||||
protected:
|
||||
object::ObjectFile *ObjFile;
|
||||
|
@@ -13,6 +13,7 @@
|
||||
|
||||
#define DEBUG_TYPE "dyld"
|
||||
#include "llvm/ExecutionEngine/RuntimeDyld.h"
|
||||
#include "JITRegistrar.h"
|
||||
#include "ObjectImageCommon.h"
|
||||
#include "RuntimeDyldELF.h"
|
||||
#include "RuntimeDyldImpl.h"
|
||||
@@ -28,6 +29,11 @@ using namespace llvm::object;
|
||||
// Empty out-of-line virtual destructor as the key function.
|
||||
RuntimeDyldImpl::~RuntimeDyldImpl() {}
|
||||
|
||||
// Pin the JITRegistrar's and ObjectImage*'s vtables to this file.
|
||||
void JITRegistrar::anchor() {}
|
||||
void ObjectImage::anchor() {}
|
||||
void ObjectImageCommon::anchor() {}
|
||||
|
||||
namespace llvm {
|
||||
|
||||
void RuntimeDyldImpl::registerEHFrames() {
|
||||
|
Reference in New Issue
Block a user