summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.h
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2014-09-10 18:00:17 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2014-09-10 18:00:17 +0000
commit17a9cff55c43e85dcc118c51ca80b9729d8a2c1f (patch)
tree4a6c2bc87a9e4fb77fe4849f25964ad2749d6308 /llvm/lib/AsmParser/LLParser.h
parentb653de1ada7e76a28bcc35402e6cd70f725e0690 (diff)
downloadbcm5719-llvm-17a9cff55c43e85dcc118c51ca80b9729d8a2c1f.tar.gz
bcm5719-llvm-17a9cff55c43e85dcc118c51ca80b9729d8a2c1f.zip
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 llvm-svn: 217529
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.h')
-rw-r--r--llvm/lib/AsmParser/LLParser.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/LLParser.h b/llvm/lib/AsmParser/LLParser.h
index b7d8f21442b..aa62bcc8daf 100644
--- a/llvm/lib/AsmParser/LLParser.h
+++ b/llvm/lib/AsmParser/LLParser.h
@@ -226,7 +226,7 @@ namespace llvm {
}
bool ParseOptionalVisibility(unsigned &Visibility);
bool ParseOptionalDLLStorageClass(unsigned &DLLStorageClass);
- bool ParseOptionalCallingConv(CallingConv::ID &CC);
+ bool ParseOptionalCallingConv(unsigned &CC);
bool ParseOptionalAlignment(unsigned &Alignment);
bool ParseOptionalDereferenceableBytes(uint64_t &Bytes);
bool ParseScopeAndOrdering(bool isAtomic, SynchronizationScope &Scope,
OpenPOWER on IntegriCloud