diff options
author | Juergen Ributzka <juergen@apple.com> | 2013-11-15 22:34:48 +0000 |
---|---|---|
committer | Juergen Ributzka <juergen@apple.com> | 2013-11-15 22:34:48 +0000 |
commit | 5a364c5561ec04e33a6f5d52c14f1bac6f247ea0 (patch) | |
tree | 2fcdad4351006993fd039cba47193d98cdfc5ae3 /lib/Target/PowerPC | |
parent | 17d4ac8c461fb3c32483cf7a37bc52937caeb650 (diff) | |
download | llvm-5a364c5561ec04e33a6f5d52c14f1bac6f247ea0.tar.gz llvm-5a364c5561ec04e33a6f5d52c14f1bac6f247ea0.tar.bz2 llvm-5a364c5561ec04e33a6f5d52c14f1bac6f247ea0.tar.xz |
[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.
Differential Revision: http://llvm-reviews.chandlerc.com/D2068
Reviewed by Andy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194865 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC')
-rw-r--r-- | lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp | 3 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCInstrInfo.cpp | 5 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCInstrInfo.h | 1 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCTargetStreamer.h | 1 |
4 files changed, 9 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp b/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp index 5c08de1ccf..8f4e224219 100644 --- a/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp +++ b/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp @@ -37,6 +37,9 @@ using namespace llvm; +// pin vtable to this file +PPCTargetStreamer::~PPCTargetStreamer() {} + static MCInstrInfo *createPPCMCInstrInfo() { MCInstrInfo *X = new MCInstrInfo(); InitPPCMCInstrInfo(X); diff --git a/lib/Target/PowerPC/PPCInstrInfo.cpp b/lib/Target/PowerPC/PPCInstrInfo.cpp index 375daee59e..102057193e 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.cpp +++ b/lib/Target/PowerPC/PPCInstrInfo.cpp @@ -33,7 +33,7 @@ #include "llvm/Support/raw_ostream.h" #define GET_INSTRMAP_INFO -#define GET_INSTRINFO_CTOR +#define GET_INSTRINFO_CTOR_DTOR #include "PPCGenInstrInfo.inc" using namespace llvm; @@ -45,6 +45,9 @@ opt<bool> DisableCTRLoopAnal("disable-ppc-ctrloop-analysis", cl::Hidden, static cl::opt<bool> DisableCmpOpt("disable-ppc-cmp-opt", cl::desc("Disable compare instruction optimization"), cl::Hidden); +//pin vtable to this file +void PPCInstrInfo::anchor() {} + PPCInstrInfo::PPCInstrInfo(PPCTargetMachine &tm) : PPCGenInstrInfo(PPC::ADJCALLSTACKDOWN, PPC::ADJCALLSTACKUP), TM(tm), RI(*TM.getSubtargetImpl()) {} diff --git a/lib/Target/PowerPC/PPCInstrInfo.h b/lib/Target/PowerPC/PPCInstrInfo.h index bd72a4d9e5..f140c41a2a 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.h +++ b/lib/Target/PowerPC/PPCInstrInfo.h @@ -78,6 +78,7 @@ class PPCInstrInfo : public PPCGenInstrInfo { const TargetRegisterClass *RC, SmallVectorImpl<MachineInstr*> &NewMIs, bool &NonRI, bool &SpillsVRS) const; + virtual void anchor(); public: explicit PPCInstrInfo(PPCTargetMachine &TM); diff --git a/lib/Target/PowerPC/PPCTargetStreamer.h b/lib/Target/PowerPC/PPCTargetStreamer.h index 3ecd8a8b0a..e876be16a9 100644 --- a/lib/Target/PowerPC/PPCTargetStreamer.h +++ b/lib/Target/PowerPC/PPCTargetStreamer.h @@ -15,6 +15,7 @@ namespace llvm { class PPCTargetStreamer : public MCTargetStreamer { public: + virtual ~PPCTargetStreamer(); virtual void emitTCEntry(const MCSymbol &S) = 0; }; } |