From 479ffebd732552ad70ffee7c69ae1e7b9f52cfdd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 6 May 2005 20:42:57 +0000 Subject: encode function calling convs in the bytecode file. invoke and call are still to come. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21749 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bytecode/Reader/Reader.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/Bytecode/Reader/Reader.cpp') 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. -- cgit v1.2.3-18-g5258