1 //===- MC/MCAsmInfoXCOFF.cpp - XCOFF asm properties ------------ *- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #include "llvm/MC/MCAsmInfoXCOFF.h"
10 #include "llvm/ADT/StringExtras.h"
14 void MCAsmInfoXCOFF::anchor() {}
16 MCAsmInfoXCOFF::MCAsmInfoXCOFF() {
17 IsLittleEndian = false;
18 HasVisibilityOnlyWithLinkage = true;
19 PrivateGlobalPrefix = "L..";
20 PrivateLabelPrefix = "L..";
21 SupportsQuotedNames = false;
22 UseDotAlignForAlignment = true;
23 ZeroDirective = "\t.space\t";
24 ZeroDirectiveSupportsNonZeroValue = false;
25 AsciiDirective = nullptr; // not supported
26 AscizDirective = nullptr; // not supported
28 // Use .vbyte for data definition to avoid directives that apply an implicit
30 Data16bitsDirective = "\t.vbyte\t2, ";
31 Data32bitsDirective = "\t.vbyte\t4, ";
33 COMMDirectiveAlignmentIsInBytes = false;
34 LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;
35 HasDotTypeDotSizeDirective = false;
36 UseIntegratedAssembler = false;
37 NeedsFunctionDescriptors = true;
40 bool MCAsmInfoXCOFF::isAcceptableChar(char C) const {
41 // QualName is allowed for a MCSymbolXCOFF, and
42 // QualName contains '[' and ']'.
43 if (C == '[' || C == ']')
46 // For AIX assembler, symbols may consist of numeric digits,
47 // underscores, periods, uppercase or lowercase letters, or
48 // any combination of these.
49 return isAlnum(C) || C == '_' || C == '.';