aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Reader/Reader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bytecode/Reader/Reader.cpp')
-rw-r--r--lib/Bytecode/Reader/Reader.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp
index 24875e42fd..8e46083082 100644
--- a/lib/Bytecode/Reader/Reader.cpp
+++ b/lib/Bytecode/Reader/Reader.cpp
@@ -1886,6 +1886,14 @@ void BytecodeReader::ParseModuleGlobalInfo() {
if ((Flags & (1 << 4)) == 0)
FunctionSignatureList.push_back(Func);
+ // Look at the low bits. If there is a calling conv here, apply it,
+ // read it as a vbr.
+ Flags &= 15;
+ if (Flags)
+ Func->setCallingConv(Flags-1);
+ else
+ Func->setCallingConv(read_vbr_uint());
+
if (Handler) Handler->handleFunctionDeclaration(Func);
// Get the next function signature.