[PATCH] D22712: Remove FileEntry copy-constructor

Alexander Shaposhnikov via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 25 00:29:55 PDT 2016


alexshap added a comment.

two separate observations:

1. **without my changes** :

I checked the following revision: r276508 | rsmith | 2016-07-22 19:32:21 
(with gcc 4.7.4, g++ 4.7.4, Ubuntu 16.04.1 LTS)
build of llvm/clang failed, the logs are here: https://reviews.llvm.org/P6916
(emplace is one of the issues)

so if i understand correctly right now **without any of my changes** the build with gcc 4.7.4 is failing.

2. **one more detail about this cleanup**

yeah, you are right that for gcc 4.7.4 this particular place would be an issue too:

A. FileEntries are owned by std::map<llvm::sys::fs::UniqueID, FileEntry> UniqueRealFiles
(llvm/tools/clang/include/clang/Basic/FileManager.h:125)

B. The code populating that map is located in llvm/tools/clang/lib/Basic/FileManager.cpp
and starts with this:

// llvm/tools/clang/lib/Basic/FileManager.cpp:263
FileEntry &UFE = UniqueRealFiles[Data.UniqueID]; -

unfortunately, with gcc-4.7.4 this code wants not only default constructor, but copy-constructor as well:
https://reviews.llvm.org/P6919
("make -j4 clangBasic" logs)


https://reviews.llvm.org/D22712





More information about the cfe-commits mailing list