aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSean Silva <silvas@purdue.edu>2013-06-05 23:55:26 +0000
committerSean Silva <silvas@purdue.edu>2013-06-05 23:55:26 +0000
commit0d861a24d87306543e9dc3657584bb9b26d110cc (patch)
tree0da224a1abde5f09560811d7a167c5c25225f83f /include
parent4370ddb8b821bda66478160c1a1c5714a1877d85 (diff)
downloadexternal_llvm-0d861a24d87306543e9dc3657584bb9b26d110cc.zip
external_llvm-0d861a24d87306543e9dc3657584bb9b26d110cc.tar.gz
external_llvm-0d861a24d87306543e9dc3657584bb9b26d110cc.tar.bz2
Remove error-prone methods of BinaryRef.
A user shouldn't care about the internal state, and these methods by their very nature require asserting a predicate on the internal state. As such, they cannot be used safely without introducing hidden long-distance dependencies on the manner of construction of the BinaryRef. Use writeAsBinary(raw_ostream &) and writeAsHex(raw_ostream &) if you need to access the data in a binary or hex format. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183353 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Object/YAML.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/include/llvm/Object/YAML.h b/include/llvm/Object/YAML.h
index e349e35..7f59dd1 100644
--- a/include/llvm/Object/YAML.h
+++ b/include/llvm/Object/YAML.h
@@ -36,14 +36,6 @@ public:
: Data(reinterpret_cast<const uint8_t *>(Data.data()), Data.size()),
DataIsHexString(true) {}
BinaryRef() : DataIsHexString(true) {}
- StringRef getHex() const {
- assert(DataIsHexString);
- return StringRef(reinterpret_cast<const char *>(Data.data()), Data.size());
- }
- ArrayRef<uint8_t> getBinary() const {
- assert(!DataIsHexString);
- return Data;
- }
/// \brief The number of bytes that are represented by this BinaryRef.
/// This is the number of bytes that writeAsBinary() will write.
ArrayRef<uint8_t>::size_type binary_size() const {