[clang] [llvm] Handle leading underscores in update_cc_test_checks.py (PR #121800)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 12 15:44:55 PST 2025
================
@@ -122,6 +122,14 @@ def parse_clang_ast_json(node, loc, search):
if search is None:
search = spell
mangled = node.get("mangledName", spell)
+ # Clang's AST dump includes the globals prefix, but when Clang emits
+ # LLVM IR this is not included and instead added as part of the asm
+ # output. Strip it from the mangled name of globals when needed
+ # (see DataLayout::getGlobalPrefix()).
+ if globals_name_prefix:
+ storage = node.get("storageClass", None)
+ if storage != "static" and mangled[0] == globals_name_prefix:
----------------
SpencerAbson wrote:
> `storage != "static"
Is this making the assumption that the names of static objects are not mangled?
https://github.com/llvm/llvm-project/pull/121800
More information about the llvm-commits
mailing list