Path: blob/main/contrib/llvm-project/llvm/lib/MC/MCAsmInfoXCOFF.cpp
35233 views
//===- MC/MCAsmInfoXCOFF.cpp - XCOFF asm properties ------------ *- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "llvm/MC/MCAsmInfoXCOFF.h"9#include "llvm/ADT/StringExtras.h"10#include "llvm/Support/CommandLine.h"1112using namespace llvm;1314namespace llvm {15extern cl::opt<cl::boolOrDefault> UseLEB128Directives;16}1718void MCAsmInfoXCOFF::anchor() {}1920MCAsmInfoXCOFF::MCAsmInfoXCOFF() {21IsLittleEndian = false;22HasVisibilityOnlyWithLinkage = true;23HasBasenameOnlyForFileDirective = false;24HasFourStringsDotFile = true;2526// For XCOFF, string constant consists of any number of characters enclosed in27// "" (double quotation marks).28HasPairedDoubleQuoteStringConstants = true;2930PrivateGlobalPrefix = "L..";31PrivateLabelPrefix = "L..";32SupportsQuotedNames = false;33UseDotAlignForAlignment = true;34UsesDwarfFileAndLocDirectives = false;35DwarfSectionSizeRequired = false;36if (UseLEB128Directives == cl::BOU_UNSET)37HasLEB128Directives = false;38ZeroDirective = "\t.space\t";39ZeroDirectiveSupportsNonZeroValue = false;40AsciiDirective = nullptr; // not supported41AscizDirective = nullptr; // not supported42ByteListDirective = "\t.byte\t";43PlainStringDirective = "\t.string\t";44CharacterLiteralSyntax = ACLS_SingleQuotePrefix;4546// Use .vbyte for data definition to avoid directives that apply an implicit47// alignment.48Data16bitsDirective = "\t.vbyte\t2, ";49Data32bitsDirective = "\t.vbyte\t4, ";5051COMMDirectiveAlignmentIsInBytes = false;52LCOMMDirectiveAlignmentType = LCOMM::Log2Alignment;53HasDotTypeDotSizeDirective = false;54ParseInlineAsmUsingAsmParser = true;55NeedsFunctionDescriptors = true;5657ExceptionsType = ExceptionHandling::AIX;58}5960bool MCAsmInfoXCOFF::isAcceptableChar(char C) const {61// QualName is allowed for a MCSymbolXCOFF, and62// QualName contains '[' and ']'.63if (C == '[' || C == ']')64return true;6566// For AIX assembler, symbols may consist of numeric digits,67// underscores, periods, uppercase or lowercase letters, or68// any combination of these.69return isAlnum(C) || C == '_' || C == '.';70}717273