Skip to content

Commit f528b64

Browse files
committed
More changes due to shift from Union to std::variant
Signed-off-by: Arvind Sudarsanam <[email protected]>
1 parent 944841a commit f528b64

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

llvm/include/llvm/Support/PropertySetIO.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class PropertyValue {
150150
template <typename T> void set(T V) {
151151
if (getTypeTag<T>() != Ty)
152152
llvm_unreachable("invalid type tag for this operation");
153-
getValueRef<T>() = V;
153+
Val = V;
154154
}
155155

156156
Type getType() const { return Ty; }
@@ -167,7 +167,6 @@ class PropertyValue {
167167
}
168168

169169
private:
170-
template <typename T> T &getValueRef();
171170
void copy(const PropertyValue &P);
172171

173172
Type Ty = NONE;

llvm/lib/Support/PropertySetIO.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,6 @@ void PropertySetRegistry::write(raw_ostream &Out) const {
134134
namespace llvm {
135135
namespace util {
136136

137-
template <> uint32_t &PropertyValue::getValueRef<uint32_t>() {
138-
return std::get<uint32_t>(Val);
139-
}
140-
141-
template <> byte *&PropertyValue::getValueRef<byte *>() {
142-
auto &ByteArrayVal = std::get<byte *>(Val);
143-
return ByteArrayVal;
144-
}
145-
146137
template <> PropertyValue::Type PropertyValue::getTypeTag<uint32_t>() {
147138
return UINT32;
148139
}

0 commit comments

Comments
 (0)