PR42924 points out that copying the GlobalsMetadata type during construction of AddressSanitizer can result in exteremely lengthened build times for translation units that have many globals. This can be addressed by just making the GlobalsMD member in AddressSanitizer a reference to avoid the copy. The GlobalsMetadata type is already passed to the constructor as a reference anyway.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | ||
---|---|---|
695 | please add const into constructor maybe also pointer, so you can't pass temp object |
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | ||
---|---|---|
695 | Woops. Sorry, I committed after I got the LGTM but didn't see your comments until later. I committed r373391 which addresses these comments. |
please add const into constructor
ModuleAddressSanitizer(Module &M, const GlobalsMetadata &GlobalsMD,
maybe also pointer, so you can't pass temp object
ModuleAddressSanitizer(Module &M, const GlobalsMetadata *GlobalsMD,