From 50057f328870e0ecc4975cd4ef46b2fd6221d999 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Thu, 18 Jul 2019 21:37:16 +0000 Subject: CodeGen: Allow !associated metadata to point to aliases. This is a small extension of !associated, mostly useful for the implementation convenience of instrumentation passes that RAUW globals with aliases, such as LowerTypeTests. Differential Revision: https://reviews.llvm.org/D64951 llvm-svn: 366502 --- llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp') diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 4c8f75b237a..23cb1c1d305 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -524,8 +524,8 @@ static const MCSymbolELF *getAssociatedSymbol(const GlobalObject *GO, if (!VM) report_fatal_error("MD_associated operand is not ValueAsMetadata"); - GlobalObject *OtherGO = dyn_cast(VM->getValue()); - return OtherGO ? dyn_cast(TM.getSymbol(OtherGO)) : nullptr; + auto *OtherGV = dyn_cast(VM->getValue()); + return OtherGV ? dyn_cast(TM.getSymbol(OtherGV)) : nullptr; } static unsigned getEntrySizeForKind(SectionKind Kind) { -- cgit v1.2.3