UnknownObjectFormat,
COFF,
+ DXContainer,
ELF,
GOFF,
MachO,
using DiagHandlerTy =
std::function<void(const SMDiagnostic &, bool, const SourceMgr &,
std::vector<const MDNode *> &)>;
- enum Environment { IsMachO, IsELF, IsGOFF, IsCOFF, IsWasm, IsXCOFF };
+ enum Environment {
+ IsMachO,
+ IsELF,
+ IsGOFF,
+ IsCOFF,
+ IsWasm,
+ IsXCOFF,
+ IsDXContainer
+ };
private:
Environment Env;
switch (T.getObjectFormat()) {
case Triple::UnknownObjectFormat:
llvm_unreachable("Unknown object format");
+ case Triple::DXContainer:
+ llvm_unreachable("DXContainer is unsupported through MC");
case Triple::COFF:
assert(T.isOSWindows() && "only Windows COFF is supported");
S = COFFStreamerCtorFn(Ctx, std::move(TAB), std::move(OW),
case Triple::XCOFF:
llvm_unreachable("XCOFF is not yet implemented");
break;
+ case Triple::DXContainer:
+ llvm_unreachable("DXContainer is not yet implemented");
+ break;
}
llvm_unreachable("Unimplemented ObjectFormatType");
}
case Triple::XCOFF:
llvm_unreachable("XCOFF is not yet implemented");
break;
+ case Triple::DXContainer:
+ llvm_unreachable("DXC is not yet implemented");
+ break;
}
llvm_unreachable("Unimplemented ObjectFormatType");
}
case Triple::GOFF:
Env = IsGOFF;
break;
+ case Triple::DXContainer:
+ Env = IsDXContainer;
+ break;
case Triple::UnknownObjectFormat:
report_fatal_error("Cannot initialize MC for unknown object file format.");
break;
return new (Name, *this) MCSymbolWasm(Name, IsTemporary);
case MCContext::IsXCOFF:
return createXCOFFSymbolImpl(Name, IsTemporary);
+ case MCContext::IsDXContainer:
+ break;
}
return new (Name, *this) MCSymbol(MCSymbol::SymbolKindUnset, Name,
IsTemporary);
case MCContext::IsXCOFF:
initXCOFFMCObjectFileInfo(TheTriple);
break;
+ case MCContext::IsDXContainer:
+ break;
}
}
case Triple::COFF:
case Triple::GOFF:
case Triple::XCOFF:
+ case Triple::DXContainer:
case Triple::UnknownObjectFormat:
report_fatal_error("Cannot get DWARF comdat section for this object file "
"format: not implemented.");
case MCContext::IsXCOFF:
PlatformParser.reset(createXCOFFAsmParser());
break;
+ case MCContext::IsDXContainer:
+ llvm_unreachable("DXContainer is not supported yet");
+ break;
}
PlatformParser->Initialize(*this);
case Triple::MachO: return "macho";
case Triple::Wasm: return "wasm";
case Triple::XCOFF: return "xcoff";
+ case Triple::DXContainer: return "dxcontainer";
}
llvm_unreachable("unknown object format type");
}
return Triple::UnknownObjectFormat;
case Triple::dxil:
- return Triple::UnknownObjectFormat;
+ return Triple::DXContainer;
}
llvm_unreachable("unknown architecture");
}
break;
case MCContext::IsGOFF:
case MCContext::IsXCOFF:
+ case MCContext::IsDXContainer:
llvm_unreachable("unexpected object format");
break;
}
case Triple::Wasm:
case Triple::GOFF:
case Triple::XCOFF:
+ case Triple::DXContainer:
report_fatal_error(
"ModuleAddressSanitizer not implemented for object file format");
case Triple::UnknownObjectFormat:
Triple CygwinNormalized(Triple::normalize("i686-pc-cygwin-elf"));
EXPECT_EQ(Triple::ELF, CygwinNormalized.getObjectFormat());
+ EXPECT_EQ(Triple::DXContainer,
+ Triple("dxil-unknown-shadermodel").getObjectFormat());
+
Triple T = Triple("");
T.setObjectFormat(Triple::ELF);
EXPECT_EQ(Triple::ELF, T.getObjectFormat());