Skip to content

Commit

Permalink
Revert D50081664: Multisect successfully blamed "D50081664: [llvm15] …
Browse files Browse the repository at this point in the history
…Migrate "fbandroid" from LLVM-12 to LLVM-15" for test or build failures

Summary:
This diff is reverting D50081664
D50081664: [llvm15] Migrate "fbandroid" from LLVM-12 to LLVM-15 by meyering has been identified to be causing the following test or build failures:

Tests affected:
- [fbsource//fbandroid/javatests/com/facebook/samples/assistant/playground/context:test - testQuiet (com.facebook.samples.assistant.playground.context.LoudnessJNITest)](https://www.internalfb.com/intern/test/844425028584910/)

Here's the Multisect link:
https://www.internalfb.com/multisect/3330550
Here are the tasks that are relevant to this breakage:

We're generating a revert to back out the changes in this diff, please note the backout may land if someone accepts it.

If you believe this diff has been generated in error you may Commandeer and Abandon it.

Reviewed By: sheepsword

Differential Revision: D50400699

fbshipit-source-id: ad76412ddfdafc472b79d8be9ce4f9e358955164
  • Loading branch information
Dark Knight authored and facebook-github-bot committed Oct 18, 2023
1 parent 933d485 commit 979c16e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion opt/optimize_resources/OptimizeResources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ 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 @@ -419,6 +420,8 @@ 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 @@ -615,7 +618,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.empty());
always_assert(zip_dir.size());

// 1. Get all known resource ID's from either resources.pb(AAB) or
// resources.arsc(APK) file.
Expand Down
4 changes: 4 additions & 0 deletions test/integ/TypeAnalysisRemoveRedundantCmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,16 @@ 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: 4 additions & 0 deletions tools/redex-tool/Verifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ 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 979c16e

Please sign in to comment.