Skip to content

Commit cc50c79

Browse files
authored
More cleanup to help DXIL move to newer version of llvm. (#4095)
1 parent ef1cff1 commit cc50c79

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

lib/DXIL/DxilSignature.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ bool DxilSignature::IsOutput() const {
6161
}
6262

6363
unique_ptr<DxilSignatureElement> DxilSignature::CreateElement() {
64-
return llvm::make_unique<DxilSignatureElement>(m_sigPointKind);
64+
return std::make_unique<DxilSignatureElement>(m_sigPointKind);
6565
}
6666

6767
unsigned DxilSignature::AppendElement(std::unique_ptr<DxilSignatureElement> pSE, bool bSetID) {

lib/DXIL/DxilTypeSystem.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ StructType *DxilTypeSystem::GetNormFloatType(CompType CT, unsigned NumComps) {
525525
raw_string_ostream NameStream(TypeName);
526526
if (NumComps > 1) {
527527
(NameStream << "dx.types." << NumComps << "x" << CT.GetName()).flush();
528-
pFieldType = VectorType::get(pFieldType, NumComps);
528+
pFieldType = FixedVectorType::get(pFieldType, NumComps);
529529
} else {
530530
(NameStream << "dx.types." << CT.GetName()).flush();
531531
}
@@ -702,8 +702,11 @@ DXIL::SigPointKind SigPointFromInputQual(DxilParamInputQual Q, DXIL::ShaderKind
702702
void RemapSemantic(llvm::StringRef &oldSemName, llvm::StringRef &oldSemFullName, const char *newSemName,
703703
DxilParameterAnnotation &paramInfo, llvm::LLVMContext &Context) {
704704
// format deprecation warning
705-
Context.emitWarning(Twine("DX9-style semantic \"") + oldSemName + Twine("\" mapped to DX10 system semantic \"") + newSemName +
706-
Twine("\" due to -Gec flag. This functionality is deprecated in newer language versions."));
705+
dxilutil::EmitWarningOnContext(
706+
Context, Twine("DX9-style semantic \"") + oldSemName +
707+
Twine("\" mapped to DX10 system semantic \"") + newSemName +
708+
Twine("\" due to -Gec flag. This functionality is "
709+
"deprecated in newer language versions."));
707710

708711
// create new semantic name with the same index
709712
std::string newSemNameStr(newSemName);

0 commit comments

Comments
 (0)