This is an archive of the discontinued LLVM Phabricator instance.

[X86] Fix __code_model_*__ predefine names
ClosedPublic

Authored by mcgrathr on Feb 21 2020, 4:54 PM.

Details

Summary

GCC defines code_model_* (two trailing underscores), not
__code_model_*_ (one trailing underscore).

Diff Detail

Event Timeline

mcgrathr created this revision.Feb 21 2020, 4:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 21 2020, 4:54 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
MaskRay accepted this revision.Feb 21 2020, 5:01 PM
MaskRay added a subscriber: MaskRay.

LG. The full story:

// gcc/config/i386/i386-c.c
    case CM_SMALL:
    case CM_SMALL_PIC:
      def_or_undef (parse_in, "__code_model_small__");
      break;
    case CM_MEDIUM:
    case CM_MEDIUM_PIC:
      def_or_undef (parse_in, "__code_model_medium__");
      break;
    case CM_LARGE:
    case CM_LARGE_PIC:
      def_or_undef (parse_in, "__code_model_large__");
      break;
    case CM_32:
      def_or_undef (parse_in, "__code_model_32__");
      break;
    case CM_KERNEL:
      def_or_undef (parse_in, "__code_model_kernel__");
      break;
This revision is now accepted and ready to land.Feb 21 2020, 5:01 PM

Thanks! Can you land it for me?

This revision was automatically updated to reflect the committed changes.