diff options
author | Chris Lattner <sabre@nondot.org> | 2005-05-06 20:42:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-05-06 20:42:57 +0000 |
commit | f2e1c1969fdb840502d2ac0f0454cc0ffcffff5b (patch) | |
tree | 34c1d299eeff6e47548a76a17479d13e0970bb36 /llvm/lib/Bytecode/Reader/Reader.cpp | |
parent | 53bdd312111fe09f2c9cfc4950b91d467b0cf436 (diff) | |
download | bcm5719-llvm-f2e1c1969fdb840502d2ac0f0454cc0ffcffff5b.tar.gz bcm5719-llvm-f2e1c1969fdb840502d2ac0f0454cc0ffcffff5b.zip |
encode function calling convs in the bytecode file. invoke and call are
still to come.
llvm-svn: 21749
Diffstat (limited to 'llvm/lib/Bytecode/Reader/Reader.cpp')
-rw-r--r-- | llvm/lib/Bytecode/Reader/Reader.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Bytecode/Reader/Reader.cpp b/llvm/lib/Bytecode/Reader/Reader.cpp index 24875e42fd1..8e46083082f 100644 --- a/llvm/lib/Bytecode/Reader/Reader.cpp +++ b/llvm/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. |