diff options
| author | Roman Divacky <rdivacky@freebsd.org> | 2012-09-06 15:59:27 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@freebsd.org> | 2012-09-06 15:59:27 +0000 |
| commit | e637711ae013940dcee207d2ea19bbd629ccd2b3 (patch) | |
| tree | 026c3a08949486beaee43a0972a4fd7f63569118 /clang/lib/CodeGen/CGObjCMac.cpp | |
| parent | 4717a8d654a50af4aeb8bd926f9336a6a70d6255 (diff) | |
| download | bcm5719-llvm-e637711ae013940dcee207d2ea19bbd629ccd2b3.tar.gz bcm5719-llvm-e637711ae013940dcee207d2ea19bbd629ccd2b3.zip | |
Dont cast away const needlessly. Found by gcc48 -Wcast-qual.
llvm-svn: 163325
Diffstat (limited to 'clang/lib/CodeGen/CGObjCMac.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGObjCMac.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index ef802a3ed0c..9a61e34ab2e 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/lib/CodeGen/CGObjCMac.cpp @@ -1860,7 +1860,7 @@ llvm::Constant *CGObjCCommonMac::BuildGCBlockLayout(CodeGenModule &CGM, llvm::Constant *C = BuildIvarLayoutBitmap(BitMap); if (CGM.getLangOpts().ObjCGCBitmapPrint) { printf("\n block variable layout for block: "); - const unsigned char *s = (unsigned char*)BitMap.c_str(); + const unsigned char *s = (const unsigned char*)BitMap.c_str(); for (unsigned i = 0, e = BitMap.size(); i < e; i++) if (!(s[i] & 0xf0)) printf("0x0%x%s", s[i], s[i] != 0 ? ", " : ""); @@ -4187,7 +4187,7 @@ llvm::Constant *CGObjCCommonMac::BuildIvarLayout( printf("\n%s ivar layout for class '%s': ", ForStrongLayout ? "strong" : "weak", OMD->getClassInterface()->getName().data()); - const unsigned char *s = (unsigned char*)BitMap.c_str(); + const unsigned char *s = (const unsigned char*)BitMap.c_str(); for (unsigned i = 0, e = BitMap.size(); i < e; i++) if (!(s[i] & 0xf0)) printf("0x0%x%s", s[i], s[i] != 0 ? ", " : ""); |

