diff options
author | Sean Callanan <scallanan@apple.com> | 2015-11-10 22:54:42 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2015-11-10 22:54:42 +0000 |
commit | a3444ffcdd22ca4769c3958cf8e9f147060efcd1 (patch) | |
tree | 59db85ab335e154b217291de198eac29d7540760 /clang/lib/Frontend/InitPreprocessor.cpp | |
parent | 1ff9c632040b032c1b07679c7d8d36e0e0138d61 (diff) | |
download | bcm5719-llvm-a3444ffcdd22ca4769c3958cf8e9f147060efcd1.tar.gz bcm5719-llvm-a3444ffcdd22ca4769c3958cf8e9f147060efcd1.zip |
Made the ClangASTImporter into a shared pointer, eliminating a race condition.
It used to be a unique pointer, and there could be a case where ClangASTSource
held onto a copy of the pointer but Target::Destroy destroyed the unique pointer
in the mean time.
I also ensured that there is a validity check on the target (which confirms that
a ClangASTImporter can be generated) before the target's shared pointer is
copied into ClangASTSource.
This race condition caused a crash if Target::Destroy was called and then later
the target objecct was deleted.
llvm-svn: 252665
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions