projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reduce clutter in asm output. Do not emit source location as comment for each instruc...
[oota-llvm.git]
/
include
/
llvm
/
MC
/
MCContext.h
diff --git
a/include/llvm/MC/MCContext.h
b/include/llvm/MC/MCContext.h
index e7c3967d2d31adfe31c5c05d7af4effa81b333a6..070089e2c938bf0777331e146ead196b5b1454b8 100644
(file)
--- a/
include/llvm/MC/MCContext.h
+++ b/
include/llvm/MC/MCContext.h
@@
-29,6
+29,7
@@
namespace llvm {
class MCLineSection;
class StringRef;
class Twine;
class MCLineSection;
class StringRef;
class Twine;
+ class TargetAsmInfo;
class MCSectionMachO;
class MCSectionELF;
class MCSectionMachO;
class MCSectionELF;
@@
-42,8
+43,20
@@
namespace llvm {
/// The MCAsmInfo for this target.
const MCAsmInfo &MAI;
/// The MCAsmInfo for this target.
const MCAsmInfo &MAI;
+ const TargetAsmInfo *TAI;
+
+ /// Allocator - Allocator object used for creating machine code objects.
+ ///
+ /// We use a bump pointer allocator to avoid the need to track all allocated
+ /// objects.
+ BumpPtrAllocator Allocator;
+
/// Symbols - Bindings of names to symbols.
/// Symbols - Bindings of names to symbols.
- StringMap<MCSymbol*> Symbols;
+ StringMap<MCSymbol*, BumpPtrAllocator&> Symbols;
+
+ /// UsedNames - Keeps tracks of names that were used both for used declared
+ /// and artificial symbols.
+ StringMap<bool, BumpPtrAllocator&> UsedNames;
/// NextUniqueID - The next ID to dole out to an unnamed assembler temporary
/// symbol.
/// NextUniqueID - The next ID to dole out to an unnamed assembler temporary
/// symbol.
@@
-77,6
+90,11
@@
namespace llvm {
MCDwarfLoc CurrentDwarfLoc;
bool DwarfLocSeen;
MCDwarfLoc CurrentDwarfLoc;
bool DwarfLocSeen;
+ /// Honor temporary labels, this is useful for debugging semantic
+ /// differences between temporary and non-temporary labels (primarily on
+ /// Darwin).
+ bool AllowTemporaryLabels;
+
/// The dwarf line information from the .loc directives for the sections
/// with assembled machine instructions have after seeing .loc directives.
DenseMap<const MCSection *, MCLineSection *> MCLineSections;
/// The dwarf line information from the .loc directives for the sections
/// with assembled machine instructions have after seeing .loc directives.
DenseMap<const MCSection *, MCLineSection *> MCLineSections;
@@
-84,19
+102,20
@@
namespace llvm {
/// the elements were added.
std::vector<const MCSection *> MCLineSectionOrder;
/// the elements were added.
std::vector<const MCSection *> MCLineSectionOrder;
- /// Allocator - Allocator object used for creating machine code objects.
- ///
- /// We use a bump pointer allocator to avoid the need to track all allocated
- /// objects.
- BumpPtrAllocator Allocator;
-
void *MachOUniquingMap, *ELFUniquingMap, *COFFUniquingMap;
void *MachOUniquingMap, *ELFUniquingMap, *COFFUniquingMap;
+
+ MCSymbol *CreateSymbol(StringRef Name);
+
public:
public:
- explicit MCContext(const MCAsmInfo &MAI);
+ explicit MCContext(const MCAsmInfo &MAI
, const TargetAsmInfo *TAI
);
~MCContext();
const MCAsmInfo &getAsmInfo() const { return MAI; }
~MCContext();
const MCAsmInfo &getAsmInfo() const { return MAI; }
+ const TargetAsmInfo &getTargetAsmInfo() const { return *TAI; }
+
+ void setAllowTemporaryLabels(bool Value) { AllowTemporaryLabels = Value; }
+
/// @name Symbol Management
/// @{
/// @name Symbol Management
/// @{
@@
-170,8
+189,8
@@
namespace llvm {
bool isValidDwarfFileNumber(unsigned FileNumber);
bool isValidDwarfFileNumber(unsigned FileNumber);
- bool hasDwarfFiles(
void)
{
- return
MCDwarfFiles.size() != 0
;
+ bool hasDwarfFiles(
) const
{
+ return
!MCDwarfFiles.empty()
;
}
const std::vector<MCDwarfFile *> &getMCDwarfFiles() {
}
const std::vector<MCDwarfFile *> &getMCDwarfFiles() {