[cfe-commits] r51764 - /cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
Eli Friedman
eli.friedman at gmail.com
Fri May 30 03:29:34 PDT 2008
Author: efriedma
Date: Fri May 30 05:29:32 2008
New Revision: 51764
URL: http://llvm.org/viewvc/llvm-project?rev=51764&view=rev
Log:
Add FIXME to CodeGen struct layout.
Modified:
cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTypes.cpp?rev=51764&r1=51763&r2=51764&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenTypes.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenTypes.cpp Fri May 30 05:29:32 2008
@@ -479,8 +479,12 @@
/// the layout built by the AST. (We have to do struct layout to do Sema,
/// and there's no point to duplicating the work.)
void RecordOrganizer::layoutStructFields(const ASTRecordLayout &RL) {
- // FIXME : Use SmallVector
+ // FIXME: This code currently always generates packed structures.
+ // Unpacked structures are more readable, and sometimes more efficient!
+ // (But note that any changes here are likely to impact CGExprConstant,
+ // which makes some messy assumptions.)
uint64_t llvmSize = 0;
+ // FIXME: Make this a SmallVector
std::vector<const llvm::Type*> LLVMFields;
int NumMembers = RD.getNumMembers();
More information about the cfe-commits
mailing list