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 | 9113e73ecf72b0a94715b3e204211e2c7f55dda7 (patch) | |
tree | a682748d4caf4569ad807098d6d88faf6dd35b49 /lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 645fc4edc23930365595e3e4b3314db0433a8182 (diff) | |
download | external_llvm-9113e73ecf72b0a94715b3e204211e2c7f55dda7.zip external_llvm-9113e73ecf72b0a94715b3e204211e2c7f55dda7.tar.gz external_llvm-9113e73ecf72b0a94715b3e204211e2c7f55dda7.tar.bz2 |
encode and read param attrs along with function type. WE can now roundtrip Olden/voronoi loslessly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36735 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | lib/Bitcode/Writer/BitcodeWriter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index 7a875a0..4ca6c24 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/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))); |