diff options
| author | 2017-01-24 08:32:59 +0000 | |
|---|---|---|
| committer | 2017-01-24 08:32:59 +0000 | |
| commit | 53d771aafdbe5b919f264f53cba3788e2c4cffd2 (patch) | |
| tree | 7eca39498be0ff1e3a6daf583cd9ca5886bb2636 /gnu/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp | |
| parent | In preparation of compiling our kernels with -ffreestanding, explicitly map (diff) | |
| download | wireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.tar.xz wireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.zip | |
Import LLVM 4.0.0 rc1 including clang and lld to help the current
development effort on OpenBSD/arm64.
Diffstat (limited to 'gnu/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp')
| -rw-r--r-- | gnu/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/gnu/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp b/gnu/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp index abe1deddc56..ad8693fd325 100644 --- a/gnu/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp +++ b/gnu/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp @@ -95,11 +95,9 @@ static unsigned getXCoreSectionFlags(SectionKind K, bool IsCPRel) { return Flags; } -MCSection * -XCoreTargetObjectFile::getExplicitSectionGlobal(const GlobalValue *GV, - SectionKind Kind, Mangler &Mang, - const TargetMachine &TM) const { - StringRef SectionName = GV->getSection(); +MCSection *XCoreTargetObjectFile::getExplicitSectionGlobal( + const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { + StringRef SectionName = GO->getSection(); // Infer section flags from the section name if we can. bool IsCPRel = SectionName.startswith(".cp."); if (IsCPRel && !Kind.isReadOnly()) @@ -108,12 +106,10 @@ XCoreTargetObjectFile::getExplicitSectionGlobal(const GlobalValue *GV, getXCoreSectionFlags(Kind, IsCPRel)); } -MCSection * -XCoreTargetObjectFile::SelectSectionForGlobal(const GlobalValue *GV, - SectionKind Kind, Mangler &Mang, - const TargetMachine &TM) const { +MCSection *XCoreTargetObjectFile::SelectSectionForGlobal( + const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { - bool UseCPRel = GV->isLocalLinkage(GV->getLinkage()); + bool UseCPRel = GO->hasLocalLinkage(); if (Kind.isText()) return TextSection; if (UseCPRel) { @@ -122,8 +118,8 @@ XCoreTargetObjectFile::SelectSectionForGlobal(const GlobalValue *GV, if (Kind.isMergeableConst8()) return MergeableConst8Section; if (Kind.isMergeableConst16()) return MergeableConst16Section; } - Type *ObjType = GV->getValueType(); - auto &DL = GV->getParent()->getDataLayout(); + Type *ObjType = GO->getValueType(); + auto &DL = GO->getParent()->getDataLayout(); if (TM.getCodeModel() == CodeModel::Small || !ObjType->isSized() || DL.getTypeAllocSize(ObjType) < CodeModelLargeSize) { if (Kind.isReadOnly()) return UseCPRel? ReadOnlySection |
