summaryrefslogtreecommitdiffstats
path: root/include/llvm/MC/MCContext.h
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-05-04 16:11:02 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-05-04 16:11:02 +0000
commit750ce4d809c7e2a298a389a512a17652ff5be3f2 (patch)
tree70fbd90da02177c8e6ef82adba9fa8ace285a5e3 /include/llvm/MC/MCContext.h
parent5f970ec96e421f64db6b1c6509a902ea73d98cc7 (diff)
downloadFreeBSD-src-750ce4d809c7e2a298a389a512a17652ff5be3f2.zip
FreeBSD-src-750ce4d809c7e2a298a389a512a17652ff5be3f2.tar.gz
Update LLVM to r103004.
Diffstat (limited to 'include/llvm/MC/MCContext.h')
-rw-r--r--include/llvm/MC/MCContext.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/llvm/MC/MCContext.h b/include/llvm/MC/MCContext.h
index 968d55f..4434341 100644
--- a/include/llvm/MC/MCContext.h
+++ b/include/llvm/MC/MCContext.h
@@ -10,6 +10,7 @@
#ifndef LLVM_MC_MCCONTEXT_H
#define LLVM_MC_MCCONTEXT_H
+#include "llvm/MC/SectionKind.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/Allocator.h"
@@ -21,6 +22,7 @@ namespace llvm {
class MCSymbol;
class StringRef;
class Twine;
+ class MCSectionMachO;
/// MCContext - Context object for machine code objects. This class owns all
/// of the sections that it creates.
@@ -47,6 +49,8 @@ namespace llvm {
/// We use a bump pointer allocator to avoid the need to track all allocated
/// objects.
BumpPtrAllocator Allocator;
+
+ void *MachOUniquingMap, *ELFUniquingMap;
public:
explicit MCContext(const MCAsmInfo &MAI);
~MCContext();
@@ -72,6 +76,29 @@ namespace llvm {
MCSymbol *LookupSymbol(StringRef Name) const;
/// @}
+
+ /// @name Section Managment
+ /// @{
+
+ /// getMachOSection - Return the MCSection for the specified mach-o section.
+ /// This requires the operands to be valid.
+ const MCSectionMachO *getMachOSection(StringRef Segment,
+ StringRef Section,
+ unsigned TypeAndAttributes,
+ unsigned Reserved2,
+ SectionKind K);
+ const MCSectionMachO *getMachOSection(StringRef Segment,
+ StringRef Section,
+ unsigned TypeAndAttributes,
+ SectionKind K) {
+ return getMachOSection(Segment, Section, TypeAndAttributes, 0, K);
+ }
+
+ const MCSection *getELFSection(StringRef Section, unsigned Type,
+ unsigned Flags, SectionKind Kind,
+ bool IsExplicit = false);
+
+ /// @}
void *Allocate(unsigned Size, unsigned Align = 8) {
return Allocator.Allocate(Size, Align);
OpenPOWER on IntegriCloud