[PATCH] D105909: [clang][CallGraphSection] Add type id metadata to indirect call and targets
Matt Morehouse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 14 13:46:27 PDT 2021
morehouse added inline comments.
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2068
+ EmittedMDIdGeneralized = true;
+ }
+
----------------
This code also seems unnecessary as it puts metadata on function definitions.
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2177
+ !CodeGenOpts.SanitizeCfiCanonicalJumpTables ||
+ CodeGenOpts.CallGraphSection)
CreateFunctionTypeMetadataForIcall(FD, F);
----------------
Also seems unnecessary.
================
Comment at: clang/test/CodeGen/call-graph-section.c:20
+
+// CHECK-DAG: define {{(dso_local)?}} i32 @baz({{.*}} !type [[F_TPRIMITIVE:![0-9]+]]
+int baz(char a, float b, double c) {
----------------
Do we still expect type metadata on function definitions on the latest diff?
================
Comment at: clang/test/CodeGen/call-graph-section.c:39
+ fp_qux(0, 0, 0);
+}
+
----------------
necipfazil wrote:
> morehouse wrote:
> > Should we also add a test with a C struct parameter?
> I will add one.
I mean an indirect call with a type like this:
```
void foo(struct MyStruct s)
```
Currently all the tests use primitive types.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105909/new/
https://reviews.llvm.org/D105909
More information about the llvm-commits
mailing list