[llvm] r226948 - [YAMLIO] Dirty hack: Force integral conversion to allow strong typedefs to convert.
Michael J. Spencer
bigcheesegs at gmail.com
Fri Jan 23 14:24:57 PST 2015
Author: mspencer
Date: Fri Jan 23 16:24:57 2015
New Revision: 226948
URL: http://llvm.org/viewvc/llvm-project?rev=226948&view=rev
Log:
[YAMLIO] Dirty hack: Force integral conversion to allow strong typedefs to convert.
Modified:
llvm/trunk/include/llvm/Support/YAMLTraits.h
Modified: llvm/trunk/include/llvm/Support/YAMLTraits.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/YAMLTraits.h?rev=226948&r1=226947&r2=226948&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/YAMLTraits.h (original)
+++ llvm/trunk/include/llvm/Support/YAMLTraits.h Fri Jan 23 16:24:57 2015
@@ -476,9 +476,10 @@ public:
template <typename FBT, typename T>
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;
}
}
More information about the llvm-commits
mailing list