aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCXX.cpp
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-08-07 18:05:12 +0000
committerMike Stump <mrs@apple.com>2009-08-07 18:05:12 +0000
commite607ed068334bacb8d7b093996b4671c6ca79e25 (patch)
treebd6c53391ec6c669eeef50714b44ec9d044c37d2 /lib/CodeGen/CGCXX.cpp
parentd0439688fea4dedc28125d246bbdec1f5a208660 (diff)
Fix some const_cast issues. This is the beginning of the rabbit hole.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78393 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r--lib/CodeGen/CGCXX.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index f1a5e1cca4..00993be161 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/lib/CodeGen/CGCXX.cpp
@@ -506,9 +506,7 @@ llvm::Constant *CodeGenFunction::GenerateRtti(const CXXRecordDecl *RD) {
llvm::SmallString<256> OutName;
llvm::raw_svector_ostream Out(OutName);
QualType ClassTy;
- // FIXME: What is the design on getTagDeclType when it requires casting
- // away const? mutable?
- ClassTy = getContext().getTagDeclType(const_cast<CXXRecordDecl*>(RD));
+ ClassTy = getContext().getTagDeclType(RD);
mangleCXXRtti(ClassTy, getContext(), Out);
const char *Name = OutName.c_str();
llvm::GlobalVariable::LinkageTypes linktype;
@@ -599,9 +597,7 @@ llvm::Value *CodeGenFunction::GenerateVtable(const CXXRecordDecl *RD) {
llvm::SmallString<256> OutName;
llvm::raw_svector_ostream Out(OutName);
QualType ClassTy;
- // FIXME: What is the design on getTagDeclType when it requires casting
- // away const? mutable?
- ClassTy = getContext().getTagDeclType(const_cast<CXXRecordDecl*>(RD));
+ ClassTy = getContext().getTagDeclType(RD);
mangleCXXVtable(ClassTy, getContext(), Out);
const char *Name = OutName.c_str();
llvm::GlobalVariable::LinkageTypes linktype;