summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-19 16:39:44 +0000
committerDan Gohman <gohman@apple.com>2010-04-19 16:39:44 +0000
commit145f3f1e83932a751ae434bafa42333d4cb2c157 (patch)
tree41277159366ba04f17145ce4e62d2377e2e046ff /clang/lib/CodeGen
parent3457061a66e23a884a34ff4274f01f96ba4867e9 (diff)
downloadbcm5719-llvm-145f3f1e83932a751ae434bafa42333d4cb2c157.tar.gz
bcm5719-llvm-145f3f1e83932a751ae434bafa42333d4cb2c157.zip
Fix -Wcast-qual warnings.
llvm-svn: 101786
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGObjCGNU.cpp3
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp
index fe99c6ef335..36162f7e5e5 100644
--- a/clang/lib/CodeGen/CGObjCGNU.cpp
+++ b/clang/lib/CodeGen/CGObjCGNU.cpp
@@ -2057,7 +2057,8 @@ llvm::GlobalVariable *CGObjCGNU::ObjCIvarOffsetVariable(
if (!IvarOffsetPointer) {
uint64_t Offset;
if (ObjCImplementationDecl *OID =
- CGM.getContext().getObjCImplementation((ObjCInterfaceDecl*)(ID)))
+ CGM.getContext().getObjCImplementation(
+ const_cast<ObjCInterfaceDecl *>(ID)))
Offset = ComputeIvarBaseOffset(CGM, OID, Ivar);
else
Offset = ComputeIvarBaseOffset(CGM, ID, Ivar);
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 035e57fd0b2..9cb27cc1010 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -718,7 +718,7 @@ void CodeGenModule::EmitGlobal(GlobalDecl GD) {
void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD) {
const ValueDecl *D = cast<ValueDecl>(GD.getDecl());
- PrettyStackTraceDecl CrashInfo((ValueDecl *)D, D->getLocation(),
+ PrettyStackTraceDecl CrashInfo(const_cast<ValueDecl *>(D), D->getLocation(),
Context.getSourceManager(),
"Generating code for declaration");
OpenPOWER on IntegriCloud