Fixes an issue where a signum => name mapping function has multiple case statements that define to the same integral value on my Linux (Ubuntu 12.04, x86_64). It's for SIGIO and SIGPOLL.

In the case that they are both defined the same.
Patch by Todd Fiala (but typos are mine)

llvm-svn: 197221
This commit is contained in:
Sylvestre Ledru 2013-12-13 09:51:39 +00:00
parent a4ecd46fab
commit a4cc7dec70
1 changed files with 4 additions and 0 deletions

View File

@ -491,8 +491,12 @@ Host::GetSignalAsCString (int signo)
case SIGTRAP: return "SIGTRAP"; // 5 trace trap (not reset when caught)
case SIGABRT: return "SIGABRT"; // 6 abort()
#if defined(SIGPOLL)
#if !defined(SIGIO) || (SIGPOLL != SIGIO)
// Under some GNU/Linux, SIGPOLL and SIGIO are the same. Causing the build to
// fail with 'multiple define cases with same value'
case SIGPOLL: return "SIGPOLL"; // 7 pollable event ([XSR] generated, not supported)
#endif
#endif
#if defined(SIGEMT)
case SIGEMT: return "SIGEMT"; // 7 EMT instruction
#endif