Guard dynamic library loading.
[oota-llvm.git] / lib / Support / CommandLine.cpp
index 8cd483a25e5de7bfd49f8c5780f5837cdef20780..4922560200a02ced8acfb9827b1dbeb355620861 100644 (file)
@@ -45,10 +45,12 @@ TEMPLATE_INSTANTIATION(class basic_parser<unsigned>);
 TEMPLATE_INSTANTIATION(class basic_parser<double>);
 TEMPLATE_INSTANTIATION(class basic_parser<float>);
 TEMPLATE_INSTANTIATION(class basic_parser<std::string>);
+TEMPLATE_INSTANTIATION(class basic_parser<char>);
 
 TEMPLATE_INSTANTIATION(class opt<unsigned>);
 TEMPLATE_INSTANTIATION(class opt<int>);
 TEMPLATE_INSTANTIATION(class opt<std::string>);
+TEMPLATE_INSTANTIATION(class opt<char>);
 TEMPLATE_INSTANTIATION(class opt<bool>);
 
 void Option::anchor() {}
@@ -60,6 +62,7 @@ void parser<unsigned>::anchor() {}
 void parser<double>::anchor() {}
 void parser<float>::anchor() {}
 void parser<std::string>::anchor() {}
+void parser<char>::anchor() {}
 
 //===----------------------------------------------------------------------===//
 
@@ -396,7 +399,12 @@ static void ExpandResponseFiles(int argc, char** argv,
 
         // If we could open the file, parse its contents, otherwise
         // pass the @file option verbatim.
-        // TODO: support recursion.
+
+        // TODO: we should also support recursive loading of response files,
+        // since this is how gcc behaves. (From their man page: "The file may
+        // itself contain additional @file options; any such options will be
+        // processed recursively.")
+
         if (respFilePtr != 0) {
           ParseCStringVector(newArgv, respFilePtr->getBufferStart());
           continue;
@@ -877,7 +885,8 @@ bool parser<boolOrDefault>::parse(Option &O, const char *ArgName,
   if (Arg == "" || Arg == "true" || Arg == "TRUE" || Arg == "True" ||
       Arg == "1") {
     Value = BOU_TRUE;
-  } else if (Arg == "false" || Arg == "FALSE" || Arg == "False" || Arg == "0") {
+  } else if (Arg == "false" || Arg == "FALSE"
+             || Arg == "False" || Arg == "0") {
     Value = BOU_FALSE;
   } else {
     return O.error(": '" + Arg +