[PATCH] D81702: [WASM] Avoid passing uninit section indices when not creating code or data sections
    Sam Clegg via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Jun 11 18:43:32 PDT 2020
    
    
  
sbc100 added a comment.
How about one of these two options:
1. initialing CodeSectionIndex and DataSectionIndex to 0 in the class declaration?  (and in reset() I guess too?).  You can treat 0 as invalid for both of them.
2. Remove  CodeSectionIndex and DataSectionIndex completely from the class and just return the index value from writeCodeSection and writeDataSection (again with 0 meaning none).
Either of those I think would be fine.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81702/new/
https://reviews.llvm.org/D81702
    
    
More information about the llvm-commits
mailing list