@@ -383,6 +383,7 @@ int main(int argc, char **argv) {
383
383
cl::ParseCommandLineOptions (argc, argv, " llvm machine code playground\n " );
384
384
MCTargetOptions MCOptions = InitMCTargetOptionsFromFlags ();
385
385
TripleName = Triple::normalize (TripleName);
386
+ Triple TheTriple (TripleName);
386
387
setDwarfDebugFlags (argc, argv);
387
388
388
389
setDwarfDebugProducer ();
@@ -391,9 +392,6 @@ int main(int argc, char **argv) {
391
392
const Target *TheTarget = GetTarget (ProgName);
392
393
if (!TheTarget)
393
394
return 1 ;
394
- // Now that GetTarget() has (potentially) replaced TripleName, it's safe to
395
- // construct the Triple object.
396
- Triple TheTriple (TripleName);
397
395
398
396
ErrorOr<std::unique_ptr<MemoryBuffer>> BufferPtr =
399
397
MemoryBuffer::getFileOrSTDIN (InputFilename);
@@ -431,7 +429,7 @@ int main(int argc, char **argv) {
431
429
// MCObjectFileInfo needs a MCContext reference in order to initialize itself.
432
430
MCObjectFileInfo MOFI;
433
431
MCContext Ctx (MAI.get (), MRI.get (), &MOFI, &SrcMgr);
434
- MOFI.InitMCObjectFileInfo (TheTriple , RelocModel, CMModel, Ctx);
432
+ MOFI.InitMCObjectFileInfo (TripleName , RelocModel, CMModel, Ctx);
435
433
436
434
if (SaveTempLabels)
437
435
Ctx.setAllowTemporaryLabels (false );
0 commit comments