Skip to content

Commit de88c1a

Browse files
committed
[asan][X86] Change some std::string variables to StringRef. NFC
1 parent 5c17f9e commit de88c1a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

llvm/lib/Target/X86/X86MCInstLower.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,11 +1347,12 @@ void X86AsmPrinter::LowerASAN_CHECK_MEMACCESS(const MachineInstr &MI) {
13471347
AccessInfo.CompileKernel, &ShadowBase,
13481348
&MappingScale, &OrShadowOffset);
13491349

1350-
std::string Name = AccessInfo.IsWrite ? "store" : "load";
1351-
std::string Op = OrShadowOffset ? "or" : "add";
1352-
std::string SymName = "__asan_check_" + Name + "_" + Op + "_" +
1353-
utostr(1ULL << AccessInfo.AccessSizeIndex) + "_" +
1354-
TM.getMCRegisterInfo()->getName(Reg.asMCReg());
1350+
StringRef Name = AccessInfo.IsWrite ? "store" : "load";
1351+
StringRef Op = OrShadowOffset ? "or" : "add";
1352+
std::string SymName = ("__asan_check_" + Name + "_" + Op + "_" +
1353+
Twine(1ULL << AccessInfo.AccessSizeIndex) + "_" +
1354+
TM.getMCRegisterInfo()->getName(Reg.asMCReg()))
1355+
.str();
13551356
if (OrShadowOffset)
13561357
report_fatal_error(
13571358
"OrShadowOffset is not supported with optimized callbacks");

0 commit comments

Comments
 (0)