ChuanqiXu added a comment.

I am a little confusing about the problem. The example in the link tells the 
align of the `promise` instead of the `frame`. The address of `promise` and 
`frame` is not same. It looks like you're trying to do:

  +               +-----------------------------------+
  |               |                                   |
  +---------------+          frame                    |
  | pedding       |                                   |
  +               +-----------------------------------+
                  ^
                  |
                  |
                  |
                  |
                  |
                  +
  
                The address of frame matches the offset of promise.

However, what we should do is:

  +               +-----------------------------------+
  |               |       +--------------+            |
  +---------------+frame  | promise      |            |
  | pedding       |       <--------------+            |
  +               +-----------------------------------+
                  ^       |
                  |       |
                  |       |
                  |       |
                  |       +
                  |       This is what we really want
                  +
  
                The address of frame matches the offset of promise.

If I get the problem problems, I think we can handle this problem in the middle 
end if the information for the promise remains.



================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:16756
 };
-} // namespace
 
----------------
Why we remove the anonymous namespace here?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97915/new/

https://reviews.llvm.org/D97915

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to