[llvm] [CFI][annotation] Leave alone function pointers in function annotations (PR #80173)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 31 13:58:56 PST 2024
================
@@ -1837,6 +1851,16 @@ LowerTypeTestsModule::LowerTypeTestsModule(
}
OS = TargetTriple.getOS();
ObjectFormat = TargetTriple.getObjectFormat();
+
+ // Function annotation describes or applies to function itself, and
+ // shouldn't be associated with jump table thunk generated for CFI.
+ GlobalAnnotation = M.getGlobalVariable("llvm.global.annotations");
+ auto *C = dyn_cast_or_null<Constant>(GlobalAnnotation);
----------------
nikic wrote:
This cast makes no sense. GlobalAnnotation is a GlobalVariable, which is a subclass of Constant.
https://github.com/llvm/llvm-project/pull/80173
More information about the llvm-commits
mailing list