diff options
author | David Blaikie <dblaikie@gmail.com> | 2011-12-20 02:50:00 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2011-12-20 02:50:00 +0000 |
commit | 2d24e2a396a1d211baaeedf32148a3b657240170 (patch) | |
tree | 756132115ff4a5abb85dfbd38cef66e0d36efcb1 /tools | |
parent | 1885687462c5fc6094f56d8d5f3ce0a71ae157e4 (diff) | |
download | llvm-2d24e2a396a1d211baaeedf32148a3b657240170.tar.gz llvm-2d24e2a396a1d211baaeedf32148a3b657240170.tar.bz2 llvm-2d24e2a396a1d211baaeedf32148a3b657240170.tar.xz |
Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146960 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bugpoint/CrashDebugger.cpp | 2 | ||||
-rw-r--r-- | tools/bugpoint/ToolRunner.cpp | 2 | ||||
-rw-r--r-- | tools/bugpoint/ToolRunner.h | 1 | ||||
-rw-r--r-- | tools/llvm-diff/DiffConsumer.cpp | 2 | ||||
-rw-r--r-- | tools/llvm-diff/DiffConsumer.h | 1 | ||||
-rw-r--r-- | tools/llvm-diff/DifferenceEngine.cpp | 2 | ||||
-rw-r--r-- | tools/llvm-diff/DifferenceEngine.h | 4 | ||||
-rw-r--r-- | tools/llvm-objdump/llvm-objdump.cpp | 2 | ||||
-rw-r--r-- | tools/llvm-objdump/llvm-objdump.h | 2 |
9 files changed, 15 insertions, 3 deletions
diff --git a/tools/bugpoint/CrashDebugger.cpp b/tools/bugpoint/CrashDebugger.cpp index a0aaf5362b..cdb100b8d5 100644 --- a/tools/bugpoint/CrashDebugger.cpp +++ b/tools/bugpoint/CrashDebugger.cpp @@ -169,7 +169,7 @@ ReduceCrashingGlobalVariables::TestGlobalVariables( return false; } -namespace llvm { +namespace { /// ReduceCrashingFunctions reducer - This works by removing functions and /// seeing if the program still crashes. If it does, then keep the newer, /// smaller program. diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp index c2d3720660..b80a5b4373 100644 --- a/tools/bugpoint/ToolRunner.cpp +++ b/tools/bugpoint/ToolRunner.cpp @@ -234,6 +234,8 @@ int LLI::ExecuteProgram(const std::string &Bitcode, Timeout, MemoryLimit, Error); } +void AbstractInterpreter::anchor() { } + // LLI create method - Try to find the LLI executable AbstractInterpreter *AbstractInterpreter::createLLI(const char *Argv0, std::string &Message, diff --git a/tools/bugpoint/ToolRunner.h b/tools/bugpoint/ToolRunner.h index cfa8acf6b2..7b93394fd8 100644 --- a/tools/bugpoint/ToolRunner.h +++ b/tools/bugpoint/ToolRunner.h @@ -86,6 +86,7 @@ public: /// complexity behind a simple interface. /// class AbstractInterpreter { + virtual void anchor(); public: static CBE *createCBE(const char *Argv0, std::string &Message, const std::string &GCCBinary, diff --git a/tools/llvm-diff/DiffConsumer.cpp b/tools/llvm-diff/DiffConsumer.cpp index d9e181470e..05280392a4 100644 --- a/tools/llvm-diff/DiffConsumer.cpp +++ b/tools/llvm-diff/DiffConsumer.cpp @@ -44,6 +44,8 @@ static void ComputeNumbering(Function *F, DenseMap<Value*,unsigned> &Numbering){ } +void Consumer::anchor() { } + void DiffConsumer::printValue(Value *V, bool isL) { if (V->hasName()) { out << (isa<GlobalValue>(V) ? '@' : '%') << V->getName(); diff --git a/tools/llvm-diff/DiffConsumer.h b/tools/llvm-diff/DiffConsumer.h index b95d42713a..2060fe1c94 100644 --- a/tools/llvm-diff/DiffConsumer.h +++ b/tools/llvm-diff/DiffConsumer.h @@ -29,6 +29,7 @@ namespace llvm { /// The interface for consumers of difference data. class Consumer { + virtual void anchor(); public: /// Record that a local context has been entered. Left and /// Right are IR "containers" of some sort which are being diff --git a/tools/llvm-diff/DifferenceEngine.cpp b/tools/llvm-diff/DifferenceEngine.cpp index 435cd87fa7..e827b23a73 100644 --- a/tools/llvm-diff/DifferenceEngine.cpp +++ b/tools/llvm-diff/DifferenceEngine.cpp @@ -628,6 +628,8 @@ void FunctionDifferenceEngine::runBlockDiff(BasicBlock::iterator LStart, } +void DifferenceEngine::Oracle::anchor() { } + void DifferenceEngine::diff(Function *L, Function *R) { Context C(*this, L, R); diff --git a/tools/llvm-diff/DifferenceEngine.h b/tools/llvm-diff/DifferenceEngine.h index 5b4f80b99e..7ea79e430f 100644 --- a/tools/llvm-diff/DifferenceEngine.h +++ b/tools/llvm-diff/DifferenceEngine.h @@ -50,7 +50,9 @@ namespace llvm { /// An oracle for answering whether two values are equivalent as /// operands. - struct Oracle { + class Oracle { + virtual void anchor(); + public: virtual bool operator()(Value *L, Value *R) = 0; protected: diff --git a/tools/llvm-objdump/llvm-objdump.cpp b/tools/llvm-objdump/llvm-objdump.cpp index bcfecb36e8..fded8a1f35 100644 --- a/tools/llvm-objdump/llvm-objdump.cpp +++ b/tools/llvm-objdump/llvm-objdump.cpp @@ -126,6 +126,8 @@ static const Target *GetTarget(const ObjectFile *Obj = NULL) { return 0; } +void llvm::StringRefMemoryObject::anchor() { } + void llvm::DumpBytes(StringRef bytes) { static const char hex_rep[] = "0123456789abcdef"; // FIXME: The real way to do this is to figure out the longest instruction diff --git a/tools/llvm-objdump/llvm-objdump.h b/tools/llvm-objdump/llvm-objdump.h index 75f852afbc..aa71b77c8a 100644 --- a/tools/llvm-objdump/llvm-objdump.h +++ b/tools/llvm-objdump/llvm-objdump.h @@ -25,7 +25,7 @@ void DumpBytes(StringRef bytes); void DisassembleInputMachO(StringRef Filename); class StringRefMemoryObject : public MemoryObject { -private: + virtual void anchor(); StringRef Bytes; public: StringRefMemoryObject(StringRef bytes) : Bytes(bytes) {} |