[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)
Ellis Hoag via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 1 10:36:59 PST 2023
================
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO,
GlobalValue::LinkageTypes Linkage,
StringRef FileName) {
SmallString<64> Name;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
- Name.append(FileName.empty() ? "<unknown>" : FileName);
- Name.append(";");
- }
Mangler().getNameWithPrefix(Name, &GO, /*CannotUsePrivateLabel=*/true);
----------------
ellishg wrote:
D156569 changes the format from `[<filepath>:]<function-name>` to `[<filepath>;]<linkage-name>`. Note the change from **function-name** to **linkage-name**. Having the mangled name is required so that we can pass a symbol order via `-symbol-ordering-file` or `-order_file`.
https://github.com/llvm/llvm-project/pull/74008
More information about the cfe-commits
mailing list