summaryrefslogtreecommitdiffstats
path: root/include/llvm/MC
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-06-24 01:03:06 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-06-24 01:03:06 +0000
commita11af531ec48ad84f790b9511f003ac5c934a999 (patch)
tree263ca3827523dda5ae497739709ca967f38c08ba /include/llvm/MC
parentfd6325cbb23935a9c05b96e9bbfa978565029f2a (diff)
downloadexternal_llvm-a11af531ec48ad84f790b9511f003ac5c934a999.zip
external_llvm-a11af531ec48ad84f790b9511f003ac5c934a999.tar.gz
external_llvm-a11af531ec48ad84f790b9511f003ac5c934a999.tar.bz2
Start MCAsmStreamer implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74044 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC')
-rw-r--r--include/llvm/MC/MCAtom.h2
-rw-r--r--include/llvm/MC/MCContext.h2
-rw-r--r--include/llvm/MC/MCSection.h2
-rw-r--r--include/llvm/MC/MCStreamer.h4
-rw-r--r--include/llvm/MC/MCSymbol.h4
5 files changed, 11 insertions, 3 deletions
diff --git a/include/llvm/MC/MCAtom.h b/include/llvm/MC/MCAtom.h
index b0c97ec..f91a96f 100644
--- a/include/llvm/MC/MCAtom.h
+++ b/include/llvm/MC/MCAtom.h
@@ -17,6 +17,8 @@ namespace llvm {
public:
MCAtom(MCSection *_Section) : Section(_Section) {}
+
+ MCSection *getSection() { return Section; }
};
} // end namespace llvm
diff --git a/include/llvm/MC/MCContext.h b/include/llvm/MC/MCContext.h
index 78943fc..3ccc4da 100644
--- a/include/llvm/MC/MCContext.h
+++ b/include/llvm/MC/MCContext.h
@@ -113,7 +113,7 @@ namespace llvm {
/// allocator supports it).
/// @return The allocated memory. Could be NULL.
inline void *operator new(size_t Bytes, llvm::MCContext &C,
- size_t Alignment) throw () {
+ size_t Alignment = 16) throw () {
return C.Allocate(Bytes, Alignment);
}
/// @brief Placement delete companion to the new above.
diff --git a/include/llvm/MC/MCSection.h b/include/llvm/MC/MCSection.h
index 236f068..341f7f0 100644
--- a/include/llvm/MC/MCSection.h
+++ b/include/llvm/MC/MCSection.h
@@ -19,6 +19,8 @@ namespace llvm {
public:
MCSection(const char *_Name) : Name(_Name) {}
+
+ const std::string &getName() const { return Name; }
};
} // end namespace llvm
diff --git a/include/llvm/MC/MCStreamer.h b/include/llvm/MC/MCStreamer.h
index f2b94b9..9374529 100644
--- a/include/llvm/MC/MCStreamer.h
+++ b/include/llvm/MC/MCStreamer.h
@@ -84,7 +84,7 @@ namespace llvm {
// the symbol and make the printer smart enough to add the right symbols?
// This should work as long as the order of attributes in the file doesn't
// matter.
- virtual void EmitSymbolAttribute(MCSymbol *Symbol,
+ virtual void EmitSymbolAttribute(MCSymbol *Symbol,
SymbolAttr Attribute) = 0;
/// EmitBytes - Emit @param Length bytes starting at @param Data into the
@@ -116,7 +116,7 @@ namespace llvm {
/// createAsmStreamer - Create a machine code streamer which will print out
/// assembly for the native target, suitable for compiling with a native
/// assembler.
- inline MCStreamer *createAsmStreamer(MCContext &Ctx, raw_ostream &OS) { return 0; }
+ MCStreamer *createAsmStreamer(MCContext &Ctx, raw_ostream &OS);
// FIXME: These two may end up getting rolled into a single
// createObjectStreamer interface, which implements the assembler backend, and
diff --git a/include/llvm/MC/MCSymbol.h b/include/llvm/MC/MCSymbol.h
index 66215b1..085f765 100644
--- a/include/llvm/MC/MCSymbol.h
+++ b/include/llvm/MC/MCSymbol.h
@@ -23,6 +23,10 @@ namespace llvm {
public:
MCSymbol(MCAtom *_Atom, const char *_Name, bool _IsTemporary)
: Atom(_Atom), Name(_Name), IsTemporary(_IsTemporary) {}
+
+ MCAtom *getAtom() { return Atom; }
+
+ const std::string &getName() { return Name; }
};
} // end namespace llvm