diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-26 22:13:22 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-26 22:13:22 +0000 |
commit | 959fd883346384e742fff049327a6815e36017e0 (patch) | |
tree | bc547f4126e123f1bc04ed9acf4ae8b095c9776b /include/llvm/MC | |
parent | c33e6964773de5ce4912cfba3c374247d6b804d0 (diff) | |
download | llvm-959fd883346384e742fff049327a6815e36017e0.tar.gz llvm-959fd883346384e742fff049327a6815e36017e0.tar.bz2 llvm-959fd883346384e742fff049327a6815e36017e0.tar.xz |
llvm-mc/Mach-O: Don't put assembler temporary labels in the symbol table.
- I moved section creation back into AsmParser. I think policy decisions like
this should be pushed higher, not lower, when possible (in addition the
assembler has flags which change this behavior, for example).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80162 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC')
-rw-r--r-- | include/llvm/MC/MCContext.h | 2 | ||||
-rw-r--r-- | include/llvm/MC/MCSymbol.h | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/MC/MCContext.h b/include/llvm/MC/MCContext.h index 28436f052d..9e0662071c 100644 --- a/include/llvm/MC/MCContext.h +++ b/include/llvm/MC/MCContext.h @@ -57,6 +57,8 @@ namespace llvm { /// reference and return it. /// /// @param Name - The symbol name, which must be unique across all symbols. + /// @param IsTemporary - Whether this symbol is an assembler temporary, + /// which should not survive into the symbol table for the translation unit. MCSymbol *GetOrCreateSymbol(const StringRef &Name); /// CreateTemporarySymbol - Create a new temporary symbol with the specified diff --git a/include/llvm/MC/MCSymbol.h b/include/llvm/MC/MCSymbol.h index 37a2755328..631fa12f3f 100644 --- a/include/llvm/MC/MCSymbol.h +++ b/include/llvm/MC/MCSymbol.h @@ -63,6 +63,11 @@ namespace llvm { /// @name Symbol Type /// @{ + /// isTemporary - Check if this is an assembler temporary symbol. + bool isTemporary() const { + return IsTemporary; + } + /// isDefined - Check if this symbol is defined (i.e., it has an address). /// /// Defined symbols are either absolute or in some section. |