mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Revert r239721 - Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.
It appears to cause sparc-little-endian.s to assert on Windows and Darwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239724 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -527,7 +527,7 @@ bool DwarfStreamer::init(Triple TheTriple, StringRef OutputFilename) {
|
||||
|
||||
MOFI.reset(new MCObjectFileInfo);
|
||||
MC.reset(new MCContext(MAI.get(), MRI.get(), MOFI.get()));
|
||||
MOFI->InitMCObjectFileInfo(TheTriple, Reloc::Default, CodeModel::Default,
|
||||
MOFI->InitMCObjectFileInfo(TripleName, Reloc::Default, CodeModel::Default,
|
||||
*MC);
|
||||
|
||||
MAB = TheTarget->createMCAsmBackend(*MRI, TripleName, "");
|
||||
|
||||
@@ -383,6 +383,7 @@ int main(int argc, char **argv) {
|
||||
cl::ParseCommandLineOptions(argc, argv, "llvm machine code playground\n");
|
||||
MCTargetOptions MCOptions = InitMCTargetOptionsFromFlags();
|
||||
TripleName = Triple::normalize(TripleName);
|
||||
Triple TheTriple(TripleName);
|
||||
setDwarfDebugFlags(argc, argv);
|
||||
|
||||
setDwarfDebugProducer();
|
||||
@@ -391,9 +392,6 @@ int main(int argc, char **argv) {
|
||||
const Target *TheTarget = GetTarget(ProgName);
|
||||
if (!TheTarget)
|
||||
return 1;
|
||||
// Now that GetTarget() has (potentially) replaced TripleName, it's safe to
|
||||
// construct the Triple object.
|
||||
Triple TheTriple(TripleName);
|
||||
|
||||
ErrorOr<std::unique_ptr<MemoryBuffer>> BufferPtr =
|
||||
MemoryBuffer::getFileOrSTDIN(InputFilename);
|
||||
@@ -431,7 +429,7 @@ int main(int argc, char **argv) {
|
||||
// MCObjectFileInfo needs a MCContext reference in order to initialize itself.
|
||||
MCObjectFileInfo MOFI;
|
||||
MCContext Ctx(MAI.get(), MRI.get(), &MOFI, &SrcMgr);
|
||||
MOFI.InitMCObjectFileInfo(TheTriple, RelocModel, CMModel, Ctx);
|
||||
MOFI.InitMCObjectFileInfo(TripleName, RelocModel, CMModel, Ctx);
|
||||
|
||||
if (SaveTempLabels)
|
||||
Ctx.setAllowTemporaryLabels(false);
|
||||
|
||||
Reference in New Issue
Block a user