forked from OSchip/llvm-project
[dexter] Check path != None before calling os.path.exists
The test optnone-simple-functions.cpp added in D97668 fails on macOS. os.path.exists raises an exception because we pass it None. Guard against this. Related revision: https://reviews.llvm.org/D97668
This commit is contained in:
parent
0df28acffb
commit
61d314024d
|
@ -27,7 +27,8 @@ def update_step_watches(step_info, watches, commands):
|
|||
# Iterate over all watches of the types named in watch_cmds
|
||||
for watch in towatch:
|
||||
loc = step_info.current_location
|
||||
if (os.path.exists(loc.path)
|
||||
if (loc.path != None
|
||||
and os.path.exists(loc.path)
|
||||
and os.path.samefile(watch.path, loc.path)
|
||||
and watch.lineno == loc.lineno):
|
||||
result = watch.eval(step_info)
|
||||
|
|
Loading…
Reference in New Issue