//
// 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.
//
//===----------------------------------------------------------------------===//
//
#include <string>
#include <vector>
#include <iosfwd>
+#include <cstring>
#include "llvm/Support/DataTypes.h"
namespace llvm {
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 {
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;
/// Set the CPU string. Replaces previous setting. Setting to "" clears CPU.
void setCPU(const std::string &String);
-
+
/// Setting CPU string only if no string is set.
void setCPUIfNone(const std::string &String);
-
+
+ /// Returns current CPU string.
+ const std::string & getCPU() const;
+
/// Adding Features.
void AddFeature(const std::string &String, bool IsEnabled = true);