mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
First try at a horrible global value reference wrapper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@701 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "llvm/Support/StringExtras.h" // itostr
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/SymbolTable.h"
|
||||
#include "llvm/GlobalVariable.h" // TODO make this GlobalValue.h
|
||||
#include <algorithm>
|
||||
#include <assert.h>
|
||||
|
||||
@@ -105,6 +106,12 @@ ConstPoolStruct::ConstPoolStruct(const StructType *T,
|
||||
|
||||
ConstPoolPointer::ConstPoolPointer(const PointerType *T) : ConstPoolVal(T) {}
|
||||
|
||||
ConstPoolPointerReference::ConstPoolPointerReference(GlobalVariable *GV)
|
||||
: ConstPoolPointer(GV->getType()) {
|
||||
Operands.push_back(Use(GV, this));
|
||||
}
|
||||
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// getStrValue implementations
|
||||
@@ -155,6 +162,10 @@ string ConstPoolPointer::getStrValue() const {
|
||||
return "null";
|
||||
}
|
||||
|
||||
string ConstPoolPointerReference::getStrValue() const {
|
||||
return "<pointer reference>";
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// isValueValidForType implementations
|
||||
|
||||
|
Reference in New Issue
Block a user