================
@@ -1481,14 +1481,18 @@ void CodeGenModule::Release() {
if (!LangOpts.isSignReturnAddressWithAKey())
getModule().addModuleFlag(llvm::Module::Min,
"sign-return-address-with-bkey", 2);
-
- if (LangOpts.PointerAuthELFGOT)
- getModule().addModuleFlag(llvm::Module::Error, "ptrauth-elf-got", 1);
+ }
+ if (T.isAArch64()) {
+ if (getTriple().isOSBinFormatELF())
+ getModule().addModuleFlag(
+ llvm::Module::Error, "ptrauth-elf-got",
+ static_cast<uint32_t>(LangOpts.PointerAuthELFGOT));
if (getTriple().isOSLinux()) {
- if (LangOpts.PointerAuthCalls)
- getModule().addModuleFlag(llvm::Module::Error,
- "ptrauth-sign-personality", 1);
+ getModule().addModuleFlag(
+ llvm::Module::Error, "ptrauth-sign-personality",
+ static_cast<uint32_t>(LangOpts.PointerAuthCalls));
----------------
atrosinenko wrote:
Same here.
https://github.com/llvm/llvm-project/pull/204226
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits