1 //===- OutputSection.cpp --------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "OutputSection.h"
10 #include "OutputSegment.h"
11 #include "lld/Common/ErrorHandler.h"
12 
13 using namespace llvm;
14 using namespace lld;
15 using namespace lld::macho;
16 
17 uint64_t OutputSection::getSegmentOffset() const {
18   return addr - parent->firstSection()->addr;
19 }
20 
21 void OutputSection::mergeInput(InputSection *input) {
22   llvm_unreachable("Cannot merge input section into unmergable output section");
23 }
24