Sfoglia il codice sorgente

Fixed a failure with LexicalBlockFile (#2453)

Adam Yang 6 anni fa
parent
commit
56222b94be
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      lib/DxilDia/DxilDiaSymbolManager.cpp

+ 2 - 0
lib/DxilDia/DxilDiaSymbolManager.cpp

@@ -1142,6 +1142,8 @@ HRESULT dxil_dia::hlsl_symbols::SymbolManagerInit::CreateFunctionBlockForLocalSc
     }
     }
   } else if (auto *Block = llvm::dyn_cast<llvm::DILexicalBlock>(LS)) {
   } else if (auto *Block = llvm::dyn_cast<llvm::DILexicalBlock>(LS)) {
     ParentLS = Block->getScope();
     ParentLS = Block->getScope();
+  } else if (auto *BlockFile = llvm::dyn_cast<llvm::DILexicalBlockFile>(LS)) {
+    ParentLS = BlockFile->getScope();
   }
   }
 
 
   if (ParentLS == nullptr) {
   if (ParentLS == nullptr) {