@@ -215,20 +215,10 @@ std::string GetVersion() {
215215}
216216
217217std::string Demangle (const std::string& mangled_name) {
218- #if CLANG_VERSION_MAJOR > 16
219218#ifdef _WIN32
220219 std::string demangle = microsoftDemangle (mangled_name, nullptr , nullptr );
221220#else
222221 std::string demangle = itaniumDemangle (mangled_name);
223- #endif
224- #else
225- #ifdef _WIN32
226- std::string demangle = microsoftDemangle (mangled_name.c_str (), nullptr ,
227- nullptr , nullptr , nullptr );
228- #else
229- std::string demangle =
230- itaniumDemangle (mangled_name.c_str (), nullptr , nullptr , nullptr );
231- #endif
232222#endif
233223 return demangle;
234224}
@@ -574,9 +564,7 @@ std::string GetQualifiedCompleteName(TCppType_t klass) {
574564 PrintingPolicy PP = C.getPrintingPolicy ();
575565 PP.FullyQualifiedName = true ;
576566 PP.SuppressUnwrittenScope = true ;
577- #if CLANG_VERSION_MAJOR > 16
578567 PP.SuppressElaboration = true ;
579- #endif
580568 QT.getAsStringInternal (type_name, PP);
581569
582570 return type_name;
@@ -1689,9 +1677,7 @@ std::string GetTypeAsString(TCppType_t var) {
16891677 PrintingPolicy Policy ((LangOptions ()));
16901678 Policy.Bool = true ; // Print bool instead of _Bool.
16911679 Policy.SuppressTagKeyword = true ; // Do not print `class std::string`.
1692- #if CLANG_VERSION_MAJOR > 16
16931680 Policy.SuppressElaboration = true ;
1694- #endif
16951681 Policy.FullyQualifiedName = true ;
16961682 return compat::FixTypeName (QT.getAsString (Policy));
16971683}
@@ -1834,9 +1820,7 @@ void get_type_as_string(QualType QT, std::string& type_name, ASTContext& C,
18341820 // cling::utils::Transform::GetPartiallyDesugaredType()
18351821 if (!QT->isTypedefNameType () || QT->isBuiltinType ())
18361822 QT = QT.getDesugaredType (C);
1837- #if CLANG_VERSION_MAJOR > 16
18381823 Policy.SuppressElaboration = true ;
1839- #endif
18401824 Policy.SuppressTagKeyword = !QT->isEnumeralType ();
18411825 Policy.FullyQualifiedName = true ;
18421826 QT.getAsStringInternal (type_name, Policy);
@@ -1876,9 +1860,7 @@ void collect_type_info(const FunctionDecl* FD, QualType& QT,
18761860 //
18771861 ASTContext& C = FD->getASTContext ();
18781862 PrintingPolicy Policy (C.getPrintingPolicy ());
1879- #if CLANG_VERSION_MAJOR > 16
18801863 Policy.SuppressElaboration = true ;
1881- #endif
18821864 refType = kNotReference ;
18831865 if (QT->isRecordType () && forArgument) {
18841866 get_type_as_string (QT, type_name, C, Policy);
@@ -2092,9 +2074,7 @@ void make_narg_call(const FunctionDecl* FD, const std::string& return_type,
20922074 PrintingPolicy PP = FD->getASTContext ().getPrintingPolicy ();
20932075 PP.FullyQualifiedName = true ;
20942076 PP.SuppressUnwrittenScope = true ;
2095- #if CLANG_VERSION_MAJOR > 16
20962077 PP.SuppressElaboration = true ;
2097- #endif
20982078 FD->getNameForDiagnostic (stream, PP,
20992079 /* Qualified=*/ false );
21002080
@@ -3353,11 +3333,7 @@ bool InsertOrReplaceJitSymbol(compat::Interpreter& I,
33533333 auto Symbol = compat::getSymbolAddress (I, linker_mangled_name);
33543334 llvm::orc::LLJIT& Jit = *compat::getExecutionEngine (I);
33553335 llvm::orc::ExecutionSession& ES = Jit.getExecutionSession ();
3356- #if CLANG_VERSION_MAJOR < 17
3357- JITDylib& DyLib = Jit.getMainJITDylib ();
3358- #else
33593336 JITDylib& DyLib = *Jit.getProcessSymbolsJITDylib ().get ();
3360- #endif // CLANG_VERSION_MAJOR
33613337
33623338 if (Error Err = Symbol.takeError ()) {
33633339 logAllUnhandledErrors (std::move (Err), errs (),
@@ -3385,12 +3361,7 @@ bool InsertOrReplaceJitSymbol(compat::Interpreter& I,
33853361 }
33863362 auto Name = ES.intern (tmp);
33873363 InjectedSymbols[Name] =
3388- #if CLANG_VERSION_MAJOR < 17
3389- JITEvaluatedSymbol (address,
3390- #else
3391- ExecutorSymbolDef (ExecutorAddr (address),
3392- #endif // CLANG_VERSION_MAJOR < 17
3393- JITSymbolFlags::Exported);
3364+ ExecutorSymbolDef (ExecutorAddr (address), JITSymbolFlags::Exported);
33943365
33953366 // We want to replace a symbol with a custom provided one.
33963367 if (Symbol && address)
0 commit comments