[PATCH] D138945: [ModuleUtils][KCFI] Set !kcfi_type metadata for sanitizer constructors
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 2 16:25:07 PST 2022
MaskRay accepted this revision.
MaskRay added a comment.
LGTM.
================
Comment at: llvm/lib/Transforms/Utils/ModuleUtils.cpp:121
+
+ LLVMContext &Ctx = M.getContext();
+ MDBuilder MDB(Ctx);
----------------
Add a comment that this matches `CodeGenModule::CreateKCFITypeId` in Clang.
================
Comment at: llvm/test/Instrumentation/AddressSanitizer/kcfi.ll:1
+; Test that we emit kcfi_type metadata for asan.module_ctor with KCFI.
+
----------------
================
Comment at: llvm/test/Instrumentation/AddressSanitizer/kcfi.ll:12
+ !0 = !{i32 4, !"kcfi", i32 1}
+
----------------
delete trailing blank line
remove excess indentation
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138945/new/
https://reviews.llvm.org/D138945
More information about the llvm-commits
mailing list