Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/CodeGen/CodeGenModule.cpp
Show First 20 Lines • Show All 584 Lines • ▼ Show 20 Lines | void CodeGenModule::Release() { | ||||
if (CodeGenOpts.CFProtectionBranch && | if (CodeGenOpts.CFProtectionBranch && | ||||
Target.checkCFProtectionBranchSupported(getDiags())) { | Target.checkCFProtectionBranchSupported(getDiags())) { | ||||
// Indicate that we want to instrument branch control flow protection. | // Indicate that we want to instrument branch control flow protection. | ||||
getModule().addModuleFlag(llvm::Module::Override, "cf-protection-branch", | getModule().addModuleFlag(llvm::Module::Override, "cf-protection-branch", | ||||
1); | 1); | ||||
} | } | ||||
if (Arch == llvm::Triple::aarch64 || Arch == llvm::Triple::aarch64_32 || | |||||
Arch == llvm::Triple::aarch64_be) { | |||||
nickdesaulniers: I was wondering if `Arch.isAArch64()` would be more concise, but curiously it does not contain… | |||||
getModule().addModuleFlag(llvm::Module::Error, | |||||
"branch-target-enforcement", | |||||
LangOpts.BranchTargetEnforcement); | |||||
getModule().addModuleFlag(llvm::Module::Error, "sign-return-address", | |||||
LangOpts.hasSignReturnAddress()); | |||||
getModule().addModuleFlag(llvm::Module::Error, "sign-return-address-all", | |||||
LangOpts.isSignReturnAddressScopeAll()); | |||||
getModule().addModuleFlag(llvm::Module::Error, | |||||
"sign-return-address-with-bkey", | |||||
!LangOpts.isSignReturnAddressWithAKey()); | |||||
} | |||||
if (LangOpts.CUDAIsDevice && getTriple().isNVPTX()) { | if (LangOpts.CUDAIsDevice && getTriple().isNVPTX()) { | ||||
// Indicate whether __nvvm_reflect should be configured to flush denormal | // Indicate whether __nvvm_reflect should be configured to flush denormal | ||||
// floating point values to 0. (This corresponds to its "__CUDA_FTZ" | // floating point values to 0. (This corresponds to its "__CUDA_FTZ" | ||||
// property.) | // property.) | ||||
getModule().addModuleFlag(llvm::Module::Override, "nvvm-reflect-ftz", | getModule().addModuleFlag(llvm::Module::Override, "nvvm-reflect-ftz", | ||||
CodeGenOpts.FP32DenormalMode.Output != | CodeGenOpts.FP32DenormalMode.Output != | ||||
llvm::DenormalMode::IEEE); | llvm::DenormalMode::IEEE); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 5,517 Lines • Show Last 20 Lines |
I was wondering if Arch.isAArch64() would be more concise, but curiously it does not contain aarch64_32 ArchType.