mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
Add new method to check to see if a global is available
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6058 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -62,6 +62,14 @@ public:
|
|||||||
CurVal = Addr;
|
CurVal = Addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// getPointerToGlobalIfAvailable - This returns the address of the specified
|
||||||
|
// global value if it is available, otherwise it returns null.
|
||||||
|
//
|
||||||
|
void *getPointerToGlobalIfAvailable(const GlobalValue *GV) {
|
||||||
|
std::map<const GlobalValue*, void*>::iterator I = GlobalAddress.find(GV);
|
||||||
|
return I != GlobalAddress.end() ? I->second : 0;
|
||||||
|
}
|
||||||
|
|
||||||
// getPointerToGlobal - This returns the address of the specified global
|
// getPointerToGlobal - This returns the address of the specified global
|
||||||
// value. This may involve code generation if it's a function.
|
// value. This may involve code generation if it's a function.
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user