[PATCH] D38098: Removed platform-specific ifdefs from sanitizer_procmaps.h

Yicheng Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 20 16:06:25 PDT 2017


Vurchin added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_procmaps.h:89
 # endif
+  MemoryMappingLayoutData *data_;
 };
----------------
fjricci wrote:
> Vurchin wrote:
> > vitalybuka wrote:
> > > Instead of dynamic allocation maybe just:
> > > 
> > > 
> > > ```
> > > #inlude <sanitizer_procmaps_linux.h>
> > > #inlude <sanitizer_procmaps_mac.h>
> > > ... 
> > > MemoryMappingLayoutData data_;
> > > ```
> > So do you think I should create these two files?
> I would lean towards just using sanitizer_mac.h, like you already did for sanitizer_linux.h, since it seems silly to create a header for just one struct. But will defer to @vitalybuka 
Haha, alright, I also like that idea


https://reviews.llvm.org/D38098





More information about the llvm-commits mailing list