This is an archive of the discontinued LLVM Phabricator instance.

Adjust #pragma warning so GCC is not unhappy
ClosedPublic

Authored by rogfer01 on Feb 13 2023, 1:09 AM.

Details

Summary

In https://github.com/llvm/llvm-project/commit/d768bf994f508d7eaf9541a568be3d71096febf5 a warning to help transitioning was added to llvm/Support/Host.h but it includes extra parentheses which make GCC unhappy (clang seems to accept them fine)

llvm/include/llvm/Support/Host.h:15:20: error: invalid "#pragma GCC warning" directive
   15 | #pragma GCC warning(                                                           \
      |                    ^

This change removes the parentheses around the string literal.

Diff Detail

Event Timeline

rogfer01 created this revision.Feb 13 2023, 1:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 13 2023, 1:09 AM
rogfer01 requested review of this revision.Feb 13 2023, 1:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 13 2023, 1:09 AM
lenary accepted this revision.Feb 13 2023, 1:35 AM
This revision is now accepted and ready to land.Feb 13 2023, 1:35 AM

Which configurations are still using this? Just Polly (via isl), or others too?

Which configurations are still using this? Just Polly (via isl), or others too?

flang still uses this header.

flang still uses this header.

Apologies, it doesn't. Turns out a branch of mine does and then GCC failed to build it.

Which configurations are still using this? Just Polly (via isl), or others too?

flang still uses this header.

Ok, well, I can't see uses of llvm/Support/Host.h in the flang directory, but we need this so that polly can build isl, so don't see these comments as being against you landing this.

This revision was landed with ongoing or failed builds.Feb 13 2023, 2:10 AM
This revision was automatically updated to reflect the committed changes.

Thanks for double checking, I'll land it soon.