From de2f7538102c8cbea9c46602728dec0f2fcd0436 Mon Sep 17 00:00:00 2001 From: Eric Schweitz Date: Wed, 27 Mar 2019 10:54:14 -0700 Subject: [PATCH] [flang] add comment per Steve's request in review Original-commit: flang-compiler/f18@c3a5d6a15eca27c25ba1dcd50e3a478228e98eda Reviewed-on: https://github.com/flang-compiler/f18/pull/354 --- flang/lib/FIR/statements.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flang/lib/FIR/statements.h b/flang/lib/FIR/statements.h index 8afd598..5255c5d 100644 --- a/flang/lib/FIR/statements.h +++ b/flang/lib/FIR/statements.h @@ -558,6 +558,9 @@ public: std::string dump() const; // g++/clang++ will optimize this to a simple register copy + // Every Stmt_impl is wrapped in and the first data member of a Statement; + // therefore, a pointer to one or the other is bitwise identical. + // This checks that this assumption is, in fact, true. static Statement *From(Stmt_impl *stmt) { static Statement s{nullptr, UnreachableStmt::Create()}; auto *result{reinterpret_cast(reinterpret_cast(stmt) - -- 2.7.4