mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-11 08:29:25 +00:00
Implement function prefix data as an IR feature.
Previous discussion: http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/063909.html Differential Revision: http://llvm-reviews.chandlerc.com/D1191 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190773 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -632,7 +632,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, linkage, paramattrs, alignment,
|
||||
// section, visibility, gc, unnamed_addr]
|
||||
// section, visibility, gc, unnamed_addr, prefix]
|
||||
Vals.push_back(VE.getTypeID(F->getType()));
|
||||
Vals.push_back(F->getCallingConv());
|
||||
Vals.push_back(F->isDeclaration());
|
||||
@@ -643,6 +643,8 @@ static void WriteModuleInfo(const Module *M, const ValueEnumerator &VE,
|
||||
Vals.push_back(getEncodedVisibility(F));
|
||||
Vals.push_back(F->hasGC() ? GCMap[F->getGC()] : 0);
|
||||
Vals.push_back(F->hasUnnamedAddr());
|
||||
Vals.push_back(F->hasPrefixData() ? (VE.getValueID(F->getPrefixData()) + 1)
|
||||
: 0);
|
||||
|
||||
unsigned AbbrevToUse = 0;
|
||||
Stream.EmitRecord(bitc::MODULE_CODE_FUNCTION, Vals, AbbrevToUse);
|
||||
@@ -1863,6 +1865,8 @@ static void WriteModuleUseLists(const Module *M, ValueEnumerator &VE,
|
||||
WriteUseList(FI, VE, Stream);
|
||||
if (!FI->isDeclaration())
|
||||
WriteFunctionUseList(FI, VE, Stream);
|
||||
if (FI->hasPrefixData())
|
||||
WriteUseList(FI->getPrefixData(), VE, Stream);
|
||||
}
|
||||
|
||||
// Write the aliases.
|
||||
|
Reference in New Issue
Block a user