From 46885ded4e4c620efd59f8d18e1657135ea39d00 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Mon, 15 Feb 2010 22:38:10 +0000 Subject: Fix a silly darwin-only typo introduced during merge. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96289 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86TargetObjectFile.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'lib/Target/X86/X86TargetObjectFile.cpp') diff --git a/lib/Target/X86/X86TargetObjectFile.cpp b/lib/Target/X86/X86TargetObjectFile.cpp index be01b5f401..d1ee3fcbda 100644 --- a/lib/Target/X86/X86TargetObjectFile.cpp +++ b/lib/Target/X86/X86TargetObjectFile.cpp @@ -56,15 +56,14 @@ getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang, // On Darwin/X86-64, we can reference dwarf symbols with foo@GOTPCREL+4, which // is an indirect pc-relative reference. - if ((Encoding & DW_EH_PE_indirect) && - (Encoding & DW_EH_PE_pcrel)) { + if (Encoding & (DW_EH_PE_indirect | DW_EH_PE_pcrel)) { SmallString<128> Name; Mang->getNameWithPrefix(Name, GV, false); - const MCSymbol *Sym = getContext().CreateSymbol(Name); - const MCExpr *Res = - X86MCTargetExpr::Create(Sym, X86MCTargetExpr::GOTPCREL, getContext()); - const MCExpr *Four = MCConstantExpr::Create(4, getContext()); - return MCBinaryExpr::CreateAdd(Res, Four, getContext()); + const MCSymbol *Sym = getContext().GetOrCreateSymbol(Name); + const MCExpr *Res = + X86MCTargetExpr::Create(Sym, X86MCTargetExpr::GOTPCREL, getContext()); + const MCExpr *Four = MCConstantExpr::Create(4, getContext()); + return MCBinaryExpr::CreateAdd(Res, Four, getContext()); } return TargetLoweringObjectFileMachO:: -- cgit v1.2.3