Revert " [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432)"
[llvm-project.git] / llvm / lib / MC / MCSymbolXCOFF.cpp
blob599a3946a1ed7a18be9d5e6ab557290ccd98bddc
1 //===- lib/MC/MCSymbolXCOFF.cpp - XCOFF Code Symbol Representation --------===//
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 //===----------------------------------------------------------------------===//
9 #include "llvm/MC/MCSectionXCOFF.h"
11 using namespace llvm;
13 MCSectionXCOFF *MCSymbolXCOFF::getRepresentedCsect() const {
14 assert(RepresentedCsect &&
15 "Trying to get csect representation of this symbol but none was set.");
16 assert(getSymbolTableName() == RepresentedCsect->getSymbolTableName() &&
17 "SymbolTableNames need to be the same for this symbol and its csect "
18 "representation.");
19 return RepresentedCsect;
22 void MCSymbolXCOFF::setRepresentedCsect(MCSectionXCOFF *C) {
23 assert(C && "Assigned csect should not be null.");
24 assert((!RepresentedCsect || RepresentedCsect == C) &&
25 "Trying to set a csect that doesn't match the one that this symbol is "
26 "already mapped to.");
27 assert(getSymbolTableName() == C->getSymbolTableName() &&
28 "SymbolTableNames need to be the same for this symbol and its csect "
29 "representation.");
30 RepresentedCsect = C;