[llvm-commits] [llvm] r96289 - /llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp
Anton Korobeynikov
asl at math.spbu.ru
Mon Feb 15 14:38:10 PST 2010
Author: asl
Date: Mon Feb 15 16:38:10 2010
New Revision: 96289
URL: http://llvm.org/viewvc/llvm-project?rev=96289&view=rev
Log:
Fix a silly darwin-only typo introduced during merge.
Modified:
llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp
Modified: llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp?rev=96289&r1=96288&r2=96289&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp Mon Feb 15 16:38:10 2010
@@ -56,15 +56,14 @@
// On Darwin/X86-64, we can reference dwarf symbols with foo at 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::
More information about the llvm-commits
mailing list