File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -234,7 +234,9 @@ const Function *DxilModule::GetEntryFunction() const {
234234llvm::SmallVector<llvm::Function *, 64 > DxilModule::GetExportedFunctions () const {
235235 llvm::SmallVector<llvm::Function *, 64 > ret;
236236 for (auto const & fn : m_DxilEntryPropsMap) {
237+ if (fn.first != nullptr ) {
237238 ret.push_back (const_cast <llvm::Function*>(fn.first ));
239+ }
238240 }
239241 return ret;
240242}
Original file line number Diff line number Diff line change @@ -203,10 +203,10 @@ std::vector<llvm::BasicBlock*> GetAllBlocks(hlsl::DxilModule& DM) {
203203 std::vector<llvm::BasicBlock*> ret;
204204 auto entryPoints = DM.GetExportedFunctions ();
205205 for (auto & fn : entryPoints) {
206- auto & blocks = fn->getBasicBlockList ();
207- for (auto & block : blocks) {
208- ret.push_back (&block);
209- }
206+ auto & blocks = fn->getBasicBlockList ();
207+ for (auto & block : blocks) {
208+ ret.push_back (&block);
209+ }
210210 }
211211 return ret;
212212}
You can’t perform that action at this time.
0 commit comments