aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bitcode/Reader
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-11-01 22:23:34 +0000
committerTed Kremenek <kremenek@apple.com>2007-11-01 22:23:34 +0000
commitdb74f8e98ae6a92b8bc6bb86c88769ae2227f33e (patch)
tree2ae72c99eb23522c5bf44742a5eb55cfb828efcc /lib/Bitcode/Reader
parentf99fdc666e16255e15d8ab0888a49bddbb96aa2d (diff)
downloadexternal_llvm-db74f8e98ae6a92b8bc6bb86c88769ae2227f33e.zip
external_llvm-db74f8e98ae6a92b8bc6bb86c88769ae2227f33e.tar.gz
external_llvm-db74f8e98ae6a92b8bc6bb86c88769ae2227f33e.tar.bz2
Removed ReadVal from SerializeTrait<T>, and also removed it from
Deserializer. There were issues with Visual C++ barfing when instantiating SerializeTrait<T> when "T" was an abstract class AND SerializeTrait<T>::ReadVal was *never* called: template <typename T> struct SerializeTrait { <SNIP> static inline T ReadVal(Deserializer& D) { T::ReadVal(D); } <SNIP> }; Visual C++ would complain about "T" being an abstract class, even though ReadVal was never instantiated (although one of the other member functions were). Removing this from the trait is not a big deal. It was used hardly ever, and users who want "read-by-value" deserialization can simply call the appropriate methods directly instead of relying on trait-based-dispatch. The trait dispatch for serialization/deserialization is simply sugar in many cases (like this one). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43624 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader')
-rw-r--r--lib/Bitcode/Reader/Deserialize.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Bitcode/Reader/Deserialize.cpp b/lib/Bitcode/Reader/Deserialize.cpp
index e5a4d18..0482b1f 100644
--- a/lib/Bitcode/Reader/Deserialize.cpp
+++ b/lib/Bitcode/Reader/Deserialize.cpp
@@ -166,9 +166,7 @@ void Deserializer::BPEntry::SetPtr(BPNode*& FreeList, void* P) {
#define INT_READ(TYPE)\
void SerializeTrait<TYPE>::Read(Deserializer& D, TYPE& X) {\
- X = (TYPE) D.ReadInt(); }\
-TYPE SerializeTrait<TYPE>::ReadVal(Deserializer& D) {\
- return (TYPE) D.ReadInt(); }
+ X = (TYPE) D.ReadInt(); }
INT_READ(bool)
INT_READ(unsigned char)