This is an archive of the discontinued LLVM Phabricator instance.

Make CallingConv::ID an alias of "unsigned".
ClosedPublic

Authored by samsonov on Sep 8 2014, 11:42 AM.

Details

Summary

Make CallingConv::ID a plain unsigned instead of enum with a
fixed set of valus. LLVM IR allows arbitraty calling conventions (you are
free to write cc12345), and loading them as enum is an undefined
behavior. This was reported by UBSan.

Diff Detail

Event Timeline

samsonov updated this revision to Diff 13409.Sep 8 2014, 11:42 AM
samsonov retitled this revision from to Make CallingConv::ID an alias of "unsigned"..
samsonov updated this object.
samsonov edited the test plan for this revision. (Show Details)
samsonov added a reviewer: nicholas.
samsonov added a subscriber: Unknown Object (MLST).
nicholas accepted this revision.Sep 9 2014, 12:35 AM
nicholas edited edge metadata.

LGTM

This revision is now accepted and ready to land.Sep 9 2014, 12:35 AM
samsonov closed this revision.Sep 10 2014, 11:09 AM