mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-21 21:41:43 +00:00
Revert "Walk back commits for unused function parameters - they're still being"
this reapplies 208012 and 208002. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208037 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cca77fc0d6
commit
5c34f99911
@ -78,7 +78,7 @@ public:
|
|||||||
std::string getString() const;
|
std::string getString() const;
|
||||||
|
|
||||||
/// Adding Features.
|
/// Adding Features.
|
||||||
void AddFeature(const StringRef String, bool IsEnabled = true);
|
void AddFeature(const StringRef String);
|
||||||
|
|
||||||
/// ToggleFeature - Toggle a feature and returns the newly updated feature
|
/// ToggleFeature - Toggle a feature and returns the newly updated feature
|
||||||
/// bits.
|
/// bits.
|
||||||
|
@ -51,18 +51,6 @@ static inline bool isEnabled(const StringRef Feature) {
|
|||||||
return Ch == '+';
|
return Ch == '+';
|
||||||
}
|
}
|
||||||
|
|
||||||
/// PrependFlag - Return a string with a prepended flag; '+' or '-'.
|
|
||||||
///
|
|
||||||
static inline std::string PrependFlag(const StringRef Feature,
|
|
||||||
bool IsEnabled) {
|
|
||||||
assert(!Feature.empty() && "Empty string");
|
|
||||||
if (hasFlag(Feature))
|
|
||||||
return Feature;
|
|
||||||
std::string Prefix = IsEnabled ? "+" : "-";
|
|
||||||
Prefix += Feature;
|
|
||||||
return Prefix;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Split - Splits a string of comma separated items in to a vector of strings.
|
/// Split - Splits a string of comma separated items in to a vector of strings.
|
||||||
///
|
///
|
||||||
static void Split(std::vector<std::string> &V, const StringRef S) {
|
static void Split(std::vector<std::string> &V, const StringRef S) {
|
||||||
@ -109,13 +97,11 @@ static std::string Join(const std::vector<std::string> &V) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Adding features.
|
/// Adding features.
|
||||||
void SubtargetFeatures::AddFeature(const StringRef String,
|
void SubtargetFeatures::AddFeature(const StringRef String) {
|
||||||
bool IsEnabled) {
|
// Don't add empty features or features we already have.
|
||||||
// Don't add empty features
|
if (!String.empty())
|
||||||
if (!String.empty()) {
|
// Convert to lowercase, prepend flag if we don't already have a flag.
|
||||||
// Convert to lowercase, prepend flag and add to vector
|
Features.push_back(hasFlag(String) ? String.str() : "+" + String.lower());
|
||||||
Features.push_back(PrependFlag(String.lower(), IsEnabled));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Find KV in array using binary search.
|
/// Find KV in array using binary search.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user