Only call proc_share_dirname() in techmap when necessary

This commit is contained in:
Clifford Wolf 2014-08-23 15:32:00 +02:00
parent 58367cd87a
commit c642dd0b3e
1 changed files with 1 additions and 2 deletions

View File

@ -829,14 +829,13 @@ struct TechmapPass : public Pass {
int max_iter = -1;
size_t argidx;
std::string proc_share_path = proc_share_dirname();
for (argidx = 1; argidx < args.size(); argidx++) {
if (args[argidx] == "-map" && argidx+1 < args.size()) {
map_files.push_back(args[++argidx]);
continue;
}
if (args[argidx] == "-share_map" && argidx+1 < args.size()) {
map_files.push_back(proc_share_path + args[++argidx]);
map_files.push_back(proc_share_dirname() + args[++argidx]);
continue;
}
if (args[argidx] == "-max_iter" && argidx+1 < args.size()) {