mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
Sorry about that. MSVC seems to accept just about any random string you give it ;/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153979 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d13af63df7
commit
c35146b725
@ -113,7 +113,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
Node(unsigned int Type, OwningPtr<Document>&, StringRef Anchor);
|
Node(unsigned int Type, OwningPtr<Document>&, StringRef Anchor);
|
||||||
virtual ~Node();
|
|
||||||
|
|
||||||
/// @brief Get the value of the anchor attached to this node. If it does not
|
/// @brief Get the value of the anchor attached to this node. If it does not
|
||||||
/// have one, getAnchor().size() will be 0.
|
/// have one, getAnchor().size() will be 0.
|
||||||
@ -208,25 +207,6 @@ private:
|
|||||||
, SmallVectorImpl<char> &Storage) const;
|
, SmallVectorImpl<char> &Storage) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool getAs(const ScalarNode *SN, bool &Result) {
|
|
||||||
SmallString<4> Storage;
|
|
||||||
StringRef Value = SN->getValue(Storage);
|
|
||||||
if (Value == "true")
|
|
||||||
Result = true;
|
|
||||||
else if (Value == "false")
|
|
||||||
Result = false;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
typename enable_if_c<std::numeric_limits<T>::is_integer, bool>::type
|
|
||||||
getAs(const ScalarNode *SN, T &Result) {
|
|
||||||
SmallString<4> Storage;
|
|
||||||
return !SN->getValue(Storage).getAsInteger(0, Result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @brief A key and value pair. While not technically a Node under the YAML
|
/// @brief A key and value pair. While not technically a Node under the YAML
|
||||||
/// representation graph, it is easier to treat them this way.
|
/// representation graph, it is easier to treat them this way.
|
||||||
///
|
///
|
||||||
|
@ -133,6 +133,7 @@ struct Token : ilist_node<Token> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace llvm {
|
||||||
template<>
|
template<>
|
||||||
struct ilist_sentinel_traits<Token> {
|
struct ilist_sentinel_traits<Token> {
|
||||||
Token *createSentinel() const {
|
Token *createSentinel() const {
|
||||||
@ -163,6 +164,7 @@ struct ilist_node_traits<Token> {
|
|||||||
|
|
||||||
BumpPtrAllocator Alloc;
|
BumpPtrAllocator Alloc;
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
typedef ilist<Token> TokenQueueT;
|
typedef ilist<Token> TokenQueueT;
|
||||||
|
|
||||||
@ -1564,8 +1566,6 @@ Node::Node(unsigned int Type, OwningPtr<Document> &D, StringRef A)
|
|||||||
SourceRange = SMRange(Start, Start);
|
SourceRange = SMRange(Start, Start);
|
||||||
}
|
}
|
||||||
|
|
||||||
Node::~Node() {}
|
|
||||||
|
|
||||||
Token &Node::peekNext() {
|
Token &Node::peekNext() {
|
||||||
return Doc->peekNext();
|
return Doc->peekNext();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user