File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ swift_cc_binary(
14
14
"//swift/extractor/remapping" ,
15
15
"//swift/extractor/translators" ,
16
16
"//swift/third_party/swift-llvm-support" ,
17
- "@picosha2" ,
18
17
],
19
18
)
20
19
Original file line number Diff line number Diff line change 5
5
#include < iostream>
6
6
#include < regex>
7
7
#include < unistd.h>
8
- #include < picosha2.h >
8
+ #include < chrono >
9
9
10
10
#include < swift/Basic/LLVMInitialize.h>
11
11
#include < swift/FrontendTool/FrontendTool.h>
@@ -107,12 +107,8 @@ static void checkWhetherToRunUnderTool(int argc, char* const* argv) {
107
107
// Creates a target file that should store per-invocation info, e.g. compilation args,
108
108
// compilations, diagnostics, etc.
109
109
codeql::TargetFile invocationTargetFile (codeql::SwiftExtractorConfiguration& configuration) {
110
- auto hasher = picosha2::hash256_one_by_one ();
111
- for (auto & option : configuration.frontendOptions ) {
112
- hasher.process (option.c_str (), option.c_str () + option.size () + 1 );
113
- }
114
- hasher.finish ();
115
- auto target = " invocation-" s + get_hash_hex_string (hasher);
110
+ auto timestamp = std::chrono::system_clock::now ().time_since_epoch ().count ();
111
+ auto target = " invocation-" s + std::to_string (timestamp) + ' -' + std::to_string (getpid ());
116
112
auto maybeFile = codeql::createTargetTrapFile (configuration, target);
117
113
if (!maybeFile) {
118
114
std::cerr << " Cannot create invocation trap file: " << target << " \n " ;
You can’t perform that action at this time.
0 commit comments