[llvm] [CFI][annotation] Leave alone function pointers in function annotations (PR #80173)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 31 14:11:34 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);
----------------
yozhu wrote:
This is copied from `llvm/lib/Transform/IPO/Annotation2Metadata.cpp`, at line 33.
https://github.com/llvm/llvm-project/pull/80173
More information about the llvm-commits
mailing list