Depends on D27076
Details
Diff Detail
- Build Status
- Buildable 1752 - Build 1752: arc lint + arc unit 
Event Timeline
| llvm/include/llvm/LTO/LTO.h | ||
|---|---|---|
| 104 | Why don't you take all the members here? | |
| llvm/include/llvm/LTO/LTO.h | ||
|---|---|---|
| 166 | Can you turn SymTab and File to be reference? | |
| 171–172 | Non relevant for this patch, but it'd be nice to document getName vs getIRName, I always forget when I look at this. | |
| 248–249 | Looks like something to add to ModuleSymbolTable. | |
- Address review comments
| llvm/include/llvm/LTO/LTO.h | ||
|---|---|---|
| 104 | We need to create the module using the LLVMContext owned by this class. I suppose that given that we need to do that we might as well be consistent with the other members and let MBRef be default initialized as well. | |
| 166 | Done for SymTab. File may be null (see addRegularLTO) so I've left it as a pointer. | |
| 171–172 | It looks like getIRName is only used by the implementation, so I've removed it in r288302 and added documentation for getName. | |
| 248–249 | Maybe not, given our discussion on D27073. | |
| llvm/include/llvm/LTO/LTO.h | ||
|---|---|---|
| 109 | It seems there is not much that still requires us to keep Mod here, what is fundamentally the remaining issue? | |
| llvm/include/llvm/LTO/LTO.h | ||
|---|---|---|
| 109 | The major ones are: 
 Essentially we need it to access information that will later be stored in the bitcode symbol table. But until that's ready there's no harm in accessing the module directly. | |
| llvm/include/llvm/LTO/LTO.h | ||
|---|---|---|
| 109 | Owning the module is only useful for the two other parts right? Technically we could store the source file name directly and extract the "used" early. | |
| llvm/include/llvm/LTO/LTO.h | ||
|---|---|---|
| 109 | An owner is also needed for the GlobalValues stored in ModuleSymbolTable. But that's just another example of something that can be refactored with the bitcode symbol table. | |
Why don't you take all the members here?
It seems strange to see the initialization and then File->Mod = ...