[clang] [llvm] Handle leading underscores in update_cc_test_checks.py (PR #121800)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 11:30:59 PST 2025
================
@@ -122,6 +122,11 @@ def parse_clang_ast_json(node, loc, search):
if search is None:
search = spell
mangled = node.get("mangledName", spell)
+ # Strip leading underscore from globals, so the name matches the LLVM one
----------------
arichardson wrote:
```suggestion
# 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()).
```
Maybe add a more detailed comment along these lines?
https://github.com/llvm/llvm-project/pull/121800
More information about the llvm-commits
mailing list