Skip to content

Commit

Permalink
Migrate "fbandroid" from LLVM-12 to LLVM-15
Browse files Browse the repository at this point in the history
Summary:
[context, this started off as D50081664, which landed (finally), but I missed a legitimate test failure, which led to its being reverted, so this is a re-do. https://fburl.com/workplace/8ihd2py9 ]

fbcode is migrating to LLVM-15 for safer and more up-to-date code and new compiler features. All contbuilds in your directory have passed our build test with LLVM-15, and your directory does not house any packages. This diff will migrate it to LLVM-15.

If you approve of this diff, please use the "Accept & Ship" button. If you have a blocker on building with LLVM 15, please comment on this diff. All fbcode directories will move to LLVM 15, so please start working on the fixes, testing and canary ASAP. If all tests are green, we will land this on Friday 10/13/2023.

See the [FAQ post](https://fb.workplace.com/groups/llvm15platform010/posts/749154386769776/)! Please also direct any questions to [this group](https://fb.workplace.com/groups/llvm15platform010).

 - If you approve of this diff, please use the "Accept & Ship" button :-)

Reviewed By: mzlee

Differential Revision: D50410882

fbshipit-source-id: 3ef5ee68d96d329c9ef04222063b68d015d090f9
  • Loading branch information
Jim Meyering authored and facebook-github-bot committed Oct 19, 2023
1 parent 1775315 commit 28d31d6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
5 changes: 1 addition & 4 deletions opt/optimize_resources/OptimizeResources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ void remap_resource_class_clinit(
std::vector<uint16_t> filtered_op_data_entries;

uint16_t header_entry = *(op_data->data());
int deleted_array_element_count = 0;
auto array_ints = get_fill_array_data_payload<uint32_t>(op_data);
for (uint32_t entry_x : array_ints) {
if (entry_x > PACKAGE_RESID_START) {
Expand All @@ -420,8 +419,6 @@ void remap_resource_class_clinit(
if (c_name.find("R$styleable") != std::string::npos) {
filtered_op_data_entries.push_back(0);
filtered_op_data_entries.push_back(0);
} else {
++deleted_array_element_count;
}
}
} else {
Expand Down Expand Up @@ -618,7 +615,7 @@ void OptimizeResourcesPass::run_pass(DexStoresVector& stores,
PassManager& mgr) {
std::string zip_dir;
conf.get_json_config().get("apk_dir", "", zip_dir);
always_assert(zip_dir.size());
always_assert(!zip_dir.empty());

// 1. Get all known resource ID's from either resources.pb(AAB) or
// resources.arsc(APK) file.
Expand Down
4 changes: 0 additions & 4 deletions test/integ/TypeAnalysisRemoveRedundantCmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,12 @@ TEST_F(TypeAnalysisTransformTest, MethodHasNoEqDefined) {
DexMethod::get_method(
"LTypeAnalysisRemoveRedundantCmp;.getYy:()Ljava/lang/String;")
->as_def();
bool found_cmpz = false;
auto codey = y_method->get_code();
ASSERT_NE(nullptr, codey);
auto jj = InstructionIterable(y_method->get_code());
auto end2 = jj.end();
for (auto it = jj.begin(); it != end2; ++it) {
auto insn = it->insn;
if (insn->opcode() == OPCODE_IF_EQZ || insn->opcode() == OPCODE_IF_NEZ) {
found_cmpz = true;
}
}
}

Expand Down
4 changes: 0 additions & 4 deletions tools/redex-tool/Verifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ void verify(DexStoresVector& stores) {
}
build_refs(scope, class_refs);
}
int references = 0;
for (const auto& refs : class_refs) {
references += (int)refs.second.size();
}

// Build allowed stor (references) map
allowed_store_map_t allowed_store_map;
Expand Down

0 comments on commit 28d31d6

Please sign in to comment.