projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b7aea8
)
[flang] add comment per Steve's request in review
author
Eric Schweitz
<eschweitz@nvidia.com>
Wed, 27 Mar 2019 17:54:14 +0000
(10:54 -0700)
committer
Eric Schweitz
<eschweitz@nvidia.com>
Wed, 27 Mar 2019 23:03:52 +0000
(16:03 -0700)
Original-commit: flang-compiler/f18@
c3a5d6a15eca27c25ba1dcd50e3a478228e98eda
Reviewed-on: https://github.com/flang-compiler/f18/pull/354
flang/lib/FIR/statements.h
patch
|
blob
|
history
diff --git
a/flang/lib/FIR/statements.h
b/flang/lib/FIR/statements.h
index
8afd598
..
5255c5d
100644
(file)
--- 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<Statement *>(reinterpret_cast<char *>(stmt) -