s_source_map in ClangExternalASTSourceCommon.cpp is unguarded and therefore can break in multithreaded conditions. This can cause crashes in particular if multiple targets are being set up at once.
This patch wraps s_source_map in a function that ensures exclusivity, and makes every user of it use that function instead.