浏览代码

Fixed a failure with LexicalBlockFile (#2453)

Adam Yang 6 年之前
父节点
当前提交
56222b94be
共有 1 个文件被更改,包括 2 次插入0 次删除
  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)) {
     ParentLS = Block->getScope();
+  } else if (auto *BlockFile = llvm::dyn_cast<llvm::DILexicalBlockFile>(LS)) {
+    ParentLS = BlockFile->getScope();
   }
 
   if (ParentLS == nullptr) {