Fix a silly darwin-only typo introduced during merge.
authorAnton Korobeynikov <asl@math.spbu.ru>
Mon, 15 Feb 2010 22:38:10 +0000 (22:38 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Mon, 15 Feb 2010 22:38:10 +0000 (22:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96289 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86TargetObjectFile.cpp

index be01b5f401aa861e6fcbfd6cbc5c59d00786e67a..d1ee3fcbdae7c042d8f93e5545681673b5a30f09 100644 (file)
@@ -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::