aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/MCAsmInfo.h5
-rw-r--r--include/llvm/MC/MCELFStreamer.h11
-rw-r--r--include/llvm/MC/MCStreamer.h4
3 files changed, 17 insertions, 3 deletions
diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h
index 3734d7e..c9cecc1 100644
--- a/include/llvm/MC/MCAsmInfo.h
+++ b/include/llvm/MC/MCAsmInfo.h
@@ -271,6 +271,10 @@ namespace llvm {
/// .file directive, this is true for ELF targets.
bool HasSingleParameterDotFile; // Defaults to true.
+ /// hasIdentDirective - True if the target has a .ident directive, this is
+ /// true for ELF targets.
+ bool HasIdentDirective; // Defaults to false.
+
/// HasNoDeadStrip - True if this target supports the MachO .no_dead_strip
/// directive.
bool HasNoDeadStrip; // Defaults to false.
@@ -523,6 +527,7 @@ namespace llvm {
}
bool hasDotTypeDotSizeDirective() const {return HasDotTypeDotSizeDirective;}
bool hasSingleParameterDotFile() const { return HasSingleParameterDotFile; }
+ bool hasIdentDirective() const { return HasIdentDirective; }
bool hasNoDeadStrip() const { return HasNoDeadStrip; }
bool hasSymbolResolver() const { return HasSymbolResolver; }
const char *getWeakRefDirective() const { return WeakRefDirective; }
diff --git a/include/llvm/MC/MCELFStreamer.h b/include/llvm/MC/MCELFStreamer.h
index 8dbe337..4e24dcf 100644
--- a/include/llvm/MC/MCELFStreamer.h
+++ b/include/llvm/MC/MCELFStreamer.h
@@ -31,13 +31,14 @@ class MCELFStreamer : public MCObjectStreamer {
public:
MCELFStreamer(MCContext &Context, MCTargetStreamer *TargetStreamer,
MCAsmBackend &TAB, raw_ostream &OS, MCCodeEmitter *Emitter)
- : MCObjectStreamer(Context, TargetStreamer, TAB, OS, Emitter) {}
+ : MCObjectStreamer(Context, TargetStreamer, TAB, OS, Emitter),
+ SeenIdent(false) {}
MCELFStreamer(MCContext &Context, MCTargetStreamer *TargetStreamer,
MCAsmBackend &TAB, raw_ostream &OS, MCCodeEmitter *Emitter,
MCAssembler *Assembler)
- : MCObjectStreamer(Context, TargetStreamer, TAB, OS, Emitter, Assembler) {
- }
+ : MCObjectStreamer(Context, TargetStreamer, TAB, OS, Emitter, Assembler),
+ SeenIdent(false) {}
virtual ~MCELFStreamer();
@@ -77,6 +78,8 @@ public:
virtual void EmitFileDirective(StringRef Filename);
+ virtual void EmitIdent(StringRef IdentString);
+
virtual void EmitValueToAlignment(unsigned, int64_t, unsigned, unsigned);
virtual void Flush();
@@ -93,6 +96,8 @@ private:
void fixSymbolsInTLSFixups(const MCExpr *expr);
+ bool SeenIdent;
+
struct LocalCommon {
MCSymbolData *SD;
uint64_t Size;
diff --git a/include/llvm/MC/MCStreamer.h b/include/llvm/MC/MCStreamer.h
index d24f3fd..974feea 100644
--- a/include/llvm/MC/MCStreamer.h
+++ b/include/llvm/MC/MCStreamer.h
@@ -571,6 +571,10 @@ public:
/// implement the '.file "foo.c"' assembler directive.
virtual void EmitFileDirective(StringRef Filename) = 0;
+ /// Emit the "identifiers" directive. This implements the
+ /// '.ident "version foo"' assembler directive.
+ virtual void EmitIdent(StringRef IdentString) {}
+
/// EmitDwarfFileDirective - Associate a filename with a specified logical
/// file number. This implements the DWARF2 '.file 4 "foo.c"' assembler
/// directive.