aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2021-10-11 20:53:15 -0700
committerLang Hames <lhames@gmail.com>2021-10-11 20:54:12 -0700
commitb7c1ccd4229c0e4ea9da60a4853ac8759ba804c0 (patch)
tree4d0c7b5c782ba52b94a9c60852c9f8444c951fb8
parentd57a87ea89c750b6d1cf359b619eea4eda806e1a (diff)
downloadllvm-b7c1ccd4229c0e4ea9da60a4853ac8759ba804c0.zip
llvm-b7c1ccd4229c0e4ea9da60a4853ac8759ba804c0.tar.gz
llvm-b7c1ccd4229c0e4ea9da60a4853ac8759ba804c0.tar.bz2
[llvm-jitlink] Fix a broken warning.
This warning should only be issued if -slab-page-size has not been used.
-rw-r--r--llvm/tools/llvm-jitlink/llvm-jitlink.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-jitlink/llvm-jitlink.cpp b/llvm/tools/llvm-jitlink/llvm-jitlink.cpp
index 7eb1da5..50ce6e8 100644
--- a/llvm/tools/llvm-jitlink/llvm-jitlink.cpp
+++ b/llvm/tools/llvm-jitlink/llvm-jitlink.cpp
@@ -1121,7 +1121,8 @@ static Error sanitizeArguments(const Triple &TT, const char *ArgV0) {
"-slab-address requires -slab-allocate and -noexec",
inconvertibleErrorCode());
- errs() << "Warning: -slab-address used without -slab-page-size.\n";
+ if (SlabPageSize == 0)
+ errs() << "Warning: -slab-address used without -slab-page-size.\n";
}
if (SlabPageSize != 0) {