Fix 'gcc -flto' builds for unittest binaries (undefined reference to
authorPatrik Hagglund <patrik.h.hagglund@ericsson.com>
Wed, 12 Jun 2013 14:15:21 +0000 (14:15 +0000)
committerPatrik Hagglund <patrik.h.hagglund@ericsson.com>
Wed, 12 Jun 2013 14:15:21 +0000 (14:15 +0000)
`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

include/llvm/Support/CommandLine.h
lib/Support/CommandLine.cpp

index 30c53253b3ec65e38a8878eb3c9bd4205d2165d8..531760b01d04996f48f4bbfb05a351dfd8ddc6c7 100644 (file)
@@ -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;
index 63d0b739c003a95d4d5912e770b7581ca2defdc5..7568390d6442581553a974e3cd3d87ceee93e69f 100644 (file)
@@ -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() {}