summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2022-03-01 16:43:39 -0800
committerTom Stellard <tstellar@redhat.com>2022-03-02 12:59:20 -0800
commit6d5afef3a7e6c2c9cc3bdb79e9d0fc88345e0e51 (patch)
treec52c448d6651783fe7d5d6b741fef27b7d895603
parent4fde843cd5c08c16f15d11308bdefc7bd2af0302 (diff)
[examples][BuildingAJIT] Use the right layer when adding code in Chapter 3.
We were incorrectly using the OptimizeLayer and bypassing the COD layer. (cherry picked from commit 1e16272ba793e5a6e7308898ecf6ef0dc99e2ad3)
-rw-r--r--llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h
index 130310da9274..de169804b06f 100644
--- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h
+++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h
@@ -120,7 +120,7 @@ public:
if (!RT)
RT = MainJD.getDefaultResourceTracker();
- return OptimizeLayer.add(RT, std::move(TSM));
+ return CODLayer.add(RT, std::move(TSM));
}
Expected<JITEvaluatedSymbol> lookup(StringRef Name) {