[PATCH] D43511: [dsymutil] Be smarter in caching calls to realpath

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 10:18:26 PST 2018


aprantl added inline comments.


================
Comment at: llvm/tools/dsymutil/DwarfLinker.cpp:1949
+            std::string File;
+            bool FoundFile =
+              LT->getFileNameByIndex(FileNum, "",
----------------
JDevlieghere wrote:
> aprantl wrote:
> > Might be more efficient to wrap this in an
> > ```
> > #ifndef NDEBUG
> > #endif
> > ```
> > block.
> I gave it a shot but I'm not convinced it's better :-) 
Does the call to getFileNameByIndex get optimized away? If yes then that's okay, otherwise I'd prefer the NDEBUG block.


https://reviews.llvm.org/D43511





More information about the llvm-commits mailing list