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 | 4a1ff2fb3ecaa2576ecf9ed84816b174c235ac1d (patch) | |
tree | 2c9024e14d2cac4981a2fb190a8c81913ea3af51 /lib/Target/ARM/ARMAsmPrinter.cpp | |
parent | f32a960fd32b32f84bb486458ccbc905af490da9 (diff) | |
download | llvm-4a1ff2fb3ecaa2576ecf9ed84816b174c235ac1d.tar.gz llvm-4a1ff2fb3ecaa2576ecf9ed84816b174c235ac1d.tar.bz2 llvm-4a1ff2fb3ecaa2576ecf9ed84816b174c235ac1d.tar.xz |
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>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150572 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMAsmPrinter.cpp')
-rw-r--r-- | lib/Target/ARM/ARMAsmPrinter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp index 234cf5166f..2297390f66 100644 --- a/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/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), |