[clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

Mingming Liu via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 30 23:09:13 PST 2023


================
@@ -0,0 +1,70 @@
+#!/bin/bash
+
+if [ $# -lt 2 ]; then
+  echo "Path to clang and llvm-profdata required!"
+  echo "Usage: update_icall_promotion_inputs.sh /path/to/updated/clang /path/to/updated/llvm-profdata"
+  exit 1
+else
+  CLANG=$1
+  LLVMPROFDATA=$2
+fi
+
+# Allows the script to be invoked from other directories.
+OUTDIR=$(dirname $(realpath -s $0))
+
+# Creates trivial header file to expose global_func.
+cat > ${OUTDIR}/lib.h << EOF
+void global_func();
+EOF
+
+# Creates lib.cc. global_func might call one of two indirect callees. Both
+# indirect callees have internal linkage.
----------------
minglotus-6 wrote:

good catch. I changed 'callee1' to external linkage in this script and the test IRs.



https://github.com/llvm/llvm-project/pull/74008


More information about the cfe-commits mailing list