mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-05 10:57:32 +00:00
Strip the pointer casts from the constants here.
The c'tor list is stored as a list of 'void ()*'s, so all of the functions are bitcast to that. However, the dyn_cast doesn't automagically look through bitcasts. Do that for it. <rdar://problem/10813350> llvm-svn: 150572
This commit is contained in:
parent
6be42e9898
commit
bfa476ff56
@ -302,7 +302,7 @@ void ARMAsmPrinter::EmitXXStructor(const Constant *CV) {
|
||||
uint64_t Size = TM.getTargetData()->getTypeAllocSize(CV->getType());
|
||||
assert(Size && "C++ constructor pointer had zero size!");
|
||||
|
||||
const GlobalValue *GV = dyn_cast<GlobalValue>(CV);
|
||||
const GlobalValue *GV = dyn_cast<GlobalValue>(CV->stripPointerCasts());
|
||||
assert(GV && "C++ constructor pointer was not a GlobalValue!");
|
||||
|
||||
const MCExpr *E = MCSymbolRefExpr::Create(Mang->getSymbol(GV),
|
||||
|
Loading…
x
Reference in New Issue
Block a user