Skip to content

Commit f7610b8

Browse files
authored
[clang[ Add a module flag "Disable CFI Check"
1 parent 26db05a commit f7610b8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,6 +1037,11 @@ void CodeGenModule::Release() {
10371037
llvm::MDString::get(Ctx, ABIStr));
10381038
}
10391039

1040+
if (CodeGenOpts.DisableCFICheck) {
1041+
// Indicate that we want to disable cfi check.
1042+
getModule().addModuleFlag(llvm::Module::Override, "Disable CFI Check", 1);
1043+
}
1044+
10401045
if (CodeGenOpts.SanitizeCfiCrossDso && !CodeGenOpts.DisableCFICheck) {
10411046
// Indicate that we want cross-DSO control flow integrity checks.
10421047
getModule().addModuleFlag(llvm::Module::Override, "Cross-DSO CFI", 1);

0 commit comments

Comments
 (0)