diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-02-15 09:14:08 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-02-15 09:14:08 +0000 |
commit | dfb45f4d684c00f58b4007a1bcf384bb1f191cac (patch) | |
tree | 6beb552cab6b75bca981bc29c7b134459364cc88 /llvm/lib | |
parent | 24e51b7f29154bf89426c6a3ab45a6ecdfa4f10a (diff) | |
download | bcm5719-llvm-dfb45f4d684c00f58b4007a1bcf384bb1f191cac.tar.gz bcm5719-llvm-dfb45f4d684c00f58b4007a1bcf384bb1f191cac.zip |
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
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/ARM/ARMAsmPrinter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp index 234cf5166fb..2297390f664 100644 --- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp @@ -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), |