@@ -4061,15 +4061,13 @@ class HLSLExternalSource : public ExternalSemaSource {
40614061 // Namespace ::dx only introduced with SM6.9
40624062 const auto *SM =
40634063 hlsl::ShaderModel::GetByName(m_sema->getLangOpts().HLSLProfile.c_str());
4064- if (SM->IsSM69Plus()) {
4065- m_dxNSDecl =
4066- NamespaceDecl::Create(context, context.getTranslationUnitDecl(),
4067- /*Inline*/ false, SourceLocation(),
4068- SourceLocation(), &context.Idents.get("dx"),
4069- /*PrevDecl*/ nullptr);
4070- m_dxNSDecl->setImplicit();
4071- context.getTranslationUnitDecl()->addDecl(m_dxNSDecl);
4072- }
4064+ m_dxNSDecl =
4065+ NamespaceDecl::Create(context, context.getTranslationUnitDecl(),
4066+ /*Inline*/ false, SourceLocation(),
4067+ SourceLocation(), &context.Idents.get("dx"),
4068+ /*PrevDecl*/ nullptr);
4069+ m_dxNSDecl->setImplicit();
4070+ context.getTranslationUnitDecl()->addDecl(m_dxNSDecl);
40734071
40744072#ifdef ENABLE_SPIRV_CODEGEN
40754073 if (m_sema->getLangOpts().SPIRV) {
@@ -5133,8 +5131,6 @@ class HLSLExternalSource : public ExternalSemaSource {
51335131 auto tableCount = _countof(g_Intrinsics);
51345132 if (isDxNamespace) {
51355133 // Namespace ::dx disabled pre SM 6.9
5136- if (!m_dxNSDecl)
5137- return false;
51385134 table = g_DxIntrinsics;
51395135 tableCount = _countof(g_DxIntrinsics);
51405136 }
0 commit comments