Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
[oota-llvm.git] / include / llvm / Target / SubtargetFeature.h
index 89e6efef37664228de13e6de0a68d51f471a2259..d187daac0c89c71d926c3a42c6745639be9d1940 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by James M. Laskey and is distributed under the 
-// University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -21,6 +21,7 @@
 #include <string>
 #include <vector>
 #include <iosfwd>
+#include <cstring>
 #include "llvm/Support/DataTypes.h"
 
 namespace llvm {
@@ -34,6 +35,7 @@ struct SubtargetFeatureKV {
   const char *Key;                      // K-V key string
   const char *Desc;                     // Help descriptor
   uint32_t Value;                       // K-V integer value
+  uint32_t Implies;                     // K-V bit mask
   
   // Compare routine for std binary search
   bool operator<(const SubtargetFeatureKV &S) const {
@@ -72,7 +74,7 @@ struct SubtargetInfoKV {
 class SubtargetFeatures {
   std::vector<std::string> Features;    // Subtarget features as a vector
 public:
-  SubtargetFeatures(const std::string &Initial = std::string());
+  explicit SubtargetFeatures(const std::string &Initial = std::string());
 
   /// Features string accessors.
   std::string getString() const;
@@ -98,6 +100,7 @@ public:
   
   /// Print feature string.
   void print(std::ostream &OS) const;
+  void print(std::ostream *OS) const { if (OS) print(*OS); }
   
   // Dump feature info.
   void dump() const;