mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Revert a series of commits to MCJIT to get the build working in CMake
(and hopefully on Windows). The bots have been down most of the day because of this, and it's not clear to me what all will be required to fix it. The commits started with r153205, then r153207, r153208, and r153221. The first commit seems to be the real culprit, but I couldn't revert a smaller number of patches. When resubmitting, r153207 and r153208 should be folded into r153205, they were simple build fixes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153241 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -33,17 +33,46 @@ public:
|
||||
|
||||
uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
|
||||
unsigned SectionID) {
|
||||
return JMM->allocateSpace(Size, Alignment);
|
||||
return JMM->allocateDataSection(Size, Alignment, SectionID);
|
||||
}
|
||||
|
||||
uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
|
||||
unsigned SectionID) {
|
||||
return JMM->allocateSpace(Size, Alignment);
|
||||
return JMM->allocateCodeSection(Size, Alignment, SectionID);
|
||||
}
|
||||
|
||||
virtual void *getPointerToNamedFunction(const std::string &Name,
|
||||
bool AbortOnFailure = true) {
|
||||
return JMM->getPointerToNamedFunction(Name, AbortOnFailure);
|
||||
// Allocate ActualSize bytes, or more, for the named function. Return
|
||||
// a pointer to the allocated memory and update Size to reflect how much
|
||||
// memory was acutally allocated.
|
||||
uint8_t *startFunctionBody(const char *Name, uintptr_t &Size) {
|
||||
// FIXME: This should really reference the MCAsmInfo to get the global
|
||||
// prefix.
|
||||
if (Name[0] == '_') ++Name;
|
||||
Function *F = M->getFunction(Name);
|
||||
// Some ObjC names have a prefixed \01 in the IR. If we failed to find
|
||||
// the symbol and it's of the ObjC conventions (starts with "-" or
|
||||
// "+"), try prepending a \01 and see if we can find it that way.
|
||||
if (!F && (Name[0] == '-' || Name[0] == '+'))
|
||||
F = M->getFunction((Twine("\1") + Name).str());
|
||||
assert(F && "No matching function in JIT IR Module!");
|
||||
return JMM->startFunctionBody(F, Size);
|
||||
}
|
||||
|
||||
// Mark the end of the function, including how much of the allocated
|
||||
// memory was actually used.
|
||||
void endFunctionBody(const char *Name, uint8_t *FunctionStart,
|
||||
uint8_t *FunctionEnd) {
|
||||
// FIXME: This should really reference the MCAsmInfo to get the global
|
||||
// prefix.
|
||||
if (Name[0] == '_') ++Name;
|
||||
Function *F = M->getFunction(Name);
|
||||
// Some ObjC names have a prefixed \01 in the IR. If we failed to find
|
||||
// the symbol and it's of the ObjC conventions (starts with "-" or
|
||||
// "+"), try prepending a \01 and see if we can find it that way.
|
||||
if (!F && (Name[0] == '-' || Name[0] == '+'))
|
||||
F = M->getFunction((Twine("\1") + Name).str());
|
||||
assert(F && "No matching function in JIT IR Module!");
|
||||
JMM->endFunctionBody(F, FunctionStart, FunctionEnd);
|
||||
}
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user