mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
A quick and ugly hack to fix PR345. I used TypeTy specifically to make
Reid cringe :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13788 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
94c43590ef
commit
42fbc7e809
@ -515,7 +515,13 @@ static bool setValueName(Value *V, char *NameStr) {
|
|||||||
CurFun.CurrentFunction->getSymbolTable() :
|
CurFun.CurrentFunction->getSymbolTable() :
|
||||||
CurModule.CurrentModule->getSymbolTable();
|
CurModule.CurrentModule->getSymbolTable();
|
||||||
|
|
||||||
Value *Existing = ST.lookup(V->getType(), Name);
|
Value *Existing;
|
||||||
|
// FIXME: this is really gross
|
||||||
|
if (V->getType() != Type::TypeTy)
|
||||||
|
Existing = ST.lookup(V->getType(), Name);
|
||||||
|
else
|
||||||
|
Existing = ST.lookupType(Name);
|
||||||
|
|
||||||
if (Existing) { // Inserting a name that is already defined???
|
if (Existing) { // Inserting a name that is already defined???
|
||||||
// There is only one case where this is allowed: when we are refining an
|
// There is only one case where this is allowed: when we are refining an
|
||||||
// opaque type. In this case, Existing will be an opaque type.
|
// opaque type. In this case, Existing will be an opaque type.
|
||||||
|
Loading…
Reference in New Issue
Block a user