Skip to content

Commit 699c408

Browse files
committed
[NFC][HWASAN] Fix misleading name
1 parent 300425c commit 699c408

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ class HWAddressSanitizer {
348348
void instrumentGlobals();
349349

350350
Value *getPC(IRBuilder<> &IRB);
351-
Value *getSP(IRBuilder<> &IRB);
351+
Value *getFP(IRBuilder<> &IRB);
352352
Value *getFrameRecordInfo(IRBuilder<> &IRB);
353353

354354
void instrumentPersonalityFunctions();
@@ -1148,7 +1148,7 @@ Value *HWAddressSanitizer::getStackBaseTag(IRBuilder<> &IRB) {
11481148
// Extract some entropy from the stack pointer for the tags.
11491149
// Take bits 20..28 (ASLR entropy) and xor with bits 0..8 (these differ
11501150
// between functions).
1151-
Value *StackPointerLong = getSP(IRB);
1151+
Value *StackPointerLong = getFP(IRB);
11521152
Value *StackTag =
11531153
applyTagMask(IRB, IRB.CreateXor(StackPointerLong,
11541154
IRB.CreateLShr(StackPointerLong, 20)));
@@ -1165,7 +1165,7 @@ Value *HWAddressSanitizer::getAllocaTag(IRBuilder<> &IRB, Value *StackTag,
11651165
}
11661166

11671167
Value *HWAddressSanitizer::getUARTag(IRBuilder<> &IRB) {
1168-
Value *StackPointerLong = getSP(IRB);
1168+
Value *StackPointerLong = getFP(IRB);
11691169
Value *UARTag =
11701170
applyTagMask(IRB, IRB.CreateLShr(StackPointerLong, PointerTagShift));
11711171

@@ -1232,7 +1232,7 @@ Value *HWAddressSanitizer::getPC(IRBuilder<> &IRB) {
12321232
return IRB.CreatePtrToInt(IRB.GetInsertBlock()->getParent(), IntptrTy);
12331233
}
12341234

1235-
Value *HWAddressSanitizer::getSP(IRBuilder<> &IRB) {
1235+
Value *HWAddressSanitizer::getFP(IRBuilder<> &IRB) {
12361236
if (!CachedSP) {
12371237
// FIXME: use addressofreturnaddress (but implement it in aarch64 backend
12381238
// first).
@@ -1251,7 +1251,7 @@ Value *HWAddressSanitizer::getSP(IRBuilder<> &IRB) {
12511251
Value *HWAddressSanitizer::getFrameRecordInfo(IRBuilder<> &IRB) {
12521252
// Prepare ring buffer data.
12531253
Value *PC = getPC(IRB);
1254-
Value *SP = getSP(IRB);
1254+
Value *SP = getFP(IRB);
12551255

12561256
// Mix SP and PC.
12571257
// Assumptions:

0 commit comments

Comments
 (0)