diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2010-02-15 22:38:10 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2010-02-15 22:38:10 +0000 |
commit | 46885ded4e4c620efd59f8d18e1657135ea39d00 (patch) | |
tree | be04ab7e96135860a1942eee9fd15a7636509f8a | |
parent | 362dd0bef5437f85586c046bc53287b6fbe9c099 (diff) | |
download | external_llvm-46885ded4e4c620efd59f8d18e1657135ea39d00.zip external_llvm-46885ded4e4c620efd59f8d18e1657135ea39d00.tar.gz external_llvm-46885ded4e4c620efd59f8d18e1657135ea39d00.tar.bz2 |
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
-rw-r--r-- | lib/Target/X86/X86TargetObjectFile.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/Target/X86/X86TargetObjectFile.cpp b/lib/Target/X86/X86TargetObjectFile.cpp index be01b5f..d1ee3fc 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:: |