[PATCH] D70696: [DebugInfo] Support to emit debugInfo for extern variables

Yonghong Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 9 17:20:13 PST 2019


yonghong-song marked an inline comment as done.
yonghong-song added inline comments.


================
Comment at: clang/test/CodeGen/debug-info-extern-basic.c:14-23
+extern int (*foo)(int);
+int test3() {
+  return foo(0);
+}
+
+int test4() {
+  extern int (*foo2)(int);
----------------
dblaikie wrote:
> What do these tests add? What sort of bugs would be caught by these global function pointer tests that wouldn't be caught by the char tests above them?
These two additional tests to test extern function pointers. One of bpf program use cases specifically need extern function debuginfo type so I added a bunch. I do agree that this may be too much unnecessary and variable tests should cover this.

I will remove all these extern function pointer tests including below one, except one like the above test3() which should be enough.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70696





More information about the cfe-commits mailing list