summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrik Hagglund <patrik.h.hagglund@ericsson.com>2013-06-12 14:15:21 +0000
committerPatrik Hagglund <patrik.h.hagglund@ericsson.com>2013-06-12 14:15:21 +0000
commita5e855d8594ccc7e7fffd2c1886088175ba84950 (patch)
treebbfc6ac5832e623411a4a4ca8f6046355c6c2fd1
parente48e8c7a6069374daee4c9be1e17b8ed31527f5e (diff)
downloadllvm-a5e855d8594ccc7e7fffd2c1886088175ba84950.tar.gz
llvm-a5e855d8594ccc7e7fffd2c1886088175ba84950.tar.bz2
llvm-a5e855d8594ccc7e7fffd2c1886088175ba84950.tar.xz
Fix 'gcc -flto' builds for unittest binaries (undefined reference to
`typeinfo for llvm::cl::GenericOptionValue'). Remove an "anchor" method for an abstract class. (This does not increase the number of vtables.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183830 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Support/CommandLine.h2
-rw-r--r--lib/Support/CommandLine.cpp1
2 files changed, 0 insertions, 3 deletions
diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h
index 30c53253b3..531760b01d 100644
--- a/include/llvm/Support/CommandLine.h
+++ b/include/llvm/Support/CommandLine.h
@@ -350,8 +350,6 @@ struct cat {
struct GenericOptionValue {
virtual ~GenericOptionValue() {}
virtual bool compare(const GenericOptionValue &V) const = 0;
-private:
- virtual void anchor();
};
template<class DataType> struct OptionValue;
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp
index 63d0b739c0..7568390d64 100644
--- a/lib/Support/CommandLine.cpp
+++ b/lib/Support/CommandLine.cpp
@@ -59,7 +59,6 @@ TEMPLATE_INSTANTIATION(class opt<char>);
TEMPLATE_INSTANTIATION(class opt<bool>);
} } // end namespace llvm::cl
-void GenericOptionValue::anchor() {}
void OptionValue<boolOrDefault>::anchor() {}
void OptionValue<std::string>::anchor() {}
void Option::anchor() {}