summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/RecordLayoutBuilder.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@freebsd.org>2012-09-06 15:59:27 +0000
committerRoman Divacky <rdivacky@freebsd.org>2012-09-06 15:59:27 +0000
commite637711ae013940dcee207d2ea19bbd629ccd2b3 (patch)
tree026c3a08949486beaee43a0972a4fd7f63569118 /clang/lib/AST/RecordLayoutBuilder.cpp
parent4717a8d654a50af4aeb8bd926f9336a6a70d6255 (diff)
downloadbcm5719-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/AST/RecordLayoutBuilder.cpp')
-rw-r--r--clang/lib/AST/RecordLayoutBuilder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/RecordLayoutBuilder.cpp b/clang/lib/AST/RecordLayoutBuilder.cpp
index fba23fb468a..6581df40468 100644
--- a/clang/lib/AST/RecordLayoutBuilder.cpp
+++ b/clang/lib/AST/RecordLayoutBuilder.cpp
@@ -2522,8 +2522,8 @@ ASTContext::getObjCLayout(const ObjCInterfaceDecl *D,
assert(D && D->isThisDeclarationADefinition() && "Invalid interface decl!");
// Look up this layout, if already laid out, return what we have.
- ObjCContainerDecl *Key =
- Impl ? (ObjCContainerDecl*) Impl : (ObjCContainerDecl*) D;
+ const ObjCContainerDecl *Key =
+ Impl ? (const ObjCContainerDecl*) Impl : (const ObjCContainerDecl*) D;
if (const ASTRecordLayout *Entry = ObjCLayouts[Key])
return *Entry;
OpenPOWER on IntegriCloud