[llvm] r227348 - Moving AddLiteralOption's declaration higher up in the header to make gcc happy.

Chris Bieneman beanz at apple.com
Wed Jan 28 11:17:09 PST 2015


Author: cbieneman
Date: Wed Jan 28 13:17:09 2015
New Revision: 227348

URL: http://llvm.org/viewvc/llvm-project?rev=227348&view=rev
Log:
Moving AddLiteralOption's declaration higher up in the header to make gcc happy.

Modified:
    llvm/trunk/include/llvm/Support/CommandLine.h

Modified: llvm/trunk/include/llvm/Support/CommandLine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CommandLine.h?rev=227348&r1=227347&r2=227348&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/CommandLine.h (original)
+++ llvm/trunk/include/llvm/Support/CommandLine.h Wed Jan 28 13:17:09 2015
@@ -73,6 +73,18 @@ void AddExtraVersionPrinter(void (*func)
 // (Currently not perfect, but best-effort.)
 void PrintOptionValues();
 
+// Forward declaration - AddLiteralOption needs to be up here to make gcc happy.
+class Option;
+
+/// \brief Adds a new option for parsing and provides the option it refers to.
+///
+/// \param O pointer to the option
+/// \param Name the string name for the option to handle during parsing
+///
+/// Literal options are used by some parsers to register special option values.
+/// This is how the PassNameParser registers pass names for opt.
+void AddLiteralOption(Option &O, const char *Name);
+
 //===----------------------------------------------------------------------===//
 // Flags permitted to be passed to command line arguments
 //
@@ -1937,15 +1949,6 @@ void HideUnrelatedOptions(cl::OptionCate
 /// option category to display in the -help output.
 void HideUnrelatedOptions(ArrayRef<const cl::OptionCategory *> Categories);
 
-/// \brief Adds a new option for parsing and provides the option it refers to.
-///
-/// \param O pointer to the option
-/// \param Name the string name for the option to handle during parsing
-///
-/// Literal options are used by some parsers to register special option values.
-/// This is how the PassNameParser registers pass names for opt.
-void AddLiteralOption(Option &O, const char *Name);
-
 } // End namespace cl
 
 } // End namespace llvm





More information about the llvm-commits mailing list