class MCLineSection;
class StringRef;
class Twine;
+ class TargetAsmInfo;
class MCSectionMachO;
class MCSectionELF;
/// The MCAsmInfo for this target.
const MCAsmInfo &MAI;
+ const TargetAsmInfo *TAI;
+
/// Symbols - Bindings of names to symbols.
StringMap<MCSymbol*> Symbols;
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;
MCSymbol *CreateSymbol(StringRef Name);
public:
- explicit MCContext(const MCAsmInfo &MAI);
+ explicit MCContext(const MCAsmInfo &MAI, const TargetAsmInfo *TAI);
~MCContext();
const MCAsmInfo &getAsmInfo() const { return MAI; }
+ const TargetAsmInfo &getTargetAsmInfo() const { return *TAI; }
+
+ void setAllowTemporaryLabels(bool Value) { AllowTemporaryLabels = Value; }
+
/// @name Symbol Management
/// @{
bool isValidDwarfFileNumber(unsigned FileNumber);
- bool hasDwarfFiles(void) {
- return MCDwarfFiles.size() != 0;
- }
- bool hasDwarfLines(void) {
- return MCLineSectionOrder.size() != 0;
+ bool hasDwarfFiles() const {
+ return !MCDwarfFiles.empty();
}
const std::vector<MCDwarfFile *> &getMCDwarfFiles() {