We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2bfda1c commit 050244aCopy full SHA for 050244a
llvm/lib/Transforms/Instrumentation/AllocToken.cpp
@@ -140,7 +140,9 @@ MDNode *getAllocTokenMetadata(const CallBase &CB) {
140
class ModeBase {
141
public:
142
explicit ModeBase(const IntegerType &TokenTy, uint64_t MaxTokens)
143
- : MaxTokens(MaxTokens ? MaxTokens : TokenTy.getBitMask()) {}
+ : MaxTokens(MaxTokens ? MaxTokens : TokenTy.getBitMask()) {
144
+ assert(MaxTokens <= TokenTy.getBitMask());
145
+ }
146
147
protected:
148
uint64_t boundedToken(uint64_t Val) const {
0 commit comments