[llvm-commits] [llvm] r172107 - /llvm/trunk/unittests/Support/YAMLIOTest.cpp
Dmitri Gribenko
gribozavr at gmail.com
Thu Jan 10 13:10:44 PST 2013
Author: gribozavr
Date: Thu Jan 10 15:10:44 2013
New Revision: 172107
URL: http://llvm.org/viewvc/llvm-project?rev=172107&view=rev
Log:
Fix coding style
Modified:
llvm/trunk/unittests/Support/YAMLIOTest.cpp
Modified: llvm/trunk/unittests/Support/YAMLIOTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/YAMLIOTest.cpp?rev=172107&r1=172106&r2=172107&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/YAMLIOTest.cpp (original)
+++ llvm/trunk/unittests/Support/YAMLIOTest.cpp Thu Jan 10 15:10:44 2013
@@ -782,16 +782,14 @@
struct MappingTraits<KindAndFlags> {
static void mapping(IO &io, KindAndFlags& kf) {
io.mapRequired("kind", kf.kind);
- // type of flags field varies depending on kind field
-
+ // Type of "flags" field varies depending on "kind" field.
// Use memcpy here to avoid breaking strict aliasing rules.
- if ( kf.kind == kindA ) {
+ if (kf.kind == kindA) {
AFlags aflags;
memcpy(&aflags, &kf.flags, sizeof(aflags));
io.mapRequired("flags", aflags);
memcpy(&kf.flags, &aflags, sizeof(kf.flags));
- }
- else {
+ } else {
BFlags bflags;
memcpy(&bflags, &kf.flags, sizeof(bflags));
io.mapRequired("flags", bflags);
More information about the llvm-commits
mailing list