[cfe-commits] r71937 - in /cfe/trunk/lib/CodeGen: CGBlocks.cpp CGCXX.cpp CGCall.cpp CGExpr.cpp CGExprAgg.cpp CGExprConstant.cpp CGObjC.cpp CGObjCMac.cpp CGObjCRuntime.h CGValue.h CodeGenFunction.cpp CodeGenModule.cpp Mangle.cpp
Mike Stump
mrs at apple.com
Sat May 16 00:58:09 PDT 2009
Author: mrs
Date: Sat May 16 02:57:57 2009
New Revision: 71937
URL: http://llvm.org/viewvc/llvm-project?rev=71937&view=rev
Log:
Reflow some comments.
Modified:
cfe/trunk/lib/CodeGen/CGBlocks.cpp
cfe/trunk/lib/CodeGen/CGCXX.cpp
cfe/trunk/lib/CodeGen/CGCall.cpp
cfe/trunk/lib/CodeGen/CGExpr.cpp
cfe/trunk/lib/CodeGen/CGExprAgg.cpp
cfe/trunk/lib/CodeGen/CGExprConstant.cpp
cfe/trunk/lib/CodeGen/CGObjC.cpp
cfe/trunk/lib/CodeGen/CGObjCMac.cpp
cfe/trunk/lib/CodeGen/CGObjCRuntime.h
cfe/trunk/lib/CodeGen/CGValue.h
cfe/trunk/lib/CodeGen/CodeGenFunction.cpp
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
cfe/trunk/lib/CodeGen/Mangle.cpp
Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBlocks.cpp?rev=71937&r1=71936&r2=71937&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBlocks.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBlocks.cpp Sat May 16 02:57:57 2009
@@ -133,8 +133,8 @@
BlockHasCopyDispose |= subBlockHasCopyDispose;
Elts[3] = Fn;
- // FIXME: Don't use BlockHasCopyDispose, it is set more often then necessary, for
- // example: { ^{ __block int i; ^{ i = 1; }(); }(); }
+ // FIXME: Don't use BlockHasCopyDispose, it is set more often then
+ // necessary, for example: { ^{ __block int i; ^{ i = 1; }(); }(); }
if (subBlockHasCopyDispose)
flags |= BLOCK_HAS_COPY_DISPOSE;
Modified: cfe/trunk/lib/CodeGen/CGCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCXX.cpp?rev=71937&r1=71936&r2=71937&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXX.cpp Sat May 16 02:57:57 2009
@@ -131,6 +131,8 @@
"Must be in a C++ member function decl to load 'this'");
// FIXME: What if we're inside a block?
+ // ans: See how CodeGenFunction::LoadObjCSelf() uses
+ // CodeGenFunction::BlockForwardSelf() for how to do this.
return Builder.CreateLoad(LocalDeclMap[CXXThisDecl], "this");
}
Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=71937&r1=71936&r2=71937&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Sat May 16 02:57:57 2009
@@ -258,10 +258,9 @@
if (!is32Or64BitBasicType(FD->getType(), Context))
return false;
- // FIXME: Reject bit-fields wholesale; there are two problems, we
- // don't know how to expand them yet, and the predicate for
- // telling if a bitfield still counts as "basic" is more
- // complicated than what we were doing previously.
+ // FIXME: Reject bit-fields wholesale; there are two problems, we don't know
+ // how to expand them yet, and the predicate for telling if a bitfield still
+ // counts as "basic" is more complicated than what we were doing previously.
if (FD->isBitField())
return false;
}
@@ -430,8 +429,8 @@
return ABIArgInfo::getCoerce(llvm::Type::DoubleTy);
}
} else if (SeltTy->isPointerType()) {
- // FIXME: It would be really nice if this could come out as
- // the proper pointer type.
+ // FIXME: It would be really nice if this could come out as the proper
+ // pointer type.
llvm::Type *PtrTy =
llvm::PointerType::getUnqual(llvm::Type::Int8Ty);
return ABIArgInfo::getCoerce(PtrTy);
@@ -566,11 +565,10 @@
/// that \arg CoerceTo would be passed, but while keeping the
/// emitted code as simple as possible.
///
- /// FIXME: Note, this should be cleaned up to just take an
- /// enumeration of all the ways we might want to pass things,
- /// instead of constructing an LLVM type. This makes this code more
- /// explicit, and it makes it clearer that we are also doing this
- /// for correctness in the case of passing scalar types.
+ /// FIXME: Note, this should be cleaned up to just take an enumeration of all
+ /// the ways we might want to pass things, instead of constructing an LLVM
+ /// type. This makes this code more explicit, and it makes it clearer that we
+ /// are also doing this for correctness in the case of passing scalar types.
ABIArgInfo getCoerceResult(QualType Ty,
const llvm::Type *CoerceTo,
ASTContext &Context) const;
@@ -637,13 +635,13 @@
ASTContext &Context,
uint64_t OffsetBase,
Class &Lo, Class &Hi) const {
- // FIXME: This code can be simplified by introducing a simple value
- // class for Class pairs with appropriate constructor methods for
- // the various situations.
-
- // FIXME: Some of the split computations are wrong; unaligned
- // vectors shouldn't be passed in registers for example, so there is
- // no chance they can straddle an eightbyte. Verify & simplify.
+ // FIXME: This code can be simplified by introducing a simple value class for
+ // Class pairs with appropriate constructor methods for the various
+ // situations.
+
+ // FIXME: Some of the split computations are wrong; unaligned vectors
+ // shouldn't be passed in registers for example, so there is no chance they
+ // can straddle an eightbyte. Verify & simplify.
Lo = Hi = NoClass;
@@ -862,8 +860,8 @@
return ABIArgInfo::getDirect();
} else if (CoerceTo == llvm::Type::DoubleTy) {
- // FIXME: It would probably be better to make CGFunctionInfo only
- // map using canonical types than to canonize here.
+ // FIXME: It would probably be better to make CGFunctionInfo only map using
+ // canonical types than to canonize here.
QualType CTy = Context.getCanonicalType(Ty);
// Float and double end up in a single SSE reg.
@@ -1198,11 +1196,10 @@
// in different register classes or requires an alignment greater
// than 8 for general purpose registers and 16 for XMM registers.
//
- // FIXME: This really results in shameful code when we end up
- // needing to collect arguments from different places; often what
- // should result in a simple assembling of a structure from
- // scattered addresses has many more loads than necessary. Can we
- // clean this up?
+ // FIXME: This really results in shameful code when we end up needing to
+ // collect arguments from different places; often what should result in a
+ // simple assembling of a structure from scattered addresses has many more
+ // loads than necessary. Can we clean this up?
const llvm::Type *LTy = CGF.ConvertTypeForMem(Ty);
llvm::Value *RegAddr =
CGF.Builder.CreateLoad(CGF.Builder.CreateStructGEP(VAListAddr, 3),
@@ -1363,8 +1360,8 @@
if (!CodeGenFunction::hasAggregateLLVMType(Ty)) {
return ABIArgInfo::getDirect();
}
- // FIXME: This is kind of nasty... but there isn't much choice
- // because the ARM backend doesn't support byval.
+ // FIXME: This is kind of nasty... but there isn't much choice because the ARM
+ // backend doesn't support byval.
// FIXME: This doesn't handle alignment > 64 bits.
const llvm::Type* ElemTy;
unsigned SizeRegs;
@@ -1579,13 +1576,12 @@
// If load is legal, just bitcast the src pointer.
if (SrcSize >= DstSize) {
- // Generally SrcSize is never greater than DstSize, since this
- // means we are losing bits. However, this can happen in cases
- // where the structure has additional padding, for example due to
- // a user specified alignment.
+ // Generally SrcSize is never greater than DstSize, since this means we are
+ // losing bits. However, this can happen in cases where the structure has
+ // additional padding, for example due to a user specified alignment.
//
- // FIXME: Assert that we aren't truncating non-padding bits when
- // have access to that information.
+ // FIXME: Assert that we aren't truncating non-padding bits when have access
+ // to that information.
llvm::Value *Casted =
CGF.Builder.CreateBitCast(SrcPtr, llvm::PointerType::getUnqual(Ty));
llvm::LoadInst *Load = CGF.Builder.CreateLoad(Casted);
@@ -1623,13 +1619,12 @@
// If store is legal, just bitcast the src pointer.
if (SrcSize >= DstSize) {
- // Generally SrcSize is never greater than DstSize, since this
- // means we are losing bits. However, this can happen in cases
- // where the structure has additional padding, for example due to
- // a user specified alignment.
+ // Generally SrcSize is never greater than DstSize, since this means we are
+ // losing bits. However, this can happen in cases where the structure has
+ // additional padding, for example due to a user specified alignment.
//
- // FIXME: Assert that we aren't truncating non-padding bits when
- // have access to that information.
+ // FIXME: Assert that we aren't truncating non-padding bits when have access
+ // to that information.
llvm::Value *Casted =
CGF.Builder.CreateBitCast(DstPtr, llvm::PointerType::getUnqual(SrcTy));
// FIXME: Use better alignment / avoid requiring aligned store.
@@ -1824,9 +1819,9 @@
case ABIArgInfo::Expand: {
std::vector<const llvm::Type*> Tys;
- // FIXME: This is rather inefficient. Do we ever actually need
- // to do anything here? The result should be just reconstructed
- // on the other side, so extension should be a non-issue.
+ // FIXME: This is rather inefficient. Do we ever actually need to do
+ // anything here? The result should be just reconstructed on the other
+ // side, so extension should be a non-issue.
getTypes().GetExpandedTypes(ParamType, Tys);
Index += Tys.size();
continue;
@@ -1844,8 +1839,8 @@
void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI,
llvm::Function *Fn,
const FunctionArgList &Args) {
- // FIXME: We no longer need the types from FunctionArgList; lift up
- // and simplify.
+ // FIXME: We no longer need the types from FunctionArgList; lift up and
+ // simplify.
// Emit allocs for param decls. Give the LLVM Argument nodes names.
llvm::Function::arg_iterator AI = Fn->arg_begin();
@@ -1936,10 +1931,9 @@
case ABIArgInfo::Coerce: {
assert(AI != Fn->arg_end() && "Argument mismatch!");
- // FIXME: This is very wasteful; EmitParmDecl is just going to
- // drop the result in a new alloca anyway, so we could just
- // store into that directly if we broke the abstraction down
- // more.
+ // FIXME: This is very wasteful; EmitParmDecl is just going to drop the
+ // result in a new alloca anyway, so we could just store into that
+ // directly if we broke the abstraction down more.
llvm::Value *V = CreateTempAlloca(ConvertTypeForMem(Ty), "coerce");
CreateCoercedStore(AI, V, *this);
// Match to what EmitParmDecl is expecting for this type.
@@ -2016,8 +2010,7 @@
llvm::Value *Callee,
const CallArgList &CallArgs,
const Decl *TargetDecl) {
- // FIXME: We no longer need the types from CallArgs; lift up and
- // simplify.
+ // FIXME: We no longer need the types from CallArgs; lift up and simplify.
llvm::SmallVector<llvm::Value*, 16> Args;
// Handle struct-return functions by passing a pointer to the
@@ -2116,9 +2109,9 @@
Builder.CreateUnreachable();
Builder.ClearInsertionPoint();
- // FIXME: For now, emit a dummy basic block because expr
- // emitters in generally are not ready to handle emitting
- // expressions at unreachable points.
+ // FIXME: For now, emit a dummy basic block because expr emitters in
+ // generally are not ready to handle emitting expressions at unreachable
+ // points.
EnsureInsertPoint();
// Return a reasonable RValue.
Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=71937&r1=71936&r2=71937&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Sat May 16 02:57:57 2009
@@ -211,12 +211,11 @@
void CodeGenFunction::EmitStoreOfScalar(llvm::Value *Value, llvm::Value *Addr,
bool Volatile) {
- // Handle stores of types which have different representations in
- // memory and as LLVM values.
+ // Handle stores of types which have different representations in memory and
+ // as LLVM values.
- // FIXME: We shouldn't be this loose, we should only do this
- // conversion when we have a type we know has a different memory
- // representation (e.g., bool).
+ // FIXME: We shouldn't be this loose, we should only do this conversion when
+ // we have a type we know has a different memory representation (e.g., bool).
const llvm::Type *SrcTy = Value->getType();
const llvm::PointerType *DstPtr = cast<llvm::PointerType>(Addr->getType());
@@ -433,10 +432,10 @@
llvm::Value *LvalueDst = Dst.getAddress();
llvm::Value *src = Src.getScalarVal();
#if 0
- // FIXME. We cannot positively determine if we have an
- // 'ivar' assignment, object assignment or an unknown
- // assignment. For now, generate call to objc_assign_strongCast
- // assignment which is a safe, but consevative assumption.
+ // FIXME. We cannot positively determine if we have an 'ivar' assignment,
+ // object assignment or an unknown assignment. For now, generate call to
+ // objc_assign_strongCast assignment which is a safe, but consevative
+ // assumption.
if (Dst.isObjCIvar())
CGM.getObjCRuntime().EmitObjCIvarAssign(*this, src, LvalueDst);
else
@@ -956,8 +955,8 @@
FieldDecl* Field,
unsigned CVRQualifiers) {
unsigned idx = CGM.getTypes().getLLVMFieldNo(Field);
- // FIXME: CodeGenTypes should expose a method to get the appropriate
- // type for FieldTy (the appropriate type is ABI-dependent).
+ // FIXME: CodeGenTypes should expose a method to get the appropriate type for
+ // FieldTy (the appropriate type is ABI-dependent).
const llvm::Type *FieldTy =
CGM.getTypes().ConvertTypeForMem(Field->getType());
const llvm::PointerType *BaseTy =
Modified: cfe/trunk/lib/CodeGen/CGExprAgg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprAgg.cpp?rev=71937&r1=71936&r2=71937&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprAgg.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprAgg.cpp Sat May 16 02:57:57 2009
@@ -335,12 +335,11 @@
// FIXME: Disabled while we figure out what to do about
// test/CodeGen/bitfield.c
//
- // If we can, prefer a copy from a global; this is a lot less
- // code for long globals, and it's easier for the current optimizers
- // to analyze.
- // FIXME: Should we really be doing this? Should we try to avoid
- // cases where we emit a global with a lot of zeros? Should
- // we try to avoid short globals?
+ // If we can, prefer a copy from a global; this is a lot less code for long
+ // globals, and it's easier for the current optimizers to analyze.
+ // FIXME: Should we really be doing this? Should we try to avoid cases where
+ // we emit a global with a lot of zeros? Should we try to avoid short
+ // globals?
if (E->isConstantInitializer(CGF.getContext(), 0)) {
llvm::Constant* C = CGF.CGM.EmitConstantExpr(E, &CGF);
llvm::GlobalVariable* GV =
Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprConstant.cpp?rev=71937&r1=71936&r2=71937&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprConstant.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprConstant.cpp Sat May 16 02:57:57 2009
@@ -155,9 +155,9 @@
++i;
// Promote the size of V if necessary
- // FIXME: This should never occur, but currently it can because
- // initializer constants are cast to bool, and because clang is
- // not enforcing bitfield width limits.
+ // FIXME: This should never occur, but currently it can because initializer
+ // constants are cast to bool, and because clang is not enforcing bitfield
+ // width limits.
if (bitFieldInfo.Size > V.getBitWidth())
V.zext(bitFieldInfo.Size);
Modified: cfe/trunk/lib/CodeGen/CGObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjC.cpp?rev=71937&r1=71936&r2=71937&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjC.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjC.cpp Sat May 16 02:57:57 2009
@@ -133,9 +133,9 @@
FinishFunction(OMD->getBodyRBrace(getContext()));
}
-// FIXME: I wasn't sure about the synthesis approach. If we end up
-// generating an AST for the whole body we can just fall back to
-// having a GenerateFunction which takes the body Stmt.
+// FIXME: I wasn't sure about the synthesis approach. If we end up generating an
+// AST for the whole body we can just fall back to having a GenerateFunction
+// which takes the body Stmt.
/// GenerateObjCGetter - Generate an Objective-C property getter
/// function. The given Decl must be an ObjCImplementationDecl. @synthesize
@@ -146,8 +146,8 @@
const ObjCPropertyDecl *PD = PID->getPropertyDecl();
ObjCMethodDecl *OMD = PD->getGetterMethodDecl();
assert(OMD && "Invalid call to generate getter (empty method)");
- // FIXME: This is rather murky, we create this here since they will
- // not have been created by Sema for us.
+ // FIXME: This is rather murky, we create this here since they will not have
+ // been created by Sema for us.
OMD->createImplicitParams(getContext(), IMP->getClassInterface());
StartObjCMethod(OMD, IMP->getClassInterface());
@@ -221,8 +221,8 @@
const ObjCPropertyDecl *PD = PID->getPropertyDecl();
ObjCMethodDecl *OMD = PD->getSetterMethodDecl();
assert(OMD && "Invalid call to generate setter (empty method)");
- // FIXME: This is rather murky, we create this here since they will
- // not have been created by Sema for us.
+ // FIXME: This is rather murky, we create this here since they will not have
+ // been created by Sema for us.
OMD->createImplicitParams(getContext(), IMP->getClassInterface());
StartObjCMethod(OMD, IMP->getClassInterface());
@@ -274,8 +274,8 @@
getContext().BoolTy));
Args.push_back(std::make_pair(RValue::get(IsCopy ? True : False),
getContext().BoolTy));
- // FIXME: We shouldn't need to get the function info here, the
- // runtime already should have computed it to build the function.
+ // FIXME: We shouldn't need to get the function info here, the runtime
+ // already should have computed it to build the function.
EmitCall(Types.getFunctionInfo(getContext().VoidTy, Args),
SetPropertyFn, Args);
} else {
@@ -540,8 +540,8 @@
CallArgList Args2;
Args2.push_back(std::make_pair(RValue::get(V),
getContext().getObjCIdType()));
- // FIXME: We shouldn't need to get the function info here, the
- // runtime already should have computed it to build the function.
+ // FIXME: We shouldn't need to get the function info here, the runtime already
+ // should have computed it to build the function.
EmitCall(CGM.getTypes().getFunctionInfo(getContext().VoidTy, Args2),
EnumerationMutationFn, Args2);
Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=71937&r1=71936&r2=71937&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Sat May 16 02:57:57 2009
@@ -140,8 +140,8 @@
typedef std::vector<llvm::Constant*> ConstantVector;
- // FIXME: We should find a nicer way to make the labels for
- // metadata, string concatenation is lame.
+ // FIXME: We should find a nicer way to make the labels for metadata, string
+ // concatenation is lame.
class ObjCCommonTypesHelper {
private:
@@ -1463,8 +1463,8 @@
} else {
Target = EmitClassRef(CGF.Builder, Class->getSuperClass());
}
- // FIXME: We shouldn't need to do this cast, rectify the ASTContext
- // and ObjCTypes types.
+ // FIXME: We shouldn't need to do this cast, rectify the ASTContext and
+ // ObjCTypes types.
const llvm::Type *ClassTy =
CGM.getTypes().ConvertType(CGF.getContext().getObjCClassType());
Target = CGF.Builder.CreateBitCast(Target, ClassTy);
@@ -1526,8 +1526,8 @@
}
}
else
- // FIXME. This currently matches gcc's API for x86-32. May need
- // to change for others if we have their API.
+ // FIXME. This currently matches gcc's API for x86-32. May need to change
+ // for others if we have their API.
Fn = ObjCTypes.getSendFpretFn(IsSuper);
} else {
Fn = (ObjCABI == 2) ? ObjCTypes.getSendFn2(IsSuper)
@@ -1541,8 +1541,7 @@
llvm::Value *CGObjCMac::GenerateProtocolRef(CGBuilderTy &Builder,
const ObjCProtocolDecl *PD) {
// FIXME: I don't understand why gcc generates this, or where it is
- // resolved. Investigate. Its also wasteful to look this up over and
- // over.
+ // resolved. Investigate. Its also wasteful to look this up over and over.
LazySymbols.insert(&CGM.getContext().Idents.get("Protocol"));
return llvm::ConstantExpr::getBitCast(GetProtocolRef(PD),
@@ -1550,9 +1549,8 @@
}
void CGObjCCommonMac::GenerateProtocol(const ObjCProtocolDecl *PD) {
- // FIXME: We shouldn't need this, the protocol decl should contain
- // enough information to tell us whether this was a declaration or a
- // definition.
+ // FIXME: We shouldn't need this, the protocol decl should contain enough
+ // information to tell us whether this was a declaration or a definition.
DefinedProtocols.insert(PD->getIdentifier());
// If we have generated a forward reference to this protocol, emit
@@ -1588,8 +1586,7 @@
return Entry;
// FIXME: I don't understand why gcc generates this, or where it is
- // resolved. Investigate. Its also wasteful to look this up over and
- // over.
+ // resolved. Investigate. Its also wasteful to look this up over and over.
LazySymbols.insert(&CGM.getContext().Idents.get("Protocol"));
const char *ProtocolName = PD->getNameAsCString();
@@ -1866,11 +1863,10 @@
void CGObjCMac::GenerateCategory(const ObjCCategoryImplDecl *OCD) {
unsigned Size = CGM.getTargetData().getTypeAllocSize(ObjCTypes.CategoryTy);
- // FIXME: This is poor design, the OCD should have a pointer to the
- // category decl. Additionally, note that Category can be null for
- // the @implementation w/o an @interface case. Sema should just
- // create one for us as it does for @implementation so everyone else
- // can live life under a clear blue sky.
+ // FIXME: This is poor design, the OCD should have a pointer to the category
+ // decl. Additionally, note that Category can be null for the @implementation
+ // w/o an @interface case. Sema should just create one for us as it does for
+ // @implementation so everyone else can live life under a clear blue sky.
const ObjCInterfaceDecl *Interface = OCD->getClassInterface();
const ObjCCategoryDecl *Category =
Interface->FindCategoryDeclaration(OCD->getIdentifier());
@@ -2122,10 +2118,10 @@
llvm::Constant *CGObjCMac::EmitMetaClassRef(const ObjCInterfaceDecl *ID) {
std::string Name = "\01L_OBJC_METACLASS_" + ID->getNameAsString();
- // FIXME: Should we look these up somewhere other than the
- // module. Its a bit silly since we only generate these while
- // processing an implementation, so exactly one pointer would work
- // if know when we entered/exitted an implementation block.
+ // FIXME: Should we look these up somewhere other than the module. Its a bit
+ // silly since we only generate these while processing an implementation, so
+ // exactly one pointer would work if know when we entered/exitted an
+ // implementation block.
// Check for an existing forward reference.
// Previously, metaclass with internal linkage may have been defined.
@@ -3114,8 +3110,8 @@
(GCAttr == QualType::GCNone || GCAttr == QualType::Weak))
|| (!ForStrongLayout && GCAttr != QualType::Weak)) {
if (IsUnion) {
- // FIXME: Why the asymmetry? We divide by word size in bits on
- // other side.
+ // FIXME: Why the asymmetry? We divide by word size in bits on other
+ // side.
uint64_t UnionIvarSize = FieldSize;
if (UnionIvarSize > MaxSkippedUnionIvarSize) {
MaxSkippedUnionIvarSize = UnionIvarSize;
@@ -3525,8 +3521,8 @@
PtrObjectPtrTy = llvm::PointerType::getUnqual(ObjectPtrTy);
SelectorPtrTy = Types.ConvertType(Ctx.getObjCSelType());
- // FIXME: It would be nice to unify this with the opaque type, so
- // that the IR comes out a bit cleaner.
+ // FIXME: It would be nice to unify this with the opaque type, so that the IR
+ // comes out a bit cleaner.
const llvm::Type *T = Types.ConvertType(Ctx.getObjCProtoType());
ExternalProtocolPtrTy = llvm::PointerType::getUnqual(T);
@@ -3800,8 +3796,8 @@
CGM.getModule().addTypeName("struct._objc_module", ModuleTy);
- // FIXME: This is the size of the setjmp buffer and should be
- // target specific. 18 is what's used on 32-bit X86.
+ // FIXME: This is the size of the setjmp buffer and should be target
+ // specific. 18 is what's used on 32-bit X86.
uint64_t SetJmpBufferSize = 18;
// Exceptions
@@ -4679,8 +4675,8 @@
IvarOffsetGV->setAlignment(
CGM.getTargetData().getPrefTypeAlignment(ObjCTypes.LongTy));
- // FIXME: This matches gcc, but shouldn't the visibility be set on
- // the use as well (i.e., in ObjCIvarOffsetVariable).
+ // FIXME: This matches gcc, but shouldn't the visibility be set on the use as
+ // well (i.e., in ObjCIvarOffsetVariable).
if (Ivar->getAccessControl() == ObjCIvarDecl::Private ||
Ivar->getAccessControl() == ObjCIvarDecl::Package ||
CGM.getDeclVisibilityMode(ID) == LangOptions::Hidden)
@@ -5037,16 +5033,16 @@
QualType Arg0Ty,
bool IsSuper,
const CallArgList &CallArgs) {
- // FIXME. Even though IsSuper is passes. This function doese not
- // handle calls to 'super' receivers.
+ // FIXME. Even though IsSuper is passes. This function doese not handle calls
+ // to 'super' receivers.
CodeGenTypes &Types = CGM.getTypes();
llvm::Value *Arg0 = Receiver;
if (!IsSuper)
Arg0 = CGF.Builder.CreateBitCast(Arg0, ObjCTypes.ObjectPtrTy, "tmp");
// Find the message function name.
- // FIXME. This is too much work to get the ABI-specific result type
- // needed to find the message name.
+ // FIXME. This is too much work to get the ABI-specific result type needed to
+ // find the message name.
const CGFunctionInfo &FnInfo = Types.getFunctionInfo(ResultType,
llvm::SmallVector<QualType, 16>());
llvm::Constant *Fn = 0;
@@ -5295,8 +5291,8 @@
else
Target = EmitSuperClassRef(CGF.Builder, Class);
- // FIXME: We shouldn't need to do this cast, rectify the ASTContext
- // and ObjCTypes types.
+ // FIXME: We shouldn't need to do this cast, rectify the ASTContext and
+ // ObjCTypes types.
const llvm::Type *ClassTy =
CGM.getTypes().ConvertType(CGF.getContext().getObjCClassType());
Target = CGF.Builder.CreateBitCast(Target, ClassTy);
@@ -5567,8 +5563,8 @@
// Cleanups must call objc_end_catch.
//
- // FIXME: It seems incorrect for objc_begin_catch to be inside
- // this context, but this matches gcc.
+ // FIXME: It seems incorrect for objc_begin_catch to be inside this
+ // context, but this matches gcc.
CGF.PushCleanupBlock(MatchEnd);
CGF.setInvokeDest(MatchHandler);
Modified: cfe/trunk/lib/CodeGen/CGObjCRuntime.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCRuntime.h?rev=71937&r1=71936&r2=71937&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCRuntime.h (original)
+++ cfe/trunk/lib/CodeGen/CGObjCRuntime.h Sat May 16 02:57:57 2009
@@ -57,8 +57,8 @@
namespace CodeGen {
class CodeGenModule;
-//FIXME Several methods should be pure virtual but aren't to avoid the
-//partially-implemented subclass breaking.
+// FIXME: Several methods should be pure virtual but aren't to avoid the
+// partially-implemented subclass breaking.
/// Implements runtime-specific code generation functions.
class CGObjCRuntime {
@@ -150,10 +150,9 @@
/// Generate a function preamble for a method with the specified
/// types.
- // FIXME: Current this just generates the Function definition, but
- // really this should also be generating the loads of the
- // parameters, as the runtime should have full control over how
- // parameters are passed.
+ // FIXME: Current this just generates the Function definition, but really this
+ // should also be generating the loads of the parameters, as the runtime
+ // should have full control over how parameters are passed.
virtual llvm::Function *GenerateMethod(const ObjCMethodDecl *OMD,
const ObjCContainerDecl *CD) = 0;
Modified: cfe/trunk/lib/CodeGen/CGValue.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGValue.h?rev=71937&r1=71936&r2=71937&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGValue.h (original)
+++ cfe/trunk/lib/CodeGen/CGValue.h Sat May 16 02:57:57 2009
@@ -161,8 +161,8 @@
static void SetQualifiers(unsigned Qualifiers, LValue& R) {
R.Volatile = (Qualifiers&QualType::Volatile)!=0;
R.Restrict = (Qualifiers&QualType::Restrict)!=0;
- // FIXME: Convenient place to set objc flags to 0. This
- // should really be done in a user-defined constructor instead.
+ // FIXME: Convenient place to set objc flags to 0. This should really be
+ // done in a user-defined constructor instead.
R.ObjCType = None;
R.Ivar = R.NonGC = R.GlobalObjCRef = false;
}
@@ -288,9 +288,9 @@
return R;
}
- // FIXME: It is probably bad that we aren't emitting the target when
- // we build the lvalue. However, this complicates the code a bit,
- // and I haven't figured out how to make it go wrong yet.
+ // FIXME: It is probably bad that we aren't emitting the target when we build
+ // the lvalue. However, this complicates the code a bit, and I haven't figured
+ // out how to make it go wrong yet.
static LValue MakePropertyRef(const ObjCPropertyRefExpr *E,
unsigned Qualifiers) {
LValue R;
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.cpp?rev=71937&r1=71936&r2=71937&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.cpp Sat May 16 02:57:57 2009
@@ -66,8 +66,8 @@
}
bool CodeGenFunction::hasAggregateLLVMType(QualType T) {
- // FIXME: Use positive checks instead of negative ones to be more
- // robust in the face of extension.
+ // FIXME: Use positive checks instead of negative ones to be more robust in
+ // the face of extension.
return !T->hasPointerRepresentation() &&!T->isRealType() &&
!T->isVoidType() && !T->isVectorType() && !T->isFunctionType() &&
!T->isBlockPointerType();
@@ -105,9 +105,9 @@
}
}
- // FIXME: We are at an unreachable point, there is no reason to emit
- // the block unless it has uses. However, we still need a place to
- // put the debug region.end for now.
+ // FIXME: We are at an unreachable point, there is no reason to emit the block
+ // unless it has uses. However, we still need a place to put the debug
+ // region.end for now.
EmitBlock(ReturnBlock);
}
@@ -663,8 +663,8 @@
assert(!CleanupEntries.empty() &&
"Trying to add branch fixup without cleanup block!");
- // FIXME: We could be more clever here and check if there's already a
- // branch fixup for this destination and recycle it.
+ // FIXME: We could be more clever here and check if there's already a branch
+ // fixup for this destination and recycle it.
CleanupEntries.back().BranchFixups.push_back(BI);
}
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=71937&r1=71936&r2=71937&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Sat May 16 02:57:57 2009
@@ -288,9 +288,8 @@
/// SetFunctionDefinitionAttributes - Set attributes for a global.
///
-/// FIXME: This is currently only done for aliases and functions, but
-/// not for variables (these details are set in
-/// EmitGlobalVarDefinition for variables).
+/// FIXME: This is currently only done for aliases and functions, but not for
+/// variables (these details are set in EmitGlobalVarDefinition for variables).
void CodeGenModule::SetFunctionDefinitionAttributes(const FunctionDecl *D,
llvm::GlobalValue *GV) {
GVALinkage Linkage = GetLinkageForFunction(D, Features);
@@ -703,8 +702,8 @@
// Handle things which are present even on external declarations.
if (D) {
- // FIXME: This code is overly simple and should be merged with
- // other global handling.
+ // FIXME: This code is overly simple and should be merged with other global
+ // handling.
GV->setConstant(D->getType().isConstant(Context));
// FIXME: Merge with other attribute handling code.
@@ -1213,11 +1212,10 @@
const llvm::Type *Ty = getTypes().ConvertType(getContext().IntTy);
Ty = llvm::ArrayType::get(Ty, 0);
- // FIXME: This is fairly broken if
- // __CFConstantStringClassReference is already defined, in that it
- // will get renamed and the user will most likely see an opaque
- // error message. This is a general issue with relying on
- // particular names.
+ // FIXME: This is fairly broken if __CFConstantStringClassReference is
+ // already defined, in that it will get renamed and the user will most
+ // likely see an opaque error message. This is a general issue with relying
+ // on particular names.
llvm::GlobalVariable *GV =
new llvm::GlobalVariable(Ty, false,
llvm::GlobalVariable::ExternalLinkage, 0,
@@ -1531,10 +1529,9 @@
}
default:
- // Make sure we handled everything we should, every other kind is
- // a non-top-level decl. FIXME: Would be nice to have an
- // isTopLevelDeclKind function. Need to recode Decl::Kind to do
- // that easily.
+ // Make sure we handled everything we should, every other kind is a
+ // non-top-level decl. FIXME: Would be nice to have an isTopLevelDeclKind
+ // function. Need to recode Decl::Kind to do that easily.
assert(isa<TypeDecl>(D) && "Unsupported decl kind");
}
}
Modified: cfe/trunk/lib/CodeGen/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.cpp?rev=71937&r1=71936&r2=71937&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Sat May 16 02:57:57 2009
@@ -543,8 +543,8 @@
void CXXNameMangler::mangleType(const FunctionType *T) {
// <function-type> ::= F [Y] <bare-function-type> E
Out << 'F';
- // FIXME: We don't have enough information in the AST to produce the
- // 'Y' encoding for extern "C" function types.
+ // FIXME: We don't have enough information in the AST to produce the 'Y'
+ // encoding for extern "C" function types.
mangleBareFunctionType(T, /*MangleReturnType=*/true);
Out << 'E';
}
More information about the cfe-commits
mailing list