Lines Matching refs:StringRef
51 #include "llvm/ADT/StringRef.h"
77 bool isUTF8(llvm::StringRef S, size_t *ErrOffset = nullptr);
81 std::string fixUTF8(llvm::StringRef S);
91 using Storage = DenseMap<ObjectKey, Value, llvm::DenseMapInfo<StringRef>>;
125 bool erase(StringRef K);
128 iterator find(StringRef K) { return M.find_as(K); }
129 const_iterator find(StringRef K) const { return M.find_as(K); }
134 Value *get(StringRef K);
135 const Value *get(StringRef K) const;
139 llvm::Optional<std::nullptr_t> getNull(StringRef K) const;
140 llvm::Optional<bool> getBoolean(StringRef K) const;
141 llvm::Optional<double> getNumber(StringRef K) const;
142 llvm::Optional<int64_t> getInteger(StringRef K) const;
143 llvm::Optional<llvm::StringRef> getString(StringRef K) const;
144 const json::Object *getObject(StringRef K) const;
145 json::Object *getObject(StringRef K);
146 const json::Array *getArray(StringRef K) const;
147 json::Array *getArray(StringRef K);
218 /// - strings: std::string, SmallString, formatv, StringRef, char*
219 /// (char*, and StringRef are references, not copies!)
238 /// string (StringRef)
243 /// if (Optional<StringRef> S = E.getAsString()
250 /// if (Optional<StringRef> Font = Opts->getString("font"))
321 Value(StringRef V) : Type(T_StringRef) {
322 create<llvm::StringRef>(V);
328 Value(const char *V) : Value(StringRef(V)) {}
421 llvm::Optional<llvm::StringRef> getAsString() const {
423 return llvm::StringRef(as<std::string>());
425 return as<llvm::StringRef>();
475 mutable llvm::AlignedCharArrayUnion<bool, double, int64_t, llvm::StringRef,
490 ObjectKey(const char *S) : ObjectKey(StringRef(S)) {}
498 ObjectKey(llvm::StringRef S) : Data(S) {
521 operator llvm::StringRef() const { return Data; }
528 llvm::StringRef Data;
532 return llvm::StringRef(L) == llvm::StringRef(R);
538 return StringRef(L) < StringRef(R);
556 inline bool Object::erase(StringRef K) {
631 if (!fromJSON(KV.second, Out[std::string(llvm::StringRef(KV.first))]))
664 template <typename T> bool map(StringRef Prop, T &Out) {
673 template <typename T> bool map(StringRef Prop, llvm::Optional<T> &Out) {
688 llvm::Expected<Value> parse(llvm::StringRef JSON);
799 void attribute(llvm::StringRef Key, const Value& Contents) {
803 void attributeArray(llvm::StringRef Key, Block Contents) {
807 void attributeObject(llvm::StringRef Key, Block Contents) {
818 void attributeBegin(llvm::StringRef Key);
822 void attributeImpl(llvm::StringRef Key, Block Contents) {
859 static void format(const llvm::json::Value &, raw_ostream &, StringRef);