[cfe-commits] r90334 - in /cfe/trunk: include/clang/Basic/LangOptions.h lib/CodeGen/CGException.cpp lib/CodeGen/CGExprCXX.cpp lib/CodeGen/CGRTTI.cpp lib/CodeGen/CGVtable.cpp lib/CodeGen/CodeGenModule.h lib/CodeGen/Mangle.cpp lib/CodeGen/Mangle.h lib/Frontend/CompilerInvocation.cpp tools/clang-cc/Options.cpp
Mike Stump
mrs at apple.com
Wed Dec 2 10:57:10 PST 2009
Author: mrs
Date: Wed Dec 2 12:57:08 2009
New Revision: 90334
URL: http://llvm.org/viewvc/llvm-project?rev=90334&view=rev
Log:
Change rtti/Rtti to RTTI, as it is an acronym.
Modified:
cfe/trunk/include/clang/Basic/LangOptions.h
cfe/trunk/lib/CodeGen/CGException.cpp
cfe/trunk/lib/CodeGen/CGExprCXX.cpp
cfe/trunk/lib/CodeGen/CGRTTI.cpp
cfe/trunk/lib/CodeGen/CGVtable.cpp
cfe/trunk/lib/CodeGen/CodeGenModule.h
cfe/trunk/lib/CodeGen/Mangle.cpp
cfe/trunk/lib/CodeGen/Mangle.h
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
cfe/trunk/tools/clang-cc/Options.cpp
Modified: cfe/trunk/include/clang/Basic/LangOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/LangOptions.h?rev=90334&r1=90333&r2=90334&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/LangOptions.h (original)
+++ cfe/trunk/include/clang/Basic/LangOptions.h Wed Dec 2 12:57:08 2009
@@ -46,7 +46,7 @@
unsigned LaxVectorConversions : 1;
unsigned AltiVec : 1; // Support AltiVec-style vector initializers.
unsigned Exceptions : 1; // Support exception handling.
- unsigned Rtti : 1; // Support rtti information.
+ unsigned RTTI : 1; // Support RTTI information.
unsigned NeXTRuntime : 1; // Use NeXT runtime.
unsigned Freestanding : 1; // Freestanding implementation
@@ -125,7 +125,7 @@
CXXOperatorNames = PascalStrings = WritableStrings = 0;
Exceptions = Freestanding = NoBuiltin = 0;
NeXTRuntime = 1;
- Rtti = 1;
+ RTTI = 1;
LaxVectorConversions = 1;
HeinousExtensions = 0;
AltiVec = OpenCL = StackProtector = 0;
Modified: cfe/trunk/lib/CodeGen/CGException.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGException.cpp?rev=90334&r1=90333&r2=90334&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGException.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGException.cpp Wed Dec 2 12:57:08 2009
@@ -240,7 +240,7 @@
// Now throw the exception.
const llvm::Type *Int8PtrTy = llvm::Type::getInt8PtrTy(getLLVMContext());
- llvm::Constant *TypeInfo = CGM.GenerateRtti(ThrowType);
+ llvm::Constant *TypeInfo = CGM.GenerateRTTI(ThrowType);
llvm::Constant *Dtor = llvm::Constant::getNullValue(Int8PtrTy);
llvm::CallInst *ThrowCall =
@@ -311,7 +311,8 @@
const CXXCatchStmt *C = S.getHandler(i);
VarDecl *CatchParam = C->getExceptionDecl();
if (CatchParam) {
- llvm::Value *EHType = CGM.GenerateRtti(C->getCaughtType().getNonReferenceType());
+ llvm::Value *EHType
+ = CGM.GenerateRTTI(C->getCaughtType().getNonReferenceType());
SelectorArgs.push_back(EHType);
} else {
// null indicates catch all
Modified: cfe/trunk/lib/CodeGen/CGExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprCXX.cpp?rev=90334&r1=90333&r2=90334&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprCXX.cpp Wed Dec 2 12:57:08 2009
@@ -359,10 +359,10 @@
if (const RecordType *RT = Ty->getAs<RecordType>()) {
const CXXRecordDecl *RD = cast<CXXRecordDecl>(RT->getDecl());
if (RD->isPolymorphic())
- return Builder.CreateBitCast(CGM.GenerateRttiRef(RD), LTy);
- return Builder.CreateBitCast(CGM.GenerateRtti(RD), LTy);
+ return Builder.CreateBitCast(CGM.GenerateRTTIRef(RD), LTy);
+ return Builder.CreateBitCast(CGM.GenerateRTTI(RD), LTy);
}
- return Builder.CreateBitCast(CGM.GenerateRtti(Ty), LTy);
+ return Builder.CreateBitCast(CGM.GenerateRTTI(Ty), LTy);
}
Expr *subE = E->getExprOperand();
Ty = subE->getType();
@@ -404,9 +404,9 @@
V = Builder.CreateLoad(V);
return V;
}
- return Builder.CreateBitCast(CGM.GenerateRtti(RD), LTy);
+ return Builder.CreateBitCast(CGM.GenerateRTTI(RD), LTy);
}
- return Builder.CreateBitCast(CGM.GenerateRtti(Ty), LTy);
+ return Builder.CreateBitCast(CGM.GenerateRTTI(Ty), LTy);
}
llvm::Value *CodeGenFunction::EmitDynamicCast(llvm::Value *V,
@@ -485,8 +485,8 @@
// FIXME: Calculate better hint.
llvm::Value *hint = llvm::ConstantInt::get(PtrDiffTy, -1ULL);
- llvm::Value *SrcArg = CGM.GenerateRttiRef(SrcTy);
- llvm::Value *DstArg = CGM.GenerateRttiRef(DstTy);
+ llvm::Value *SrcArg = CGM.GenerateRTTIRef(SrcTy);
+ llvm::Value *DstArg = CGM.GenerateRTTIRef(DstTy);
V = Builder.CreateBitCast(V, PtrToInt8Ty);
V = Builder.CreateCall4(CGM.CreateRuntimeFunction(FTy, "__dynamic_cast"),
V, SrcArg, DstArg, hint);
Modified: cfe/trunk/lib/CodeGen/CGRTTI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGRTTI.cpp?rev=90334&r1=90333&r2=90334&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGRTTI.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGRTTI.cpp Wed Dec 2 12:57:08 2009
@@ -1,4 +1,4 @@
-//===--- CGCXXRtti.cpp - Emit LLVM Code for C++ RTTI descriptors ----------===//
+//===--- CGCXXRTTI.cpp - Emit LLVM Code for C++ RTTI descriptors ----------===//
//
// The LLVM Compiler Infrastructure
//
@@ -17,14 +17,14 @@
using namespace clang;
using namespace CodeGen;
-class RttiBuilder {
+class RTTIBuilder {
CodeGenModule &CGM; // Per-module state.
llvm::LLVMContext &VMContext;
const llvm::Type *Int8PtrTy;
llvm::SmallSet<const CXXRecordDecl *, 16> SeenVBase;
llvm::SmallSet<const CXXRecordDecl *, 32> SeenBase;
public:
- RttiBuilder(CodeGenModule &cgm)
+ RTTIBuilder(CodeGenModule &cgm)
: CGM(cgm), VMContext(cgm.getModule().getContext()),
Int8PtrTy(llvm::Type::getInt8PtrTy(VMContext)) { }
@@ -49,7 +49,7 @@
llvm::Constant *BuildName(QualType Ty, bool Hidden, bool Extern) {
llvm::SmallString<256> OutName;
- CGM.getMangleContext().mangleCXXRttiName(Ty, OutName);
+ CGM.getMangleContext().mangleCXXRTTIName(Ty, OutName);
llvm::StringRef Name = OutName.str();
llvm::GlobalVariable::LinkageTypes linktype;
@@ -94,11 +94,11 @@
llvm::Constant *BuildTypeRef(QualType Ty) {
llvm::Constant *C;
- if (!CGM.getContext().getLangOptions().Rtti)
+ if (!CGM.getContext().getLangOptions().RTTI)
return llvm::Constant::getNullValue(Int8PtrTy);
llvm::SmallString<256> OutName;
- CGM.getMangleContext().mangleCXXRtti(Ty, OutName);
+ CGM.getMangleContext().mangleCXXRTTI(Ty, OutName);
llvm::StringRef Name = OutName.str();
C = CGM.getModule().getGlobalVariable(Name);
@@ -186,13 +186,13 @@
llvm::Constant *Buildclass_type_info(const CXXRecordDecl *RD) {
- if (!CGM.getContext().getLangOptions().Rtti)
+ if (!CGM.getContext().getLangOptions().RTTI)
return llvm::Constant::getNullValue(Int8PtrTy);
llvm::Constant *C;
llvm::SmallString<256> OutName;
- CGM.getMangleContext().mangleCXXRtti(CGM.getContext().getTagDeclType(RD),
+ CGM.getMangleContext().mangleCXXRTTI(CGM.getContext().getTagDeclType(RD),
OutName);
llvm::StringRef Name = OutName.str();
@@ -230,7 +230,7 @@
e = RD->bases_end(); i != e; ++i) {
const CXXRecordDecl *Base =
cast<CXXRecordDecl>(i->getType()->getAs<RecordType>()->getDecl());
- info.push_back(CGM.GenerateRttiRef(Base));
+ info.push_back(CGM.GenerateRTTIRef(Base));
if (simple)
break;
int64_t offset;
@@ -287,7 +287,7 @@
llvm::Constant *C;
llvm::SmallString<256> OutName;
- CGM.getMangleContext().mangleCXXRtti(Ty, OutName);
+ CGM.getMangleContext().mangleCXXRTTI(Ty, OutName);
llvm::StringRef Name = OutName.str();
llvm::GlobalVariable *GV;
@@ -340,7 +340,7 @@
llvm::Constant *C;
llvm::SmallString<256> OutName;
- CGM.getMangleContext().mangleCXXRtti(Ty, OutName);
+ CGM.getMangleContext().mangleCXXRTTI(Ty, OutName);
llvm::StringRef Name = OutName.str();
llvm::GlobalVariable *GV;
@@ -407,20 +407,20 @@
}
};
-llvm::Constant *CodeGenModule::GenerateRttiRef(const CXXRecordDecl *RD) {
- RttiBuilder b(*this);
+llvm::Constant *CodeGenModule::GenerateRTTIRef(const CXXRecordDecl *RD) {
+ RTTIBuilder b(*this);
return b.Buildclass_type_infoRef(RD);
}
-llvm::Constant *CodeGenModule::GenerateRtti(const CXXRecordDecl *RD) {
- RttiBuilder b(*this);
+llvm::Constant *CodeGenModule::GenerateRTTI(const CXXRecordDecl *RD) {
+ RTTIBuilder b(*this);
return b.Buildclass_type_info(RD);
}
-llvm::Constant *CodeGenModule::GenerateRtti(QualType Ty) {
- RttiBuilder b(*this);
+llvm::Constant *CodeGenModule::GenerateRTTI(QualType Ty) {
+ RTTIBuilder b(*this);
return b.BuildType(Ty);
}
Modified: cfe/trunk/lib/CodeGen/CGVtable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVtable.cpp?rev=90334&r1=90333&r2=90334&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Wed Dec 2 12:57:08 2009
@@ -147,7 +147,7 @@
const CXXRecordDecl *l, uint64_t lo, CodeGenModule &cgm)
: methods(meth), Class(c), LayoutClass(l), LayoutOffset(lo),
BLayout(cgm.getContext().getASTRecordLayout(l)),
- rtti(cgm.GenerateRttiRef(c)), VMContext(cgm.getModule().getContext()),
+ rtti(cgm.GenerateRTTIRef(c)), VMContext(cgm.getModule().getContext()),
CGM(cgm), PureVirtualFn(0),subAddressPoints(AllocAddressPoint(cgm, l, c)),
Extern(!l->isInAnonymousNamespace()),
LLVMPointerWidth(cgm.getContext().Target.getPointerWidth(0)) {
@@ -1305,7 +1305,7 @@
void CGVtableInfo::GenerateClassData(const CXXRecordDecl *RD) {
Vtables[RD] = CGM.GenerateVtable(RD, RD);
- CGM.GenerateRtti(RD);
+ CGM.GenerateRTTI(RD);
CGM.GenerateVTT(RD);
}
@@ -1327,7 +1327,7 @@
}
if (CreateDefinition) {
- CGM.GenerateRtti(RD);
+ CGM.GenerateRTTI(RD);
CGM.GenerateVTT(RD);
}
return vtbl;
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.h?rev=90334&r1=90333&r2=90334&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.h Wed Dec 2 12:57:08 2009
@@ -224,14 +224,14 @@
/// GenerateVTT - Generate the VTT for the given type.
llvm::Constant *GenerateVTT(const CXXRecordDecl *RD);
- /// GenerateRtti - Generate the rtti information for the given type.
- llvm::Constant *GenerateRtti(const CXXRecordDecl *RD);
- /// GenerateRttiRef - Generate a reference to the rtti information for the
+ /// GenerateRTTI - Generate the rtti information for the given type.
+ llvm::Constant *GenerateRTTI(const CXXRecordDecl *RD);
+ /// GenerateRTTIRef - Generate a reference to the rtti information for the
/// given type.
- llvm::Constant *GenerateRttiRef(const CXXRecordDecl *RD);
- /// GenerateRttiNonClass - Generate the rtti information for the given
+ llvm::Constant *GenerateRTTIRef(const CXXRecordDecl *RD);
+ /// GenerateRTTINonClass - Generate the rtti information for the given
/// non-class type.
- llvm::Constant *GenerateRtti(QualType Ty);
+ llvm::Constant *GenerateRTTI(QualType Ty);
/// BuildThunk - Build a thunk for the given method.
llvm::Constant *BuildThunk(const CXXMethodDecl *MD, bool Extern,
Modified: cfe/trunk/lib/CodeGen/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.cpp?rev=90334&r1=90333&r2=90334&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Wed Dec 2 12:57:08 2009
@@ -1434,7 +1434,7 @@
Mangler.mangleName(Type);
}
-void MangleContext::mangleCXXRtti(QualType Ty,
+void MangleContext::mangleCXXRTTI(QualType Ty,
llvm::SmallVectorImpl<char> &Res) {
// <special-name> ::= TI <type> # typeinfo structure
CXXNameMangler Mangler(*this, Res);
@@ -1442,7 +1442,7 @@
Mangler.mangleType(Ty);
}
-void MangleContext::mangleCXXRttiName(QualType Ty,
+void MangleContext::mangleCXXRTTIName(QualType Ty,
llvm::SmallVectorImpl<char> &Res) {
// <special-name> ::= TS <type> # typeinfo name (null terminated byte string)
CXXNameMangler Mangler(*this, Res);
Modified: cfe/trunk/lib/CodeGen/Mangle.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.h?rev=90334&r1=90333&r2=90334&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.h (original)
+++ cfe/trunk/lib/CodeGen/Mangle.h Wed Dec 2 12:57:08 2009
@@ -76,8 +76,8 @@
void mangleCXXCtorVtable(const CXXRecordDecl *RD, int64_t Offset,
const CXXRecordDecl *Type,
llvm::SmallVectorImpl<char> &);
- void mangleCXXRtti(QualType T, llvm::SmallVectorImpl<char> &);
- void mangleCXXRttiName(QualType T, llvm::SmallVectorImpl<char> &);
+ void mangleCXXRTTI(QualType T, llvm::SmallVectorImpl<char> &);
+ void mangleCXXRTTIName(QualType T, llvm::SmallVectorImpl<char> &);
void mangleCXXCtor(const CXXConstructorDecl *D, CXXCtorType Type,
llvm::SmallVectorImpl<char> &);
void mangleCXXDtor(const CXXDestructorDecl *D, CXXDtorType Type,
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=90334&r1=90333&r2=90334&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Wed Dec 2 12:57:08 2009
@@ -445,7 +445,7 @@
Res.push_back("-faltivec");
if (Opts.Exceptions)
Res.push_back("-fexceptions");
- if (!Opts.Rtti)
+ if (!Opts.RTTI)
Res.push_back("-fno-rtti");
if (!Opts.NeXTRuntime)
Res.push_back("-fgnu-runtime");
@@ -1115,7 +1115,7 @@
if (Args.hasArg(OPT_fno_lax_vector_conversions))
Opts.LaxVectorConversions = 0;
Opts.Exceptions = Args.hasArg(OPT_fexceptions);
- Opts.Rtti = !Args.hasArg(OPT_fno_rtti);
+ Opts.RTTI = !Args.hasArg(OPT_fno_rtti);
Opts.Blocks = Args.hasArg(OPT_fblocks);
Opts.CharIsSigned = !Args.hasArg(OPT_fno_signed_char);
Opts.ShortWChar = Args.hasArg(OPT_fshort_wchar);
Modified: cfe/trunk/tools/clang-cc/Options.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/Options.cpp?rev=90334&r1=90333&r2=90334&view=diff
==============================================================================
--- cfe/trunk/tools/clang-cc/Options.cpp (original)
+++ cfe/trunk/tools/clang-cc/Options.cpp Wed Dec 2 12:57:08 2009
@@ -596,7 +596,7 @@
"string literals"));
static llvm::cl::opt<bool>
-NoRtti("fno-rtti",
+NoRTTI("fno-rtti",
llvm::cl::desc("Disable generation of rtti information"));
static llvm::cl::opt<bool>
@@ -1193,7 +1193,7 @@
if (NoLaxVectorConversions.getPosition())
Options.LaxVectorConversions = 0;
Options.Exceptions = Exceptions;
- Options.Rtti = !NoRtti;
+ Options.RTTI = !NoRTTI;
Options.Blocks = EnableBlocks;
Options.CharIsSigned = !NoSignedChar;
if (ShortWChar.getPosition())
More information about the cfe-commits
mailing list