mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-28 06:24:57 +00:00
Check in fix for bug: test/Regression/Assembler/ValueRefineAbsType.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1582 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -8,7 +8,7 @@
|
|||||||
#include "llvm/InstrTypes.h"
|
#include "llvm/InstrTypes.h"
|
||||||
#include "llvm/SymbolTable.h"
|
#include "llvm/SymbolTable.h"
|
||||||
#include "llvm/SymTabValue.h"
|
#include "llvm/SymTabValue.h"
|
||||||
#include "llvm/Type.h"
|
#include "llvm/DerivedTypes.h"
|
||||||
#ifndef NDEBUG // Only in -g mode...
|
#ifndef NDEBUG // Only in -g mode...
|
||||||
#include "llvm/Assembly/Writer.h"
|
#include "llvm/Assembly/Writer.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -71,7 +71,9 @@ void Value::replaceAllUsesWith(Value *D) {
|
|||||||
// change Ty to point to the right type. :)
|
// change Ty to point to the right type. :)
|
||||||
//
|
//
|
||||||
void Value::refineAbstractType(const DerivedType *OldTy, const Type *NewTy) {
|
void Value::refineAbstractType(const DerivedType *OldTy, const Type *NewTy) {
|
||||||
assert(Ty.get() == (const Type*)OldTy &&"Can't refine anything but my type!");
|
assert(Ty.get() == OldTy &&"Can't refine anything but my type!");
|
||||||
|
if (OldTy == NewTy && !OldTy->isAbstract())
|
||||||
|
Ty.removeUserFromConcrete();
|
||||||
Ty = NewTy;
|
Ty = NewTy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user