diff options
author | Chris Lattner <sabre@nondot.org> | 2007-05-04 03:41:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-05-04 03:41:34 +0000 |
commit | 70f4566d8a2f4b24a51289c186835cd0e4123578 (patch) | |
tree | eba8c97c8c37bc6b3df1e2f01c977929d8950162 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | a919f6dddc2cfac03f7857849bef42b05167f55c (diff) | |
download | llvm-70f4566d8a2f4b24a51289c186835cd0e4123578.zip llvm-70f4566d8a2f4b24a51289c186835cd0e4123578.tar.gz llvm-70f4566d8a2f4b24a51289c186835cd0e4123578.tar.bz2 |
encode and read param attrs along with function type. WE can now roundtrip Olden/voronoi loslessly
llvm-svn: 36735
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 7a875a0..4ca6c24 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -145,11 +145,11 @@ static void WriteTypeTable(const ValueEnumerator &VE, BitstreamWriter &Stream) { case Type::FunctionTyID: { const FunctionType *FT = cast<FunctionType>(T); - // FUNCTION: [isvararg, #pararms, paramty x N] + // FUNCTION: [isvararg, attrid, #pararms, paramty x N] Code = bitc::TYPE_CODE_FUNCTION; TypeVals.push_back(FT->isVarArg()); + TypeVals.push_back(VE.getParamAttrID(FT->getParamAttrs())); TypeVals.push_back(VE.getTypeID(FT->getReturnType())); - // FIXME: PARAM ATTR ID! TypeVals.push_back(FT->getNumParams()); for (unsigned i = 0, e = FT->getNumParams(); i != e; ++i) TypeVals.push_back(VE.getTypeID(FT->getParamType(i))); |