File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ using namespace hlsl;
4343
4444namespace {
4545
46- static const StringRef kStaticResourceLibErrorMsg = " static global resource use is disallowed in library exports." ;
46+ static const StringRef kStaticResourceLibErrorMsg = " non const static global resource use is disallowed in library exports." ;
4747
4848class DxilPromoteStaticResources : public ModulePass {
4949public:
@@ -166,6 +166,7 @@ bool DxilPromoteStaticResources::PromoteStaticGlobalResources(
166166 // optimized away for the exported function.
167167 for (auto &GV : M.globals ()) {
168168 if (GV.getLinkage () == GlobalVariable::LinkageTypes::InternalLinkage &&
169+ !GV.isConstant () &&
169170 dxilutil::IsHLSLObjectType (dxilutil::GetArrayEltTy (GV.getType ()))) {
170171 if (!GV.user_empty ()) {
171172 if (Instruction *I = dyn_cast<Instruction>(*GV.user_begin ())) {
You can’t perform that action at this time.
0 commit comments