diff options
author | huangs <huangs@chromium.org> | 2016-01-18 13:35:39 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-18 21:37:40 +0000 |
commit | 597bdbaaaa3ebef0f6b74afcda0dac7aa035b08a (patch) | |
tree | 37f4a1813505a96a4aea04145ef5c6c8f64e52a6 /courgette | |
parent | f6f2c110ca7540bbd383699aea52fd07912bee60 (diff) | |
download | chromium_src-597bdbaaaa3ebef0f6b74afcda0dac7aa035b08a.zip chromium_src-597bdbaaaa3ebef0f6b74afcda0dac7aa035b08a.tar.gz chromium_src-597bdbaaaa3ebef0f6b74afcda0dac7aa035b08a.tar.bz2 |
[Courgette] Make Courgette-dis trim labels.
Courgette-gen and Courgette-apply both call TrimLabels() for the
assembly programs generated from input image. The testing mode
Courgette-dis should also do so.
Review URL: https://codereview.chromium.org/1600953002
Cr-Commit-Position: refs/heads/master@{#370052}
Diffstat (limited to 'courgette')
-rw-r--r-- | courgette/courgette_tool.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/courgette/courgette_tool.cc b/courgette/courgette_tool.cc index 88c346b..635dd91 100644 --- a/courgette/courgette_tool.cc +++ b/courgette/courgette_tool.cc @@ -84,6 +84,13 @@ void Disassemble(const base::FilePath& input_file, if (parse_status != courgette::C_OK) Problem("Can't parse input."); + // Trim labels below a certain threshold + const courgette::Status trim_status = TrimLabels(program); + if (trim_status != courgette::C_OK) { + courgette::DeleteAssemblyProgram(program); + Problem("Can't trim labels."); + } + courgette::EncodedProgram* encoded = NULL; const courgette::Status encode_status = Encode(program, &encoded); |