Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Implement precompiled headers for C++ #6446

Closed Quuxplusone closed 14 years ago

Quuxplusone commented 14 years ago
Bugzilla Link PR5970
Status RESOLVED FIXED
Importance P enhancement
Reported by bolzoni (bolzoni@cs.unipr.it)
Reported on 2010-01-07 11:48:42 -0800
Last modified on 2010-09-12 00:27:35 -0700
Version unspecified
Hardware PC Linux
CC bagnara@cs.unipr.it, dgregor@apple.com, llvm-bugs@lists.llvm.org, llvmbugs@contacts.eelis.net, zaffanella@cs.unipr.it
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
input.C
-------------------------->>>
class GenericClass;
struct AlsaDriver
{
  virtual int _read (unsigned nframes);
};
typedef void (GenericClass::*GenericMemFuncType) ();
GenericMemFuncType m_pFunction;
void AlsaDriver1 ()
{
  m_pFunction = reinterpret_cast < GenericMemFuncType > (&AlsaDriver::_read);
}
--------------------------<<<<

Clang output:
$ ./llvm_new/Debug/bin/clang -v -emit-ast ./input.C
clang version 1.1 (trunk 92264)
Target: x86_64-unknown-linux-gnu
Thread model: posix
 "/home/restless/uni/compilatori/llvm_new/Debug/bin/clang" -cc1 -triple x86_64-unknown-linux-gnu -emit-pch -disable-free -main-file-name input.C -mrelocation-model static -mdisable-fp-elim -munwind-tables -target-cpu x86-64 -v -resource-dir /home/restless/uni/compilatori/llvm_new/Debug/lib/clang/1.1 -fmessage-length 0 -fexceptions -fgnu-runtime -fdiagnostics-show-option -o input.ast -x c++ ./input.C
clang -cc1 version 1.1 based upon llvm 2.7svn hosted on x86_64-unknown-linux-gnu
ignoring nonexistent directory "/usr/include/c++/4.4.2/x86_64-pc-linux-gnu/"
[..Omissis..]
ignoring duplicate directory "/usr/include/c++/4.4.2"
[..Omissis..]
#include "..." search starts here:
#include <...> search starts here:
 /home/restless/uni/compilatori/llvm_new/Debug/lib/clang/1.1/include
 /usr/include/c++/4.4.2
 /usr/include/c++/4.4.2/backward
 /usr/local/include
 /usr/include
End of search list.
clang: PCHWriterStmt.cpp:842: void
clang::PCHWriter::WriteSubStmt(clang::Stmt*): Assertion `Writer.Code !=
pch::STMT_NULL_PTR && "Unhandled expression writing PCH file"' failed.
0  clang           0x00000000012b82b6
1  clang           0x00000000012b812f
2  libpthread.so.0 0x00007ff916c59e80
3  libc.so.6       0x00007ff915f7b035 gsignal + 53
4  libc.so.6       0x00007ff915f7c460 abort + 384
5  libc.so.6       0x00007ff915f74151 __assert_fail + 241
6  clang           0x00000000004a6b6d
7  clang           0x00000000004a4a22
8  clang           0x00000000004a814f
9  clang           0x00000000004a704f
10 clang           0x00000000004a6b46
11 clang           0x00000000004a2e62
12 clang           0x00000000004a73eb
13 clang           0x00000000004a6c9f
14 clang           0x00000000004a0a7c
15 clang           0x000000000048aa04
16 clang           0x000000000042e5fc
17 clang           0x000000000075db75
18 clang           0x000000000042a566
19 clang           0x000000000042a1f4
20 clang           0x000000000040ad24
21 clang           0x000000000040f3dc main + 244
22 libc.so.6       0x00007ff915f67b6d __libc_start_main + 253
23 clang           0x0000000000409769
Stack dump:
0.  Program arguments: /home/restless/uni/compilatori/llvm_new/Debug/bin/clang -
cc1 -triple x86_64-unknown-linux-gnu -emit-pch -disable-free -main-file-name
input.C -mrelocation-model static -mdisable-fp-elim -munwind-tables -target-cpu
x86-64 -v -resource-dir
/home/restless/uni/compilatori/llvm_new/Debug/lib/clang/1.1 -fmessage-length 0 -
fexceptions -fgnu-runtime -fdiagnostics-show-option -o input.ast -x c++
./input.C
1.  <eof> parser at end of file
clang: error: compiler command failed due to signal 6 (use -v to see invocation)
Quuxplusone commented 14 years ago

AST writer / PCH support isn't wired up yet for C++ AST nodes.

Quuxplusone commented 14 years ago

Precompiled headers are now implemented for C++.