#cmakedefine01 ENABLE_X86_RELAX_RELOCATIONS
/* Enable each functionality of modules */
-#cmakedefine CLANG_ENABLE_ARCMT
-#cmakedefine CLANG_ENABLE_OBJC_REWRITER
-#cmakedefine CLANG_ENABLE_STATIC_ANALYZER
+#cmakedefine01 CLANG_ENABLE_ARCMT
+#cmakedefine01 CLANG_ENABLE_OBJC_REWRITER
+#cmakedefine01 CLANG_ENABLE_STATIC_ANALYZER
#endif
case RewriteMacros: return llvm::make_unique<RewriteMacrosAction>();
case RewriteTest: return llvm::make_unique<RewriteTestAction>();
-#ifdef CLANG_ENABLE_OBJC_REWRITER
+#if CLANG_ENABLE_OBJC_REWRITER
case RewriteObjC: return llvm::make_unique<RewriteObjCAction>();
#else
case RewriteObjC: Action = "RewriteObjC"; break;
#endif
-#ifdef CLANG_ENABLE_ARCMT
+#if CLANG_ENABLE_ARCMT
case MigrateSource:
return llvm::make_unique<arcmt::MigrateSourceAction>();
#else
case MigrateSource: Action = "MigrateSource"; break;
#endif
-#ifdef CLANG_ENABLE_STATIC_ANALYZER
+#if CLANG_ENABLE_STATIC_ANALYZER
case RunAnalysis: return llvm::make_unique<ento::AnalysisAction>();
#else
case RunAnalysis: Action = "RunAnalysis"; break;
case RunPreprocessorOnly: return llvm::make_unique<PreprocessOnlyAction>();
}
-#if !defined(CLANG_ENABLE_ARCMT) || !defined(CLANG_ENABLE_STATIC_ANALYZER) \
- || !defined(CLANG_ENABLE_OBJC_REWRITER)
+#if !CLANG_ENABLE_ARCMT || !CLANG_ENABLE_STATIC_ANALYZER \
+ || !CLANG_ENABLE_OBJC_REWRITER
CI.getDiagnostics().Report(diag::err_fe_action_not_available) << Action;
return 0;
#else
Act = llvm::make_unique<FixItRecompile>(std::move(Act));
}
-#ifdef CLANG_ENABLE_ARCMT
+#if CLANG_ENABLE_ARCMT
if (CI.getFrontendOpts().ProgramAction != frontend::MigrateSource &&
CI.getFrontendOpts().ProgramAction != frontend::GeneratePCH) {
// Potentially wrap the base FE action in an ARC Migrate Tool action.
llvm::cl::ParseCommandLineOptions(NumArgs + 1, Args.get());
}
-#ifdef CLANG_ENABLE_STATIC_ANALYZER
+#if CLANG_ENABLE_STATIC_ANALYZER
// Honor -analyzer-checker-help.
// This should happen AFTER plugins have been loaded!
if (Clang->getAnalyzerOpts()->ShowCheckerHelp) {
//===----------------------------------------------------------------------===//
CXRemapping clang_getRemappings(const char *migrate_dir_path) {
-#ifndef CLANG_ENABLE_ARCMT
+#if !CLANG_ENABLE_ARCMT
llvm::errs() << "error: feature not enabled in this build\n";
return nullptr;
#else
CXRemapping clang_getRemappingsFromFileList(const char **filePaths,
unsigned numFiles) {
-#ifndef CLANG_ENABLE_ARCMT
+#if !CLANG_ENABLE_ARCMT
llvm::errs() << "error: feature not enabled in this build\n";
return nullptr;
#else