llvm::SourceMgr TempSrcMgr;
llvm::MCContext Ctx(MAI.get(), MRI.get(), MOFI.get(), &TempSrcMgr);
- MOFI->InitMCObjectFileInfo(TheTriple, llvm::Reloc::Default,
- llvm::CodeModel::Default, Ctx);
+ MOFI->InitMCObjectFileInfo(TheTriple, /*PIG*/ false, llvm::CodeModel::Default,
+ Ctx);
std::unique_ptr<llvm::MemoryBuffer> Buffer =
llvm::MemoryBuffer::getMemBuffer(AsmString, "<MS inline asm>");
MCContext Ctx(MAI.get(), MRI.get(), MOFI.get(), &SrcMgr);
- llvm::Reloc::Model RM = llvm::Reloc::Default;
+ bool PIC = false;
if (Opts.RelocationModel == "static") {
- RM = llvm::Reloc::Static;
+ PIC = false;
} else if (Opts.RelocationModel == "pic") {
- RM = llvm::Reloc::PIC_;
+ PIC = true;
} else {
assert(Opts.RelocationModel == "dynamic-no-pic" &&
"Invalid PIC model!");
- RM = llvm::Reloc::DynamicNoPIC;
+ PIC = false;
}
- MOFI->InitMCObjectFileInfo(Triple(Opts.Triple), RM,
- CodeModel::Default, Ctx);
+ MOFI->InitMCObjectFileInfo(Triple(Opts.Triple), PIC, CodeModel::Default, Ctx);
if (Opts.SaveTemporaryLabels)
Ctx.setAllowTemporaryLabels(false);
if (Opts.GenDwarfForAssembly)