| diff --git a/clang_delta/Transformation.cpp b/clang_delta/Transformation.cpp |
| index 8dc9f75..b7dcda3 100644 |
| --- a/clang_delta/Transformation.cpp |
| +++ b/clang_delta/Transformation.cpp |
| @@ -433,7 +433,11 @@ const Expr *Transformation::getBaseExprAndIdxs(const Expr *E, |
| // If we cannot have an integeral index, use 0. |
| if (IdxE && IdxE->EvaluateAsInt(Result, *Context)) { |
| llvm::APSInt IVal = Result.Val.getInt(); |
| -#if LLVM_VERSION_MAJOR >= 13 |
| +#if LLVM_VERSION_MAJOR >= 18 |
| + llvm::SmallString<40> IntStrTmp; |
| + IVal.toString(IntStrTmp, 10); |
| + std::string IntStr{IntStrTmp}; |
| +#elif LLVM_VERSION_MAJOR >= 13 |
| std::string IntStr = toString(IVal, 10); |
| #else |
| std::string IntStr = IVal.toString(10); |