From 433fd76e51e9bd9a4933e2c1775a7410928112c8 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 18 Jul 2006 23:59:33 +0000 Subject: [PATCH] Add an out-of-line virtual method to provide a home for the cl::option class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29191 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/CommandLine.h | 3 +++ lib/Support/CommandLine.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 8517032fefe..b352686e6d9 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -150,6 +150,9 @@ class Option { return NormalFormatting; } + // Out of line virtual function to provide home for the class. + virtual void anchor(); + int NumOccurrences; // The number of times specified int Flags; // Flags for the argument unsigned Position; // Position of last occurrence of the option diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index 164cb5286f3..08b6fcbd590 100644 --- a/lib/Support/CommandLine.cpp +++ b/lib/Support/CommandLine.cpp @@ -607,6 +607,10 @@ void cl::ParseCommandLineOptions(int &argc, char **argv, // Option Base class implementation // +// Out of line virtual function to provide home for the class. +void Option::anchor() { +} + bool Option::error(std::string Message, const char *ArgName) { if (ArgName == 0) ArgName = ArgStr; if (ArgName[0] == 0)