[PATCH] D128551: [NFC][HWASan] Refactor hwasan pass
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 24 13:55:16 PDT 2022
vitalybuka accepted this revision.
vitalybuka added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:1121-1130
+Value *HWAddressSanitizer::getPC(IRBuilder<> &IRB) {
+ Value *PC;
+ if (TargetTriple.getArch() == Triple::aarch64) {
+ PC = readRegister(IRB, "pc");
+ } else {
+ Function *F = IRB.GetInsertBlock()->getParent();
+ PC = IRB.CreatePtrToInt(F, IntptrTy);
----------------
llvm mostly don't use {} for one liners
and we can avoid variables
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128551/new/
https://reviews.llvm.org/D128551
More information about the llvm-commits
mailing list