This is an archive of the discontinued LLVM Phabricator instance.

[ASan] Added __cplusplus guard around the C++ code so it is safe to include asan_mapping.h in assembly files.
ClosedPublic

Authored by kstoimenov on Dec 8 2021, 7:33 AM.

Details

Summary

This will avoid addind asan_shadow_defines.h in D114558.

Diff Detail

Event Timeline

kstoimenov requested review of this revision.Dec 8 2021, 7:33 AM
kstoimenov created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2021, 7:33 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
kstoimenov updated this revision to Diff 392801.Dec 8 2021, 8:46 AM

Fixed compile error.

kstoimenov updated this revision to Diff 392803.Dec 8 2021, 8:52 AM

Added an error message.

kstoimenov updated this revision to Diff 392807.Dec 8 2021, 9:00 AM

Fixed message.

kstoimenov updated this revision to Diff 392808.Dec 8 2021, 9:02 AM

Removed quotes.

kstoimenov updated this revision to Diff 392815.Dec 8 2021, 9:35 AM

More lint.

vitalybuka added inline comments.Dec 8 2021, 11:07 AM
compiler-rt/lib/asan/asan_mapping.h
215

can you please clang-format entire file in a separate patch and rebase?

vitalybuka accepted this revision.Dec 8 2021, 11:20 AM
vitalybuka added inline comments.
compiler-rt/lib/asan/asan_mapping.h
198–199

actually clangformat in this file + c++ guard is OK

This errors" are probably redundant

This revision is now accepted and ready to land.Dec 8 2021, 11:20 AM

[ASan] Ran clang-format on asan_mappings.h.

kstoimenov marked an inline comment as done.
kstoimenov added inline comments.
compiler-rt/lib/asan/asan_mapping.h
198–199

Not sure what you mean by this? What would you like me to do?

215

See D115371.

vitalybuka added inline comments.Dec 8 2021, 12:37 PM
compiler-rt/lib/asan/asan_mapping.h
198–199

I wanted to say patch as-is was ok.
But errors probably unnecessary as ASAN_SHADOW_SCALE set to 3

kstoimenov updated this revision to Diff 392901.Dec 8 2021, 1:01 PM
kstoimenov marked an inline comment as done.

After pull.

This revision was landed with ongoing or failed builds.Dec 8 2021, 1:03 PM
This revision was automatically updated to reflect the committed changes.