[llvm] 2cbb965 - X86Operand::print - fix SymName shadow variable warning. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 2 11:48:27 PDT 2019
Author: Simon Pilgrim
Date: 2019-11-02T18:46:53Z
New Revision: 2cbb9653d876568fae91f32ae8e19ec4a7e7f274
URL: https://github.com/llvm/llvm-project/commit/2cbb9653d876568fae91f32ae8e19ec4a7e7f274
DIFF: https://github.com/llvm/llvm-project/commit/2cbb9653d876568fae91f32ae8e19ec4a7e7f274.diff
LOG: X86Operand::print - fix SymName shadow variable warning. NFCI.
Added:
Modified:
llvm/lib/Target/X86/AsmParser/X86Operand.h
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/AsmParser/X86Operand.h b/llvm/lib/Target/X86/AsmParser/X86Operand.h
index 3a76d023e640..593932e6aea3 100644
--- a/llvm/lib/Target/X86/AsmParser/X86Operand.h
+++ b/llvm/lib/Target/X86/AsmParser/X86Operand.h
@@ -104,8 +104,8 @@ struct X86Operand final : public MCParsedAsmOperand {
} else if (Val->getKind() == MCExpr::SymbolRef) {
if (auto *SRE = dyn_cast<MCSymbolRefExpr>(Val)) {
const MCSymbol &Sym = SRE->getSymbol();
- if (auto SymName = Sym.getName().data())
- OS << VName << SymName;
+ if (const char *SymNameStr = Sym.getName().data())
+ OS << VName << SymNameStr;
}
}
};
More information about the llvm-commits
mailing list