diff options
author | Vitaly Buka <vitalybuka@google.com> | 2016-06-02 00:06:42 +0000 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2016-06-02 00:06:42 +0000 |
commit | 7b8ed4f223669068563c8ee2f17b86825c72e2c9 (patch) | |
tree | 41771c8d417facb892a0eeae28e970ae1af62b74 /llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | |
parent | 598f55387a1558847f2136be5a6a806391e9651e (diff) | |
download | bcm5719-llvm-7b8ed4f223669068563c8ee2f17b86825c72e2c9.tar.gz bcm5719-llvm-7b8ed4f223669068563c8ee2f17b86825c72e2c9.zip |
[asan] Rename *UAR* into *UseAfterReturn*
Summary:
To improve readability.
PR27453
Reviewers: kcc, eugenis, aizatsky
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D20761
llvm-svn: 271447
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 826704e95d0..b9b4a283875 100644 --- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -116,7 +116,7 @@ static const char *const kAsanUnpoisonStackMemoryName = static const char *const kAsanGlobalsRegisteredFlagName = "__asan_globals_registered"; -static const char *const kAsanOptionDetectUAR = +static const char *const kAsanOptionDetectUseAfterReturn = "__asan_option_detect_stack_use_after_return"; static const char *const kAsanAllocaPoison = "__asan_alloca_poison"; @@ -2060,13 +2060,13 @@ void FunctionStackPoisoner::poisonStack() { // ? __asan_stack_malloc_N(LocalStackSize) // : nullptr; // void *LocalStackBase = (FakeStack) ? FakeStack : alloca(LocalStackSize); - Constant *OptionDetectUAR = F.getParent()->getOrInsertGlobal( - kAsanOptionDetectUAR, IRB.getInt32Ty()); - Value *UARIsEnabled = - IRB.CreateICmpNE(IRB.CreateLoad(OptionDetectUAR), + Constant *OptionDetectUseAfterReturn = F.getParent()->getOrInsertGlobal( + kAsanOptionDetectUseAfterReturn, IRB.getInt32Ty()); + Value *UseAfterReturnIsEnabled = + IRB.CreateICmpNE(IRB.CreateLoad(OptionDetectUseAfterReturn), Constant::getNullValue(IRB.getInt32Ty())); Instruction *Term = - SplitBlockAndInsertIfThen(UARIsEnabled, InsBefore, false); + SplitBlockAndInsertIfThen(UseAfterReturnIsEnabled, InsBefore, false); IRBuilder<> IRBIf(Term); IRBIf.SetCurrentDebugLocation(EntryDebugLocation); StackMallocIdx = StackMallocSizeClass(LocalStackSize); @@ -2076,7 +2076,7 @@ void FunctionStackPoisoner::poisonStack() { ConstantInt::get(IntptrTy, LocalStackSize)); IRB.SetInsertPoint(InsBefore); IRB.SetCurrentDebugLocation(EntryDebugLocation); - FakeStack = createPHI(IRB, UARIsEnabled, FakeStackValue, Term, + FakeStack = createPHI(IRB, UseAfterReturnIsEnabled, FakeStackValue, Term, ConstantInt::get(IntptrTy, 0)); Value *NoFakeStack = |