From a5e855d8594ccc7e7fffd2c1886088175ba84950 Mon Sep 17 00:00:00 2001 From: Patrik Hagglund Date: Wed, 12 Jun 2013 14:15:21 +0000 Subject: 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 --- include/llvm/Support/CommandLine.h | 2 -- lib/Support/CommandLine.cpp | 1 - 2 files changed, 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 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); TEMPLATE_INSTANTIATION(class opt); } } // end namespace llvm::cl -void GenericOptionValue::anchor() {} void OptionValue::anchor() {} void OptionValue::anchor() {} void Option::anchor() {} -- cgit v1.2.3