[cfe-commits] r95393 - in /cfe/trunk/lib/CodeGen: CGDecl.cpp CGExpr.cpp CGStmt.cpp

Douglas Gregor dgregor at apple.com
Fri Feb 5 13:10:52 PST 2010


On Feb 5, 2010, at 9:51 AM, Daniel Dunbar wrote:

> Author: ddunbar
> Date: Fri Feb  5 11:51:33 2010
> New Revision: 95393
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=95393&view=rev
> Log:
> IRgen: Use hasAggregateLLVMType instead of isSingleValueType() for cases that
> need to deal with aggregates specially; this is consistent with the rest of IRgen.
> 
> Also, simplify EmitParmDecl and don't worry about using Decl::getNameAsString.

This broke Clang self-host, so I've reverted it in r95430. The failure was:

Assertion failed: ((VTy->isFirstClassType() || VTy->isVoidTy() || isa<OpaqueType>(ty)) && "Cannot create non-first-class values except for constants!"), function Value, file /Users/dgregor/Projects/llvm/lib/VMCore/Value.cpp, line 53.
0  clang             0x00000001012ccb12 PrintStackTrace(void*) + 34
1  clang             0x00000001012cd39c SignalHandler(int) + 652
2  libSystem.B.dylib 0x00007fff85cd4eaa _sigtramp + 26
3  libSystem.B.dylib 0x0000000104189000 _sigtramp + 2118861168
4  libSystem.B.dylib 0x00007fff85d50e74 __pthread_markcancel + 0
5  clang             0x000000010127093a llvm::Value::Value(llvm::Type const*, unsigned int) + 1482
6  clang             0x000000010122571c llvm::Instruction::Instruction(llvm::Type const*, unsigned int, llvm::Use*, unsigned int, llvm::Instruction*) + 44
7  clang             0x000000010122e823 llvm::LoadInst::LoadInst(llvm::Value*, char const*, bool, llvm::Instruction*) + 99
8  clang             0x000000010019f2c8 clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(llvm::Value*, bool, clang::QualType) + 88
9  clang             0x000000010019f7ad clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(clang::CodeGen::LValue, clang::QualType) + 429
10 clang             0x00000001001c1ac9 (anonymous namespace)::ScalarExprEmitter::EmitLoadOfLValue(clang::Expr const*) + 121
11 clang             0x00000001001cae59 clang::StmtVisitor<(anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 5913
12 clang             0x00000001001cb209 clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 121
13 clang             0x0000000100198b32 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, llvm::Value*, bool, bool, bool) + 82
14 clang             0x00000001001ceb03 (anonymous namespace)::ScalarExprEmitter::EmitCastExpr(clang::CastExpr*) + 1843
15 clang             0x00000001001ca9db clang::StmtVisitor<(anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*) + 4763
16 clang             0x00000001001cb209 clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 121
17 clang             0x0000000100198b32 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, llvm::Value*, bool, bool, bool) + 82
18 clang             0x000000010021cc66 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 294
19 clang             0x000000010021f79b clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&, bool, llvm::Value*, bool) + 267
20 clang             0x000000010021fac7 clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 231
21 clang             0x000000010021cb70 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 48
22 clang             0x000000010023b523 clang::CodeGen::CodeGenFunction::GenerateCode(clang::CodeGen::GlobalDecl, llvm::Function*) + 2339
23 clang             0x0000000100243eb0 clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::CodeGen::GlobalDecl) + 928
24 clang             0x000000010024552b clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::CodeGen::GlobalDecl) + 491
25 clang             0x000000010024586a clang::CodeGen::CodeGenModule::EmitGlobal(clang::CodeGen::GlobalDecl) + 506
26 clang             0x0000000100245fb4 clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 724
27 clang             0x0000000100256f4c (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 60
28 clang             0x0000000100047d5e (anonymous namespace)::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 158
29 clang             0x00000001002651b5 clang::ParseAST(clang::Preprocessor&, clang::ASTConsumer*, clang::ASTContext&, bool, bool, clang::CodeCompleteConsumer*) + 277
30 clang             0x00000001000512d9 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 393
31 clang             0x0000000100037c90 cc1_main(char const**, char const**, char const*, void*) + 2032
32 clang             0x000000010003a644 main + 2052
33 clang             0x0000000100035988 start + 52
34 clang             0x0000000000000036 start + 4294747874
Stack dump:
0.	Program arguments: /Volumes/Data/dgregor/Projects/llvm-build-autotools/Release/bin/clang -cc1 -triple x86_64-apple-darwin10.0.0 -S -disable-free -main-file-name SparcISelLowering.cpp -pic-level 1 -mdisable-fp-elim -munwind-tables -target-cpu core2 -g -resource-dir /Volumes/Data/dgregor/Projects/llvm-build-autotools/Release/lib/clang/1.1 -dependency-file /Volumes/Data/dgregor/Projects/llvm-clang/lib/Target/Sparc/Debug/SparcISelLowering.d.tmp -MP -MT /Volumes/Data/dgregor/Projects/llvm-clang/lib/Target/Sparc/Debug/SparcISelLowering.o -MT /Volumes/Data/dgregor/Projects/llvm-clang/lib/Target/Sparc/Debug/SparcISelLowering.d -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I/Users/dgregor/Projects/llvm-clang/include -I/Users/dgregor/Projects/llvm/include -I/Users/dgregor/Projects/llvm/lib/Target/Sparc -I/Volumes/Data/dgregor/Projects/llvm-clang/include -I/Volumes/Data/dgregor/Projects/llvm-clang/lib/Target/Sparc -Woverloaded-virtual -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -fmessage-length 80 -stack-protector 1 -fblocks -fno-rtti -fno-common -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-ety4Kf.s -x c++ /Users/dgregor/Projects/llvm/lib/Target/Sparc/SparcISelLowering.cpp 
1.	/Users/dgregor/Projects/llvm/lib/Target/Sparc/SparcISelLowering.cpp:515:1: current parser token 'static'
2.	/Users/dgregor/Projects/llvm/lib/Target/Sparc/SparcISelLowering.cpp:253:22: LLVM IR generation of declaration 'llvm::SparcTargetLowering::LowerCall'
3.	/Users/dgregor/Projects/llvm/lib/Target/Sparc/SparcISelLowering.cpp:253:22: Generating code for declaration 'llvm::SparcTargetLowering::LowerCall'
4.	/Users/dgregor/Projects/llvm/lib/Target/Sparc/SparcISelLowering.cpp:259:66: LLVM IR generation of compound statement ('{}')

	- Doug



More information about the cfe-commits mailing list