diff options
| author | Fangrui Song <i@maskray.me> | 2025-03-23 12:13:12 -0700 |
|---|---|---|
| committer | Fangrui Song <i@maskray.me> | 2025-03-23 12:13:13 -0700 |
| commit | b73e144bdf01a27145724d6804a2ab63915428b4 (patch) | |
| tree | 17ffb866cb668c8eefa0bde6c10190b169c454b8 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
| parent | 8a133882bbb2bc89578985973d32d7450bed3611 (diff) | |
MCValue: Simplify code with getSubSym
MCValue::SymB is a MCSymbolRefExpr *, which might become MCSymbol * in
the future. Simplify some code that uses MCValue::SymB.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 27a70e6f775b..59417d010df4 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -1564,7 +1564,7 @@ const MCExpr *TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel( // The offset must consider the original displacement from the base symbol // since 32-bit targets don't have a GOTPCREL to fold the PC displacement. Offset = -MV.getConstant(); - const MCSymbol *BaseSym = &MV.getSymB()->getSymbol(); + const MCSymbol *BaseSym = MV.getSubSym(); // Access the final symbol via sym$non_lazy_ptr and generate the appropriated // non_lazy_ptr stubs. |
