mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-02 05:17:15 +00:00
Print out all globals as they are emitted, not just those emitted from
emitGlobals git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11191 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -454,9 +454,6 @@ void ExecutionEngine::emitGlobals() {
|
|||||||
// Allocate some memory for it!
|
// Allocate some memory for it!
|
||||||
unsigned Size = TD.getTypeSize(Ty);
|
unsigned Size = TD.getTypeSize(Ty);
|
||||||
addGlobalMapping(I, new char[Size]);
|
addGlobalMapping(I, new char[Size]);
|
||||||
|
|
||||||
DEBUG(std::cerr << "Global '" << I->getName() << "' -> "
|
|
||||||
<< getPointerToGlobal(I) << "\n");
|
|
||||||
} else {
|
} else {
|
||||||
// External variable reference. Try to use the dynamic loader to
|
// External variable reference. Try to use the dynamic loader to
|
||||||
// get a pointer to it.
|
// get a pointer to it.
|
||||||
@@ -482,6 +479,8 @@ void ExecutionEngine::emitGlobals() {
|
|||||||
// already in the map.
|
// already in the map.
|
||||||
void ExecutionEngine::EmitGlobalVariable(const GlobalVariable *GV) {
|
void ExecutionEngine::EmitGlobalVariable(const GlobalVariable *GV) {
|
||||||
void *GA = getPointerToGlobalIfAvailable(GV);
|
void *GA = getPointerToGlobalIfAvailable(GV);
|
||||||
|
DEBUG(std::cerr << "Global '" << GV->getName() << "' -> " << GA << "\n");
|
||||||
|
|
||||||
const Type *ElTy = GV->getType()->getElementType();
|
const Type *ElTy = GV->getType()->getElementType();
|
||||||
if (GA == 0) {
|
if (GA == 0) {
|
||||||
// If it's not already specified, allocate memory for the global.
|
// If it's not already specified, allocate memory for the global.
|
||||||
|
Reference in New Issue
Block a user