[PATCH] D21723: [RFC] Enhance synchscope representation
Tony Tye via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 6 10:38:21 PDT 2017
t-tye added inline comments.
================
Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:4600
+ return SyncScope::ID(Val);
+ return SSIDs[Val];
+}
----------------
t-tye wrote:
> Should this assert(Val < SSIDs.size()) to ensure that the bitcode is not using a value that is not in the SYNC_SCOPE_NAMES_BLOCK_ID block?
Actually, since it is the bit code reader I guess it should use error().
```
if (Val > SSIDs.size())
return error("Invalid sync scope");
return SSIDs[Val];
```
https://reviews.llvm.org/D21723
More information about the llvm-commits
mailing list