diff options
author | Gordon Henriksen <gordonhenriksen@mac.com> | 2008-08-17 18:44:35 +0000 |
---|---|---|
committer | Gordon Henriksen <gordonhenriksen@mac.com> | 2008-08-17 18:44:35 +0000 |
commit | 5eca075b74d62c621b160aa216b4cd50829a2cc7 (patch) | |
tree | 5406e0182a3a20726e00eec044bbca1199e673b9 /lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 94fb5f2a7066c427a9d3dac10a33ccbd02aac467 (diff) |
Rename some GC classes so that their roll will hopefully be clearer.
In particular, Collector was confusing to implementors. Several
thought that this compile-time class was the place to implement
their runtime GC heap. Of course, it doesn't even exist at runtime.
Specifically, the renames are:
Collector -> GCStrategy
CollectorMetadata -> GCFunctionInfo
CollectorModuleMetadata -> GCModuleInfo
CollectorRegistry -> GCRegistry
Function::getCollector -> getGC (setGC, hasGC, clearGC)
Several accessors and nested types have also been renamed to be
consistent. These changes should be obvious.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54899 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | lib/Bitcode/Writer/BitcodeWriter.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index 2c585b1370..b5fb60778a 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -303,10 +303,10 @@ static void WriteModuleInfo(const Module *M, const ValueEnumerator &VE, WriteStringRecord(bitc::MODULE_CODE_ASM, M->getModuleInlineAsm(), 0/*TODO*/, Stream); - // Emit information about sections and collectors, computing how many there - // are. Also compute the maximum alignment value. + // Emit information about sections and GC, computing how many there are. Also + // compute the maximum alignment value. std::map<std::string, unsigned> SectionMap; - std::map<std::string, unsigned> CollectorMap; + std::map<std::string, unsigned> GCMap; unsigned MaxAlignment = 0; unsigned MaxGlobalType = 0; for (Module::const_global_iterator GV = M->global_begin(),E = M->global_end(); @@ -333,13 +333,13 @@ static void WriteModuleInfo(const Module *M, const ValueEnumerator &VE, Entry = SectionMap.size(); } } - if (F->hasCollector()) { - // Same for collector names. - unsigned &Entry = CollectorMap[F->getCollector()]; + if (F->hasGC()) { + // Same for GC names. + unsigned &Entry = GCMap[F->getGC()]; if (!Entry) { - WriteStringRecord(bitc::MODULE_CODE_COLLECTORNAME, F->getCollector(), + WriteStringRecord(bitc::MODULE_CODE_GCNAME, F->getGC(), 0/*TODO*/, Stream); - Entry = CollectorMap.size(); + Entry = GCMap.size(); } } } @@ -401,7 +401,7 @@ static void WriteModuleInfo(const Module *M, const ValueEnumerator &VE, // Emit the function proto information. for (Module::const_iterator F = M->begin(), E = M->end(); F != E; ++F) { // FUNCTION: [type, callingconv, isproto, paramattr, - // linkage, alignment, section, visibility, collector] + // linkage, alignment, section, visibility, gc] Vals.push_back(VE.getTypeID(F->getType())); Vals.push_back(F->getCallingConv()); Vals.push_back(F->isDeclaration()); @@ -410,7 +410,7 @@ static void WriteModuleInfo(const Module *M, const ValueEnumerator &VE, Vals.push_back(Log2_32(F->getAlignment())+1); Vals.push_back(F->hasSection() ? SectionMap[F->getSection()] : 0); Vals.push_back(getEncodedVisibility(F)); - Vals.push_back(F->hasCollector() ? CollectorMap[F->getCollector()] : 0); + Vals.push_back(F->hasGC() ? GCMap[F->getGC()] : 0); unsigned AbbrevToUse = 0; Stream.EmitRecord(bitc::MODULE_CODE_FUNCTION, Vals, AbbrevToUse); |