mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
[llvm] Replacing asserts with static_asserts where appropriate
Summary: This patch consists of the suggestions of clang-tidy/misc-static-assert check. Reviewers: alexfh Reviewed By: alexfh Subscribers: xazax.hun, llvm-commits Differential Revision: http://reviews.llvm.org/D8343 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232366 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1621,7 +1621,11 @@ static int StackMallocSizeClass(uint64_t LocalStackSize) {
|
||||
void FunctionStackPoisoner::SetShadowToStackAfterReturnInlined(
|
||||
IRBuilder<> &IRB, Value *ShadowBase, int Size) {
|
||||
assert(!(Size % 8));
|
||||
assert(kAsanStackAfterReturnMagic == 0xf5);
|
||||
|
||||
#ifndef NDEBUG
|
||||
static_assert(kAsanStackAfterReturnMagic == 0xf5, "");
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < Size; i += 8) {
|
||||
Value *p = IRB.CreateAdd(ShadowBase, ConstantInt::get(IntptrTy, i));
|
||||
IRB.CreateStore(ConstantInt::get(IRB.getInt64Ty(), 0xf5f5f5f5f5f5f5f5ULL),
|
||||
|
||||
Reference in New Issue
Block a user