mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage - Minimize redundant isa<GlobalValue> usage - Correct isa<Constant> for GlobalValue subclass - Remove tabs - Fix coments refering to ConstantPointerRef git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14937 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e253cf60fd
commit
3271ed554a
@ -79,7 +79,7 @@ static struct PerModuleInfo {
|
||||
// GlobalRefs - This maintains a mapping between <Type, ValID>'s and forward
|
||||
// references to global values. Global values may be referenced before they
|
||||
// are defined, and if so, the temporary object that they represent is held
|
||||
// here. This is used for forward references of ConstantPointerRefs.
|
||||
// here. This is used for forward references of GlobalValues.
|
||||
//
|
||||
typedef std::map<std::pair<const PointerType *,
|
||||
ValID>, GlobalValue*> GlobalRefsType;
|
||||
@ -1195,7 +1195,7 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr
|
||||
ThrowException("Global const reference must be a pointer type!");
|
||||
|
||||
// ConstExprs can exist in the body of a function, thus creating
|
||||
// ConstantPointerRefs whenever they refer to a variable. Because we are in
|
||||
// GlobalValues whenever they refer to a variable. Because we are in
|
||||
// the context of a function, getValNonImprovising will search the functions
|
||||
// symbol table instead of the module symbol table for the global symbol,
|
||||
// which throws things all off. To get around this, we just tell
|
||||
@ -1245,8 +1245,7 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr
|
||||
}
|
||||
}
|
||||
|
||||
GlobalValue *GV = cast<GlobalValue>(V);
|
||||
$$ = ConstantPointerRef::get(GV);
|
||||
$$ = cast<GlobalValue>(V);
|
||||
delete $1; // Free the type handle
|
||||
}
|
||||
| Types ConstExpr {
|
||||
|
Loading…
Reference in New Issue
Block a user