[llvm] [AArch64] Transition from MCSymbolRefExpr::VariantKind constants (PR #133214)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 21 14:35:22 PDT 2025


MaskRay wrote:

> Before this commit we used to be able to say `const auto* targetExpr = llvm::MCSymbolRefExpr::create(targetSymbol, llvm::MCSymbolRefExpr::VariantKind::VK_PAGE, tmpCtx);`
> 
> with this change, it seems like I should be able to say:
> 
> `const auto* targetExpr = llvm::MCSymbolRefExpr::create(targetSymbol, llvm::AArch64MCExpr::M_PAGE, tmpCtx);`
> 
> However, AArch64MCExpr is not in includes. Is there a way to to do this w/o touching internals?

The relocation specifier constants are intended to be internal - only accessed by MCParser/CodeGen. There might be some way to export `llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h` in a build so that you can include the header.

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


More information about the llvm-commits mailing list