Skip to content

Commit 2b30dc0

Browse files
committed
vector vs. smallvector
1 parent 8089204 commit 2b30dc0

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

lib/DXIL/DxilModule.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1831,17 +1831,19 @@ bool DxilModule::StripNamesSensitiveToDebug() {
18311831

18321832
if (!GetShaderModel()->IsLib()) {
18331833
// Strip struct names
1834-
SmallVector<StructType *,8> structTypes = m_pModule->getIdentifiedStructTypes();
1835-
unsigned NextStructId = 0;
1836-
for (StructType *ST : structTypes) {
1837-
if (!ST->hasName())
1834+
std::vector<StructType *> structTypes =
1835+
m_pModule->getIdentifiedStructTypes();
1836+
unsigned nextStructId = 0;
1837+
for (StructType *structType : structTypes) {
1838+
if (!structType->hasName())
18381839
continue;
18391840

18401841
StringRef Name = structType->getName();
18411842
if (Name.startswith("dx."))
18421843
continue;
18431844

1844-
structType->setName((Twine("dx.strip.struct.") + Twine(nextStructId++)).str());
1845+
structType->setName(
1846+
(Twine("dx.strip.struct.") + Twine(nextStructId++)).str());
18451847
changed = true;
18461848
}
18471849

@@ -1855,7 +1857,8 @@ bool DxilModule::StripNamesSensitiveToDebug() {
18551857
// Strip groupshared variable names
18561858
unsigned nextGroupSharedId = 0;
18571859
for (GlobalVariable &globalVar : m_pModule->globals()) {
1858-
if (globalVar.getType()->getPointerAddressSpace() == DXIL::kTGSMAddrSpace &&
1860+
if (globalVar.getType()->getPointerAddressSpace() ==
1861+
DXIL::kTGSMAddrSpace &&
18591862
globalVar.hasName()) {
18601863
StringRef Name = globalVar.getName();
18611864
if (Name.startswith("dx.") || Name.startswith("llvm."))

0 commit comments

Comments
 (0)