[PATCH] D118052: [X86] Fix CodeGen Module Flag for -mibt-seal

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 23 09:49:40 PDT 2022


nickdesaulniers added inline comments.


================
Comment at: clang/test/CodeGen/X86/x86-cf-protection.c:5-16
+// RUN: %clang -target i386-unknown-unknown -o - -emit-llvm -S -fcf-protection=branch -flto %s | FileCheck %s --check-prefix=NOIBTSEAL
+// RUN: %clang -target i386-unknown-unknown -o - -emit-llvm -S -fcf-protection=branch -mibt-seal %s | FileCheck %s --check-prefix=NOLTO
 
 // RETURN: #define __CET__ 2
 // BRANCH: #define __CET__ 1
 // FULL: #define __CET__ 3
+// IBTSEAL: "cf-protection-branch", i32 1
----------------
Rather than have two different check prefixes with the same value, you could change the above two `--check-prefix=` lines into `--check-prefixes=<unique val>,NOSEAL` then use `NOSEAL-NOT: "ibt-seal", i32 1`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118052/new/

https://reviews.llvm.org/D118052



More information about the cfe-commits mailing list