Skip to content

Commit bce4ee7

Browse files
author
Harlan Haskins
committed
Fixed invocation of llvm-profdata
shell.call doesn't return an exit code; it raises an error now.
1 parent 559b0b4 commit bce4ee7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

utils/profdata_merge/process.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,11 @@ def merge_file_buffer(self):
6464
llvm_cmd.append("-sparse")
6565
llvm_cmd += cleaned_files
6666
self.report(llvm_cmd)
67-
ret = shell.call(llvm_cmd, echo=False)
68-
if ret != 0:
69-
self.report("llvm profdata command failed -- Exited with code %d"
70-
% ret, level=logging.ERROR)
67+
68+
try:
69+
shell.call(llvm_cmd, echo=False)
70+
except SystemExit as e:
71+
self.report("llvm profdata command failed: %s" % e, level=logging.ERROR)
7172
if self.config.remove_files:
7273
for f in self.filename_buffer:
7374
if os.path.exists(f):

0 commit comments

Comments
 (0)