This repository has been archived by the owner on Nov 8, 2023. It is now read-only.
mirrored from https://android.googlesource.com/platform/bionic.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge changes I72d37b7c,I7d254a10,I2e967acf
* changes: versioner: use a virtual filesystem for input files. versioner: cache -cc1 flags generated by the clang Driver. versioner: refactor to use CompilerInstance directly.
- Loading branch information
Showing
22 changed files
with
639 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright (C) 2016 The Android Open Source Project | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include "CompilationType.h" | ||
|
||
#include <sstream> | ||
#include <string> | ||
|
||
std::string to_string(const CompilationType& type) { | ||
std::stringstream ss; | ||
ss << to_string(type.arch) << "-" << type.api_level << " [fob = " << type.file_offset_bits << "]"; | ||
return ss.str(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Copyright (C) 2016 The Android Open Source Project | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <stdint.h> | ||
|
||
#include <functional> | ||
#include <utility> | ||
|
||
#include "Arch.h" | ||
|
||
struct CompilationType { | ||
Arch arch; | ||
int api_level; | ||
int file_offset_bits; | ||
|
||
private: | ||
auto tie() const { | ||
return std::tie(arch, api_level, file_offset_bits); | ||
} | ||
|
||
public: | ||
bool operator<(const CompilationType& other) const { | ||
return tie() < other.tie(); | ||
} | ||
|
||
bool operator==(const CompilationType& other) const { | ||
return tie() == other.tie(); | ||
} | ||
}; | ||
|
||
namespace std { | ||
template <> | ||
struct hash<CompilationType> { | ||
size_t operator()(CompilationType type) const { | ||
struct { | ||
int32_t arch : 3; | ||
int32_t api_level : 6; | ||
int32_t file_offset_bits : 1; | ||
int32_t padding : 22; | ||
} packed; | ||
packed.arch = static_cast<int32_t>(type.arch); | ||
packed.api_level = type.api_level; | ||
packed.file_offset_bits = (type.file_offset_bits == 64); | ||
packed.padding = 0; | ||
int32_t value; | ||
memcpy(&value, &packed, sizeof(value)); | ||
return std::hash<int32_t>()(value); | ||
} | ||
}; | ||
} | ||
|
||
std::string to_string(const CompilationType& type); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.