Make CallingConv::ID an alias of "unsigned".
authorAlexey Samsonov <vonosmas@gmail.com>
Wed, 10 Sep 2014 18:00:17 +0000 (18:00 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Wed, 10 Sep 2014 18:00:17 +0000 (18:00 +0000)
commit5e4558e5a8974efb51f6e53d8fff6f64cf3264f2
tree7dc76fece0dce97b06ee7e9e91892ea9c3bf38e4
parent87c977a52bcf82911e39656b8275f2aedb0a2cb9
Make CallingConv::ID an alias of "unsigned".

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.

Test Plan: llvm regression test suite

Reviewers: nicholas

Reviewed By: nicholas

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5248

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217529 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/CallingConv.h
lib/AsmParser/LLParser.cpp
lib/AsmParser/LLParser.h