#include "llvm/MC/SectionKind.h"
namespace llvm {
+ class MachineModuleInfo;
class Mangler;
+ class MCAsmInfo;
+ class MCExpr;
class MCSection;
class MCSectionMachO;
class MCContext;
class GlobalValue;
class StringRef;
class TargetMachine;
- class MCAsmInfo;
- class MCExpr;
class TargetLoweringObjectFile {
MCContext *Ctx;
///
virtual const MCExpr *
getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
+ MachineModuleInfo *MMI,
bool &IsIndirect, bool &IsPCRel) const;
protected:
/// defaults to returning a stub reference.
virtual const MCExpr *
getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
+ MachineModuleInfo *MMI,
bool &IsIndirect, bool &IsPCRel) const;
};
// In non-static mode, ask the object file how to represent this reference.
PersonalityRef =
TLOF.getSymbolForDwarfGlobalReference(PersonalityFn, Asm->Mang,
+ Asm->MMI,
IsPersonalityIndirect,
IsPersonalityPCRel);
}
///
const MCExpr *TargetLoweringObjectFile::
getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
+ MachineModuleInfo *MMI,
bool &IsIndirect, bool &IsPCRel) const {
// The generic implementation of this just returns a direct reference to the
// symbol.
const MCExpr *TargetLoweringObjectFileMachO::
getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
+ MachineModuleInfo *MMI,
bool &IsIndirect, bool &IsPCRel) const {
// The mach-o version of this method defaults to returning a stub reference.
IsIndirect = true;
const MCExpr *X8664_MachoTargetObjectFile::
getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
+ MachineModuleInfo *MMI,
bool &IsIndirect, bool &IsPCRel) const {
// On Darwin/X86-64, we can reference dwarf symbols with foo@GOTPCREL+4, which
virtual const MCExpr *
getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
+ MachineModuleInfo *MMI,
bool &IsIndirect, bool &IsPCRel) const;
};
} // end namespace llvm