[NFC] Reformat all the LLVMs

Reformatting everything now that we have `llvm` namespaces. I've
separated this from the main commit to help manage merge-conflicts and
for making it a bit easier to read the mega-patch.
This commit is contained in:
Evan Wilde
2023-06-27 08:15:30 -07:00
parent f3ff561c6f
commit 250082df25
416 changed files with 3777 additions and 3734 deletions

View File

@@ -355,9 +355,7 @@ inline bool isNumeric(llvm::StringRef S) {
return false;
}
inline bool isNull(llvm::StringRef S) {
return S.equals("null");
}
inline bool isNull(llvm::StringRef S) { return S.equals("null"); }
inline bool isBool(llvm::StringRef S) {
return S.equals("true") || S.equals("false");
@@ -463,13 +461,13 @@ public:
}
template <typename T>
void mapRequired(llvm::StringRef Key, T& Val) {
void mapRequired(llvm::StringRef Key, T &Val) {
this->processKey(Key, Val, true);
}
template <typename T>
typename std::enable_if<has_ArrayTraits<T>::value,void>::type
mapOptional(llvm::StringRef Key, T& Val) {
typename std::enable_if<has_ArrayTraits<T>::value, void>::type
mapOptional(llvm::StringRef Key, T &Val) {
// omit key/value instead of outputting empty array
if (this->canElideEmptyArray() && !(Val.begin() != Val.end()))
return;
@@ -482,20 +480,21 @@ public:
}
template <typename T>
typename std::enable_if<!has_ArrayTraits<T>::value,void>::type
mapOptional(llvm::StringRef Key, T& Val) {
typename std::enable_if<!has_ArrayTraits<T>::value, void>::type
mapOptional(llvm::StringRef Key, T &Val) {
this->processKey(Key, Val, false);
}
template <typename T>
void mapOptional(llvm::StringRef Key, T& Val, const T& Default) {
void mapOptional(llvm::StringRef Key, T &Val, const T &Default) {
this->processKeyWithDefault(Key, Val, Default, false);
}
private:
template <typename T>
void processKeyWithDefault(llvm::StringRef Key, llvm::Optional<T> &Val,
const llvm::Optional<T> &DefaultValue, bool Required) {
const llvm::Optional<T> &DefaultValue,
bool Required) {
assert(!DefaultValue.has_value() &&
"Optional<T> shouldn't have a value!");
void *SaveInfo;
@@ -559,7 +558,7 @@ struct ScalarReferenceTraits<bool> {
static bool mustQuote(llvm::StringRef) { return false; }
};
template<>
template <>
struct ScalarReferenceTraits<llvm::StringRef> {
static llvm::StringRef stringRef(const llvm::StringRef &);
static bool mustQuote(llvm::StringRef S) { return true; }