Add pnacl-freeze to the tests_lit/lit.cfg. Also, unsigned vs signed.
Otherwise, I don't have pnacl-freeze in my path, and
I think the lit tests have trouble finding it.
src/PNaClTranslator.cpp: In member function ‘uint32_t {anonymous}::FunctionParser::convertRelativeToAbsIndex(int32_t)’:
src/PNaClTranslator.cpp:882:55: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (Id > 0 && AbsNextId < static_cast<uint32_t>(Id)) {
^
BUG=none
R=kschimpf@google.com, stichnot@chromium.org
Review URL: https://codereview.chromium.org/515003004
diff --git a/src/PNaClTranslator.cpp b/src/PNaClTranslator.cpp
index 5381315..d7dc0c3 100644
--- a/src/PNaClTranslator.cpp
+++ b/src/PNaClTranslator.cpp
@@ -879,7 +879,7 @@
// an absolute value index.
uint32_t convertRelativeToAbsIndex(int32_t Id) {
int32_t AbsNextId = CachedNumGlobalValueIDs + LocalOperands.size();
- if (Id > 0 && AbsNextId < static_cast<uint32_t>(Id)) {
+ if (Id > 0 && AbsNextId < Id) {
std::string Buffer;
raw_string_ostream StrBuf(Buffer);
StrBuf << "Invalid relative value id: " << Id
diff --git a/tests_lit/lit.cfg b/tests_lit/lit.cfg
index 131e500..735474e 100644
--- a/tests_lit/lit.cfg
+++ b/tests_lit/lit.cfg
@@ -42,7 +42,8 @@
config.substitutions.append(('%llvm2ice', llvm2icetool))
config.substitutions.append(('%szdiff', os.path.join(bin_root, 'szdiff.py')))
-llvmbintools = [r"\bFileCheck\b", r"\bllvm-mc\b", r"\bnot\b"]
+llvmbintools = [r"\bFileCheck\b", r"\bllvm-mc\b", r"\bnot\b",
+ r"\bpnacl-freeze\b"]
for tool in llvmbintools:
# The re.sub() line is adapted from one of LLVM's lit.cfg files.