mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-02 19:24:25 +00:00
Miscellaneous cleanups:
* Convert post to pre-increment for for loops * Use generic programming more * Use new Value::cast* instructions * Use new Module, Method, & BasicBlock forwarding methods * Use new facilities in STLExtras.h * Use new Instruction::isPHINode() method git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -176,12 +176,11 @@ void SlotCalculator::insertVal(const Value *D) {
|
||||
// Insert node into table and NodeMap...
|
||||
NodeMap[D] = Table[Ty].size();
|
||||
|
||||
if (Typ == Type::TypeTy && // If it's a type constant, add the Type also
|
||||
D->getValueType() != Value::TypeVal) {
|
||||
assert(D->getValueType() == Value::ConstantVal &&
|
||||
"All Type instances should be constant types!");
|
||||
|
||||
const ConstPoolType *CPT = (const ConstPoolType*)D;
|
||||
if (Typ == Type::TypeTy && !D->isType()) {
|
||||
// If it's a type constant, add the Type also
|
||||
|
||||
// All Type instances should be constant types!
|
||||
const ConstPoolType *CPT = (const ConstPoolType*)D->castConstantAsserting();
|
||||
int Slot = getValSlot(CPT->getValue());
|
||||
if (Slot == -1) {
|
||||
// Only add if it's not already here!
|
||||
|
Reference in New Issue
Block a user