aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCContext.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 21:35:15 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 21:35:15 +0000
commit464f838b7b7a19b95ae4b33010858de341c620a5 (patch)
treef662da7fb9ec842d5689f6a8611d098b3c4fd75a /include/llvm/MC/MCContext.h
parente6d1592492a3a379186bfb02bd0f4eda0669c0d5 (diff)
Diffstat (limited to 'include/llvm/MC/MCContext.h')
-rw-r--r--include/llvm/MC/MCContext.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/llvm/MC/MCContext.h b/include/llvm/MC/MCContext.h
index 5c2124cc0d15..c40cd7c2c257 100644
--- a/include/llvm/MC/MCContext.h
+++ b/include/llvm/MC/MCContext.h
@@ -112,6 +112,9 @@ namespace llvm {
/// number of section symbols with the same name).
StringMap<bool, BumpPtrAllocator &> UsedNames;
+ /// Keeps track of labels that are used in inline assembly.
+ SymbolTable InlineAsmUsedLabelNames;
+
/// The next ID to dole out to an unnamed assembler temporary symbol with
/// a given prefix.
StringMap<unsigned> NextID;
@@ -377,6 +380,16 @@ namespace llvm {
/// APIs.
const SymbolTable &getSymbols() const { return Symbols; }
+ /// isInlineAsmLabel - Return true if the name is a label referenced in
+ /// inline assembly.
+ MCSymbol *getInlineAsmLabel(StringRef Name) const {
+ return InlineAsmUsedLabelNames.lookup(Name);
+ }
+
+ /// registerInlineAsmLabel - Records that the name is a label referenced in
+ /// inline assembly.
+ void registerInlineAsmLabel(MCSymbol *Sym);
+
/// @}
/// \name Section Management