summaryrefslogtreecommitdiff
path: root/lib/Target/CBackend
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-07-20 05:58:47 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-07-20 05:58:47 +0000
commite76a33b9567d78a5744dc52fcec3a6056d6fb576 (patch)
treed596c974752c25f568db0e97529712c1f00dde1a /lib/Target/CBackend
parent86c98145b268a0d10e062792f98bc8eea6b639b4 (diff)
downloadllvm-e76a33b9567d78a5744dc52fcec3a6056d6fb576.tar.gz
llvm-e76a33b9567d78a5744dc52fcec3a6056d6fb576.tar.bz2
llvm-e76a33b9567d78a5744dc52fcec3a6056d6fb576.tar.xz
Add MCObjectFileInfo and sink the MCSections initialization code from
TargetLoweringObjectFileImpl down to MCObjectFileInfo. TargetAsmInfo is done to one last method. It's *almost* gone! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135569 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CBackend')
-rw-r--r--lib/Target/CBackend/CBackend.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index 4ff8f84891..b772947ef4 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -37,6 +37,7 @@
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCInstrInfo.h"
+#include "llvm/MC/MCObjectFileInfo.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCSymbol.h"
@@ -92,6 +93,7 @@ namespace {
const Module *TheModule;
const MCAsmInfo* TAsm;
const MCRegisterInfo *MRI;
+ const MCObjectFileInfo *MOFI;
MCContext *TCtx;
const TargetData* TD;
@@ -111,8 +113,8 @@ namespace {
static char ID;
explicit CWriter(formatted_raw_ostream &o)
: FunctionPass(ID), Out(o), IL(0), Mang(0), LI(0),
- TheModule(0), TAsm(0), MRI(0), TCtx(0), TD(0), OpaqueCounter(0),
- NextAnonValueNumber(0) {
+ TheModule(0), TAsm(0), MRI(0), MOFI(0), TCtx(0), TD(0),
+ OpaqueCounter(0), NextAnonValueNumber(0) {
initializeLoopInfoPass(*PassRegistry::getPassRegistry());
FPCounter = 0;
}
@@ -152,6 +154,7 @@ namespace {
delete TCtx;
delete TAsm;
delete MRI;
+ delete MOFI;
FPConstantMap.clear();
ByValParams.clear();
intrinsicPrototypesAlreadyGenerated.clear();
@@ -1673,7 +1676,7 @@ bool CWriter::doInitialization(Module &M) {
#endif
TAsm = new CBEMCAsmInfo();
MRI = new MCRegisterInfo();
- TCtx = new MCContext(*TAsm, *MRI, NULL);
+ TCtx = new MCContext(*TAsm, *MRI, NULL, NULL);
Mang = new Mangler(*TCtx, *TD);
// Keep track of which functions are static ctors/dtors so they can have