From 7d1220168c5874201187b054b3e9df6c08bf1cf0 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Fri, 23 Jan 2015 22:24:57 +0000 Subject: [PATCH] [YAMLIO] Dirty hack: Force integral conversion to allow strong typedefs to convert. llvm-svn: 226948 --- include/llvm/Support/YAMLTraits.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/llvm/Support/YAMLTraits.h b/include/llvm/Support/YAMLTraits.h index 75253f1c83e..6b1fe72d0f6 100644 --- a/include/llvm/Support/YAMLTraits.h +++ b/include/llvm/Support/YAMLTraits.h @@ -476,9 +476,10 @@ public: template void enumFallback(T &Val) { if ( matchEnumFallback() ) { - FBT Res = Val; + // FIXME: Force integral conversion to allow strong typedefs to convert. + FBT Res = (uint64_t)Val; yamlize(*this, Res, true); - Val = Res; + Val = (uint64_t)Res; } }