[PATCH] Make CallingConv::ID an alias of "unsigned".

Alexey Samsonov vonosmas at gmail.com
Mon Sep 8 11:42:05 PDT 2014


Hi nicholas,

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.

http://reviews.llvm.org/D5248

Files:
  include/llvm/IR/CallingConv.h
  lib/AsmParser/LLParser.cpp
  lib/AsmParser/LLParser.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5248.13409.patch
Type: text/x-patch
Size: 3027 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140908/254cb6b0/attachment.bin>


More information about the llvm-commits mailing list