1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2025-03-22 10:36:10 +00:00

[asan] remove redundant ifndefs. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232521 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kostya Serebryany 2015-03-17 19:13:23 +00:00
parent 6279aae989
commit 0e5ec02e1e

@ -105,10 +105,6 @@ static const char *const kAsanUnpoisonStackMemoryName =
static const char *const kAsanOptionDetectUAR =
"__asan_option_detect_stack_use_after_return";
#ifndef NDEBUG
static const int kAsanStackAfterReturnMagic = 0xf5;
#endif
// Accesses sizes are powers of two: 1, 2, 4, 8, 16.
static const size_t kNumberOfAccessSizes = 5;
@ -1676,14 +1672,14 @@ void FunctionStackPoisoner::SetShadowToStackAfterReturnInlined(
IRBuilder<> &IRB, Value *ShadowBase, int Size) {
assert(!(Size % 8));
#ifndef NDEBUG
static_assert(kAsanStackAfterReturnMagic == 0xf5, "");
#endif
// kAsanStackAfterReturnMagic is 0xf5.
const uint64_t kAsanStackAfterReturnMagic64 = 0xf5f5f5f5f5f5f5f5ULL;
for (int i = 0; i < Size; i += 8) {
Value *p = IRB.CreateAdd(ShadowBase, ConstantInt::get(IntptrTy, i));
IRB.CreateStore(ConstantInt::get(IRB.getInt64Ty(), 0xf5f5f5f5f5f5f5f5ULL),
IRB.CreateIntToPtr(p, IRB.getInt64Ty()->getPointerTo()));
IRB.CreateStore(
ConstantInt::get(IRB.getInt64Ty(), kAsanStackAfterReturnMagic64),
IRB.CreateIntToPtr(p, IRB.getInt64Ty()->getPointerTo()));
}
}