summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/ARCMigrate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/libclang/ARCMigrate.cpp')
-rw-r--r--clang/tools/libclang/ARCMigrate.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/tools/libclang/ARCMigrate.cpp b/clang/tools/libclang/ARCMigrate.cpp
index 6ddc22f474b..375c5f40c21 100644
--- a/clang/tools/libclang/ARCMigrate.cpp
+++ b/clang/tools/libclang/ARCMigrate.cpp
@@ -35,6 +35,10 @@ struct Remap {
extern "C" {
CXRemapping clang_getRemappings(const char *migrate_dir_path) {
+#ifndef CLANG_ENABLE_ARCMT
+ llvm::errs() << "error: feature not enabled in this build\n";
+ return nullptr;
+#else
bool Logging = ::getenv("LIBCLANG_LOGGING");
if (!migrate_dir_path) {
@@ -71,10 +75,15 @@ CXRemapping clang_getRemappings(const char *migrate_dir_path) {
}
return remap.release();
+#endif
}
CXRemapping clang_getRemappingsFromFileList(const char **filePaths,
unsigned numFiles) {
+#ifndef CLANG_ENABLE_ARCMT
+ llvm::errs() << "error: feature not enabled in this build\n";
+ return nullptr;
+#else
bool Logging = ::getenv("LIBCLANG_LOGGING");
std::unique_ptr<Remap> remap(new Remap());
@@ -112,6 +121,7 @@ CXRemapping clang_getRemappingsFromFileList(const char **filePaths,
}
return remap.release();
+#endif
}
unsigned clang_remap_getNumFiles(CXRemapping map) {
OpenPOWER on IntegriCloud