dblaikie added a comment.

From the other review:

>> Could/should we do the lookup on the CU filename before it goes into the DI 
>> metadata, and store that FileID somewhere for later use?
>
> There's a note in issue 63955 to the effect that I can't find an API to turn 
> a filename into a FileID. If there is one that I didn't find, we could use 
> FileIDs instead of pointers to name strings.

I was thinking more along the lines of keeping the same code we have, string 
pointer equality (though perhaps FileID is equivalent in cases where the 
pointer euqality is valid, and the FileID approach would be more self 
documenting/less subtle). I was thinking - for other files we get filenames 
correctly that are pointer identical because they're in the FileID, right? But 
for this one because we stash it in/get it from the DICompileUnit, that 
identity gets lost. But presumably the identity is true for the string filename 
used to build the DICompileUnit? So if, at that point, we stored the pointer, 
or FileID aside and used that instead of retrieving it from the DICompileUnit, 
perhaps that'd make this name consistent with the other names in being able to 
use pointer identity?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156571/new/

https://reviews.llvm.org/D156571

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to