On Aug 22, 2010, at 3:59 AM, John McCall wrote:
> Author: rjmccall
> Date: Sun Aug 22 05:59:02 2010
> New Revision: 111776
>
> URL: http://llvm.org/viewvc/llvm-project?rev=111776&view=rev
> Log:
> Experiment with using first-class aggregates to represent member function
> pointers. I find the resulting code to be substantially cleaner, and it
> makes it very easy to use the same APIs for data member pointers (which I have
> conscientiously avoided here), and it avoids a plethora of potential
> inefficiencies due to excessive memory copying, but we'll have to see if it
> actually works.
FYI, this is breaking self-host on Darwin, with:
clang:
/build/buildbot-llvm/clang-x86_64-linux-selfhost-rel/llvm.src/tools/clang/lib/CodeGen/CGExprScalar.cpp:576:
llvm::Value*<unnamed>::ScalarExprEmitter::EmitNullValue(clang::QualType):
Assertion `!Ty->isMemberFunctionPointerType() && "member function pointers are
not scalar!"' failed.
0 clang 0x00000000015ffdff
1 clang 0x0000000001601e82
2 libpthread.so.0 0x00002b91603b9f60
3 libc.so.6 0x00002b9160fab175 gsignal + 53
4 libc.so.6 0x00002b9160fadf80 abort + 384
5 libc.so.6 0x00002b9160fa42b1 __assert_fail + 241
6 clang 0x00000000007d5379
7 clang 0x00000000007db837
8 clang 0x00000000007df087
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 87
9 clang 0x00000000007b52a7
clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*, llvm::Value*,
bool, bool, bool) + 247
10 clang 0x00000000007b538e
clang::CodeGen::CodeGenFunction::EmitAnyExprToTemp(clang::Expr const*, bool,
bool) + 78
11 clang 0x0000000000780341
clang::CodeGen::CodeGenFunction::EmitCallArg(clang::Expr const*,
clang::QualType) + 65
12 clang 0x00000000007c9adf void
clang::CodeGen::CodeGenFunction::EmitCallArgs<clang::FunctionProtoType>(llvm::SmallVector<std::pair<clang::CodeGen::RValue,
clang::QualType>, 16u>&, clang::FunctionProtoType const*,
clang::ConstExprIterator, clang::ConstExprIterator) + 527
13 clang 0x00000000007c35a4
clang::CodeGen::CodeGenFunction::EmitCXXMemberCall(clang::CXXMethodDecl const*,
llvm::Value*, clang::CodeGen::ReturnValueSlot, llvm::Value*, llvm::Value*,
clang::ConstExprIterator, clang::ConstExprIterator) + 564
14 clang 0x00000000007c472d
clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(clang::CXXMemberCallExpr
const*, clang::CodeGen::ReturnValueSlot) + 1053
15 clang 0x00000000007b258e
clang::CodeGen::CodeGenFunction::EmitCallExpr(clang::CallExpr const*,
clang::CodeGen::ReturnValueSlot) + 398
16 clang 0x00000000007b271e
clang::CodeGen::CodeGenFunction::EmitCallExprLValue(clang::CallExpr const*) + 46
17 clang 0x00000000007b83a6
clang::CodeGen::CodeGenFunction::EmitLValue(clang::Expr const*) + 1750
18 clang 0x00000000007bd275
19 clang 0x00000000007bd672
clang::CodeGen::CodeGenFunction::EmitReferenceBindingToExpr(clang::Expr const*,
clang::NamedDecl const*) + 50
20 clang 0x000000000082c6ae
clang::CodeGen::CodeGenFunction::EmitReturnStmt(clang::ReturnStmt const&) + 542
21 clang 0x000000000082ce3c
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 876
22 clang 0x000000000082f8ff
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, llvm::Value*, bool) + 239
23 clang 0x000000000082fbbc
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 236
24 clang 0x000000000082caec
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 28
25 clang 0x000000000084f2cb
clang::CodeGen::CodeGenFunction::GenerateCode(clang::CodeGen::GlobalDecl,
llvm::Function*) + 875
26 clang 0x00000000007534aa
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::CodeGen::GlobalDecl)
+ 522
27 clang 0x0000000000756c32
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::CodeGen::GlobalDecl)
+ 194
28 clang 0x0000000000757527
clang::CodeGen::CodeGenModule::EmitDeferred() + 151
29 clang 0x00000000007575a9 clang::CodeGen::CodeGenModule::Release()
+ 9
30 clang 0x000000000074a838
31 clang 0x0000000000867ecd clang::ParseAST(clang::Sema&, bool) + 301
32 clang 0x000000000074b7c4 clang::CodeGenAction::ExecuteAction() + 68
33 clang 0x000000000063c33d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 349
34 clang 0x000000000064e39c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1324
35 clang 0x0000000000631493 cc1_main(char const**, char const**, char
const*, void*) + 611
36 clang 0x0000000000637efb main + 4011
37 libc.so.6 0x00002b9160f97c4d __libc_start_main + 253
38 clang 0x000000000062fc59
Stack dump:
0. Program arguments:
/build/buildbot-llvm/clang-x86_64-linux-selfhost-rel/llvm.install.1/bin/clang
-cc1 -triple x86_64-pc-linux-gnu -S -disable-free -main-file-name
LLVMCConfigurationEmitter.cpp -pic-level 2 -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.20.1 -resource-dir
/build/buildbot-llvm/clang-x86_64-linux-selfhost-rel/llvm.install.1/lib/clang/2.8
-dependency-file
/build/buildbot-llvm/clang-x86_64-linux-selfhost-rel/llvm.obj.2/utils/TableGen/Release+Asserts/LLVMCConfigurationEmitter.d.tmp
-MP -MT
/build/buildbot-llvm/clang-x86_64-linux-selfhost-rel/llvm.obj.2/utils/TableGen/Release+Asserts/LLVMCConfigurationEmitter.o
-MT
/build/buildbot-llvm/clang-x86_64-linux-selfhost-rel/llvm.obj.2/utils/TableGen/Release+Asserts/LLVMCConfigurationEmitter.d
-D _DEBUG -D _GNU_SOURCE -D __STDC_LIMIT_MACROS -D __STDC_CONSTANT_MACROS -I
/build/buildbot-llvm/clang-x86_64-linux-selfhost-rel/llvm.obj.2/include -I
/build/buildbot-llvm/clang-x86_64-linux-selfhost-rel/llvm.obj.2/utils/TableGen
-I /build/buildbot-llvm/clang-x86_64-linux-selfhost-rel/llvm.src/include -I
/build/buildbot-llvm/clang-x86_64-linux-selfhost-rel/llvm.src/utils/TableGen
-O3 -Woverloaded-virtual -Wcast-qual -Wno-long-long -Wall -W
-Wno-unused-parameter -Wwrite-strings -pedantic -ferror-limit 19
-fmessage-length 0 -fexceptions -fgnu-runtime -fdiagnostics-show-option -o
/tmp/cc-Sx141Z.s -x c++
/build/buildbot-llvm/clang-x86_64-linux-selfhost-rel/llvm.src/utils/TableGen/LLVMCConfigurationEmitter.cpp
1. <eof> parser at end of file
2. Per-file LLVM IR generation
3.
/build/buildbot-llvm/clang-x86_64-linux-selfhost-rel/llvm.src/include/llvm/ADT/StringMap.h:388:28:
Generating code for declaration 'llvm::StringMap<void
(<anonymous>::EmitPreprocessOptionsCallback::*)(llvm::DagInit const &, unsigned
int, llvm::raw_ostream &) const, llvm::MallocAllocator>::GetOrCreateValue'
4.
/build/buildbot-llvm/clang-x86_64-linux-selfhost-rel/llvm.src/include/llvm/ADT/StringMap.h:388:60:
LLVM IR generation of compound statement ('{}')
clang: error: clang frontend command failed due to signal 6 (use -v to see
invocation)
make[3]: ***
[/build/buildbot-llvm/clang-x86_64-linux-selfhost-rel/llvm.obj.2/utils/TableGen/Release+Asserts/
- Doug_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits