X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FMC%2FMCContext.h;h=111ad484ffb5cfbf20320fa536a0c7427fc41c7c;hb=f43e3fdb4ffddff6f71b5597c813c43e1e206564;hp=78870d9633e2660e2cff70beeb75105dfd6abe76;hpb=255f89faee13dc491cb64fbeae3c763e7e2ea4e6;p=oota-llvm.git diff --git a/include/llvm/MC/MCContext.h b/include/llvm/MC/MCContext.h index 78870d9633e..111ad484ffb 100644 --- a/include/llvm/MC/MCContext.h +++ b/include/llvm/MC/MCContext.h @@ -137,11 +137,16 @@ namespace llvm { void *MachOUniquingMap, *ELFUniquingMap, *COFFUniquingMap; + /// Do automatic initialization in constructor and finalization in + /// destructor + bool AutoInitializationFinalization; + MCSymbol *CreateSymbol(StringRef Name); public: explicit MCContext(const MCAsmInfo &MAI, const MCRegisterInfo &MRI, - const MCObjectFileInfo *MOFI, const SourceMgr *Mgr = 0); + const MCObjectFileInfo *MOFI, const SourceMgr *Mgr = 0, + bool AutoInitializationFinalization = true); ~MCContext(); const SourceMgr *getSourceManager() const { return SrcMgr; } @@ -154,6 +159,17 @@ namespace llvm { void setAllowTemporaryLabels(bool Value) { AllowTemporaryLabels = Value; } + /// @name Module Lifetime Management + /// @{ + + /// doInitialization - prepare to process a new module + void doInitialization(); + + /// doFinalization - clean up state from the current module + void doFinalization(); + + /// @} + /// @name Symbol Management /// @{