From a150ffeada69d6d5ff18f5caf3473e2cfb95d91f Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 3 Apr 2008 16:44:37 +0000 Subject: [PATCH] Add member template version of SerializeTrait::Create that also accepts an optional argument for us by T's Create method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49169 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Bitcode/Serialization.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/llvm/Bitcode/Serialization.h b/include/llvm/Bitcode/Serialization.h index df82c8f8e9a..6b64f5ecb5d 100644 --- a/include/llvm/Bitcode/Serialization.h +++ b/include/llvm/Bitcode/Serialization.h @@ -38,6 +38,11 @@ struct SerializeTrait { static inline void Emit(Serializer& S, const T& X) { X.Emit(S); } static inline void Read(Deserializer& D, T& X) { X.Read(D); } static inline T* Create(Deserializer& D) { return T::Create(D); } + + template + static inline T* Create(Deserializer& D, Arg1& arg1) { + return T::Create(D, arg1); + } }; #define SERIALIZE_INT_TRAIT(TYPE)\