mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Initialize object file info before output streamer
r179494 switched to using the object file info to retrieve the default text section for some MC streamers. It is possible that initializing an MC streamer can request sections before the object file info is initialized when the AutoInitSections flag is set on the streamer. llvm-svn: 185670
This commit is contained in:
parent
f688394960
commit
164ef19c0e
@ -155,8 +155,6 @@ void AsmPrinter::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
}
|
||||
|
||||
bool AsmPrinter::doInitialization(Module &M) {
|
||||
OutStreamer.InitStreamer();
|
||||
|
||||
MMI = getAnalysisIfAvailable<MachineModuleInfo>();
|
||||
MMI->AnalyzeModule(M);
|
||||
|
||||
@ -164,6 +162,8 @@ bool AsmPrinter::doInitialization(Module &M) {
|
||||
const_cast<TargetLoweringObjectFile&>(getObjFileLowering())
|
||||
.Initialize(OutContext, TM);
|
||||
|
||||
OutStreamer.InitStreamer();
|
||||
|
||||
Mang = new Mangler(OutContext, &TM);
|
||||
|
||||
// Allow the target to emit any magic that it wants at the start of the file.
|
||||
|
Loading…
Reference in New Issue
Block a user