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 /tools | |
parent | 17d4ac8c461fb3c32483cf7a37bc52937caeb650 (diff) | |
download | external_llvm-5a364c5561ec04e33a6f5d52c14f1bac6f247ea0.zip external_llvm-5a364c5561ec04e33a6f5d52c14f1bac6f247ea0.tar.gz external_llvm-5a364c5561ec04e33a6f5d52c14f1bac6f247ea0.tar.bz2 |
[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 'tools')
-rw-r--r-- | tools/llvm-stress/llvm-stress.cpp | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/tools/llvm-stress/llvm-stress.cpp b/tools/llvm-stress/llvm-stress.cpp index 15f7abf..d262a69 100644 --- a/tools/llvm-stress/llvm-stress.cpp +++ b/tools/llvm-stress/llvm-stress.cpp @@ -128,7 +128,7 @@ public: BB(Block),PT(PT),Ran(R),Context(BB->getContext()) {} /// virtual D'tor to silence warnings. - virtual ~Modifier() {} + virtual ~Modifier(); /// Add a new instruction. virtual void Act() = 0; @@ -285,8 +285,11 @@ protected: LLVMContext &Context; }; +Modifier::~Modifier() {} + struct LoadModifier: public Modifier { LoadModifier(BasicBlock *BB, PieceTable *PT, Random *R):Modifier(BB, PT, R) {} + virtual ~LoadModifier(); virtual void Act() { // Try to use predefined pointers. If non exist, use undef pointer value; Value *Ptr = getRandomPointerValue(); @@ -295,8 +298,11 @@ struct LoadModifier: public Modifier { } }; +LoadModifier::~LoadModifier() {} + struct StoreModifier: public Modifier { StoreModifier(BasicBlock *BB, PieceTable *PT, Random *R):Modifier(BB, PT, R) {} + virtual ~StoreModifier(); virtual void Act() { // Try to use predefined pointers. If non exist, use undef pointer value; Value *Ptr = getRandomPointerValue(); @@ -313,8 +319,11 @@ struct StoreModifier: public Modifier { } }; +StoreModifier::~StoreModifier() {} + struct BinModifier: public Modifier { BinModifier(BasicBlock *BB, PieceTable *PT, Random *R):Modifier(BB, PT, R) {} + virtual ~BinModifier(); virtual void Act() { Value *Val0 = getRandomVal(); @@ -356,9 +365,13 @@ struct BinModifier: public Modifier { } }; +BinModifier::~BinModifier() {} + /// Generate constant values. struct ConstModifier: public Modifier { ConstModifier(BasicBlock *BB, PieceTable *PT, Random *R):Modifier(BB, PT, R) {} + virtual ~ConstModifier(); + virtual void Act() { Type *Ty = pickType(); @@ -403,8 +416,11 @@ struct ConstModifier: public Modifier { } }; +ConstModifier::~ConstModifier() {} + struct AllocaModifier: public Modifier { AllocaModifier(BasicBlock *BB, PieceTable *PT, Random *R):Modifier(BB, PT, R){} + virtual ~AllocaModifier(); virtual void Act() { Type *Tp = pickType(); @@ -412,9 +428,12 @@ struct AllocaModifier: public Modifier { } }; +AllocaModifier::~AllocaModifier() {} + struct ExtractElementModifier: public Modifier { ExtractElementModifier(BasicBlock *BB, PieceTable *PT, Random *R): Modifier(BB, PT, R) {} + virtual ~ExtractElementModifier(); virtual void Act() { Value *Val0 = getRandomVectorValue(); @@ -426,8 +445,12 @@ struct ExtractElementModifier: public Modifier { } }; +ExtractElementModifier::~ExtractElementModifier() {} + struct ShuffModifier: public Modifier { ShuffModifier(BasicBlock *BB, PieceTable *PT, Random *R):Modifier(BB, PT, R) {} + virtual ~ShuffModifier(); + virtual void Act() { Value *Val0 = getRandomVectorValue(); @@ -453,9 +476,12 @@ struct ShuffModifier: public Modifier { } }; +ShuffModifier::~ShuffModifier() {} + struct InsertElementModifier: public Modifier { InsertElementModifier(BasicBlock *BB, PieceTable *PT, Random *R): Modifier(BB, PT, R) {} + virtual ~InsertElementModifier(); virtual void Act() { Value *Val0 = getRandomVectorValue(); @@ -470,8 +496,12 @@ struct InsertElementModifier: public Modifier { }; +InsertElementModifier::~InsertElementModifier() {} + struct CastModifier: public Modifier { CastModifier(BasicBlock *BB, PieceTable *PT, Random *R):Modifier(BB, PT, R) {} + virtual ~CastModifier(); + virtual void Act() { Value *V = getRandomVal(); @@ -555,9 +585,12 @@ struct CastModifier: public Modifier { }; +CastModifier::~CastModifier() {} + struct SelectModifier: public Modifier { SelectModifier(BasicBlock *BB, PieceTable *PT, Random *R): Modifier(BB, PT, R) {} + virtual ~SelectModifier(); virtual void Act() { // Try a bunch of different select configuration until a valid one is found. @@ -579,9 +612,12 @@ struct SelectModifier: public Modifier { } }; +SelectModifier::~SelectModifier() {} struct CmpModifier: public Modifier { CmpModifier(BasicBlock *BB, PieceTable *PT, Random *R):Modifier(BB, PT, R) {} + virtual ~CmpModifier(); + virtual void Act() { Value *Val0 = getRandomVal(); @@ -607,6 +643,8 @@ struct CmpModifier: public Modifier { } }; +CmpModifier::~CmpModifier() {} + void FillFunction(Function *F, Random &R) { // Create a legal entry block. BasicBlock *BB = BasicBlock::Create(F->getContext(), "BB", F); |