Commit e5479541 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo

Use full name of LLVM program in error message

Previously something like `/usr/bin/opt-3.7` was being shortened to
`opt-3` using the `takeBaseName` function. This shortened form is
actually not correct. We should use `takeFileName` instead.

Reviewers: bgamari, austin, hvr

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1420
parent 22fcf9c1
...@@ -1329,7 +1329,7 @@ handleProc pgm phase_name proc = do ...@@ -1329,7 +1329,7 @@ handleProc pgm phase_name proc = do
case rc of case rc of
ExitSuccess{} -> return r ExitSuccess{} -> return r
ExitFailure n -> throwGhcExceptionIO ( ExitFailure n -> throwGhcExceptionIO (
ProgramError ("`" ++ takeBaseName pgm ++ "'" ++ ProgramError ("`" ++ takeFileName pgm ++ "'" ++
" failed in phase `" ++ phase_name ++ "'." ++ " failed in phase `" ++ phase_name ++ "'." ++
" (Exit code: " ++ show n ++ ")")) " (Exit code: " ++ show n ++ ")"))
where where
......
A B C A B C
`t8602' failed in phase `Haskell pre-processor'. (Exit code: 1) `t8602.sh' failed in phase `Haskell pre-processor'. (Exit code: 1)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment