aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/include/llvm/MC/MCAsmInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/include/llvm/MC/MCAsmInfo.h')
-rw-r--r--contrib/llvm/include/llvm/MC/MCAsmInfo.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/contrib/llvm/include/llvm/MC/MCAsmInfo.h b/contrib/llvm/include/llvm/MC/MCAsmInfo.h
index 120fb8fa7492..971e9354da8c 100644
--- a/contrib/llvm/include/llvm/MC/MCAsmInfo.h
+++ b/contrib/llvm/include/llvm/MC/MCAsmInfo.h
@@ -1,9 +1,8 @@
//===-- llvm/MC/MCAsmInfo.h - Asm info --------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
@@ -18,16 +17,17 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/MC/MCDirectives.h"
-#include "llvm/MC/MCDwarf.h"
#include "llvm/MC/MCTargetOptions.h"
#include <vector>
namespace llvm {
class MCContext;
+class MCCFIInstruction;
class MCExpr;
class MCSection;
class MCStreamer;
+class MCSubtargetInfo;
class MCSymbol;
namespace WinEH {
@@ -474,7 +474,13 @@ public:
bool hasMachoTBSSDirective() const { return HasMachoTBSSDirective; }
bool hasCOFFAssociativeComdats() const { return HasCOFFAssociativeComdats; }
bool hasCOFFComdatConstants() const { return HasCOFFComdatConstants; }
- unsigned getMaxInstLength() const { return MaxInstLength; }
+
+ /// Returns the maximum possible encoded instruction size in bytes. If \p STI
+ /// is null, this should be the maximum size for any subtarget.
+ virtual unsigned getMaxInstLength(const MCSubtargetInfo *STI = nullptr) const {
+ return MaxInstLength;
+ }
+
unsigned getMinInstAlignment() const { return MinInstAlignment; }
bool getDollarIsPC() const { return DollarIsPC; }
const char *getSeparatorString() const { return SeparatorString; }
@@ -492,7 +498,7 @@ public:
StringRef getPrivateLabelPrefix() const { return PrivateLabelPrefix; }
bool hasLinkerPrivateGlobalPrefix() const {
- return LinkerPrivateGlobalPrefix[0] != '\0';
+ return !LinkerPrivateGlobalPrefix.empty();
}
StringRef getLinkerPrivateGlobalPrefix() const {
@@ -598,9 +604,7 @@ public:
return SupportsExtendedDwarfLocDirective;
}
- void addInitialFrameState(const MCCFIInstruction &Inst) {
- InitialFrameState.push_back(Inst);
- }
+ void addInitialFrameState(const MCCFIInstruction &Inst);
const std::vector<MCCFIInstruction> &getInitialFrameState() const {
return InitialFrameState;