xref: /freebsd-src/contrib/llvm-project/llvm/lib/MC/MCAsmInfoXCOFF.cpp (revision a7dea1671b87c07d2d266f836bfa8b58efc7c134)
1 //===- MC/MCAsmInfoXCOFF.cpp - XCOFF asm properties ------------ *- C++ -*-===//
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 "llvm/MC/MCAsmInfoXCOFF.h"
10 
11 using namespace llvm;
12 
13 void MCAsmInfoXCOFF::anchor() {}
14 
15 MCAsmInfoXCOFF::MCAsmInfoXCOFF() {
16   IsLittleEndian = false;
17   HasDotTypeDotSizeDirective = false;
18   COMMDirectiveAlignmentIsInBytes = false;
19   LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
20   UseDotAlignForAlignment = true;
21   AsciiDirective = nullptr; // not supported
22   AscizDirective = nullptr; // not supported
23   NeedsFunctionDescriptors = true;
24   HasDotLGloblDirective = true;
25   Data64bitsDirective = "\t.llong\t";
26   SupportsQuotedNames = false;
27 }
28 
29 bool MCAsmInfoXCOFF::isValidUnquotedName(StringRef Name) const {
30   // FIXME: Remove this function when we stop using "TOC[TC0]" as a symbol name.
31   if (Name.equals("TOC[TC0]"))
32     return true;
33 
34   return MCAsmInfo::isValidUnquotedName(Name);
35 }
36