r365832 - Fix a Python3 compatibility error
Author: azhar Date: Thu Jul 11 14:45:48 2019 New Revision: 365832 URL: http://llvm.org/viewvc/llvm-project?rev=365832&view=rev Log: Fix a Python3 compatibility error File "clang/test/lit.cfg.py", line 186, in config.available_features.add('macos-sdk-' + macOSSDKVersion) TypeError: must be str, not bytes Modified: cfe/trunk/test/lit.cfg.py Modified: cfe/trunk/test/lit.cfg.py URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg.py?rev=365832&r1=365831&r2=365832&view=diff == --- cfe/trunk/test/lit.cfg.py (original) +++ cfe/trunk/test/lit.cfg.py Thu Jul 11 14:45:48 2019 @@ -183,7 +183,7 @@ if run_console_tests != 0: lit.util.usePlatformSdkOnDarwin(config, lit_config) macOSSDKVersion = lit.util.findPlatformSdkVersionOnMacOS(config, lit_config) if macOSSDKVersion is not None: -config.available_features.add('macos-sdk-' + macOSSDKVersion) +config.available_features.add('macos-sdk-' + str(macOSSDKVersion)) if os.path.exists('/etc/gentoo-release'): config.available_features.add('gentoo') ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] r366551 - Revert r366458, r366467 and r366468
Author: azhar Date: Fri Jul 19 02:26:33 2019 New Revision: 366551 URL: http://llvm.org/viewvc/llvm-project?rev=366551&view=rev Log: Revert r366458, r366467 and r366468 r366458 is causing test failures. r366467 and r366468 had to be reverted as they were casuing conflict while reverting r366458. r366468 [clangd] Remove dead code from BackgroundIndex r366467 [clangd] BackgroundIndex stores shards to the closest project r366458 [clangd] Refactor background-index shard loading Added: clang-tools-extra/trunk/clangd/test/Inputs/background-index/foo.h Removed: clang-tools-extra/trunk/clangd/index/BackgroundIndexLoader.cpp clang-tools-extra/trunk/clangd/index/BackgroundIndexLoader.h clang-tools-extra/trunk/clangd/test/Inputs/background-index/sub_dir/ Modified: clang-tools-extra/trunk/clangd/CMakeLists.txt clang-tools-extra/trunk/clangd/ClangdServer.cpp clang-tools-extra/trunk/clangd/index/Background.cpp clang-tools-extra/trunk/clangd/index/Background.h clang-tools-extra/trunk/clangd/index/BackgroundIndexStorage.cpp clang-tools-extra/trunk/clangd/index/BackgroundRebuild.cpp clang-tools-extra/trunk/clangd/index/BackgroundRebuild.h clang-tools-extra/trunk/clangd/test/Inputs/background-index/definition.jsonrpc clang-tools-extra/trunk/clangd/test/Inputs/background-index/foo.cpp clang-tools-extra/trunk/clangd/test/background-index.test clang-tools-extra/trunk/clangd/unittests/BackgroundIndexTests.cpp Modified: clang-tools-extra/trunk/clangd/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/CMakeLists.txt?rev=366551&r1=366550&r2=366551&view=diff == --- clang-tools-extra/trunk/clangd/CMakeLists.txt (original) +++ clang-tools-extra/trunk/clangd/CMakeLists.txt Fri Jul 19 02:26:33 2019 @@ -73,7 +73,6 @@ add_clang_library(clangDaemon XRefs.cpp index/Background.cpp - index/BackgroundIndexLoader.cpp index/BackgroundIndexStorage.cpp index/BackgroundQueue.cpp index/BackgroundRebuild.cpp Modified: clang-tools-extra/trunk/clangd/ClangdServer.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/ClangdServer.cpp?rev=366551&r1=366550&r2=366551&view=diff == --- clang-tools-extra/trunk/clangd/ClangdServer.cpp (original) +++ clang-tools-extra/trunk/clangd/ClangdServer.cpp Fri Jul 19 02:26:33 2019 @@ -127,8 +127,7 @@ ClangdServer::ClangdServer(const GlobalC if (Opts.BackgroundIndex) { BackgroundIdx = llvm::make_unique( Context::current().clone(), FSProvider, CDB, -BackgroundIndexStorage::createDiskBackedStorageFactory( -[&CDB](llvm::StringRef File) { return CDB.getProjectInfo(File); })); +BackgroundIndexStorage::createDiskBackedStorageFactory()); AddIndex(BackgroundIdx.get()); } if (DynamicIdx) Modified: clang-tools-extra/trunk/clangd/index/Background.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/index/Background.cpp?rev=366551&r1=366550&r2=366551&view=diff == --- clang-tools-extra/trunk/clangd/index/Background.cpp (original) +++ clang-tools-extra/trunk/clangd/index/Background.cpp Fri Jul 19 02:26:33 2019 @@ -10,7 +10,6 @@ #include "ClangdUnit.h" #include "Compiler.h" #include "Context.h" -#include "FSProvider.h" #include "Headers.h" #include "Logger.h" #include "Path.h" @@ -19,7 +18,6 @@ #include "Threading.h" #include "Trace.h" #include "URI.h" -#include "index/BackgroundIndexLoader.h" #include "index/FileIndex.h" #include "index/IndexAction.h" #include "index/MemIndex.h" @@ -30,8 +28,6 @@ #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" #include "clang/Driver/Types.h" -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/DenseSet.h" #include "llvm/ADT/Hashing.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/ScopeExit.h" @@ -46,7 +42,6 @@ #include #include #include -#include #include #include #include @@ -54,8 +49,6 @@ #include #include #include -#include -#include namespace clang { namespace clangd { @@ -126,18 +119,6 @@ llvm::SmallString<128> getAbsolutePath(c } return AbsolutePath; } - -bool shardIsStale(const LoadedShard &LS, llvm::vfs::FileSystem *FS) { - auto Buf = FS->getBufferForFile(LS.AbsolutePath); - if (!Buf) { -elog("Background-index: Couldn't read {0} to validate stored index: {1}", - LS.AbsolutePath, Buf.getError().message()); -// There is no point in indexing an unreadable file. -return false; - } - return digest(Buf->get()->getBuffer()) != LS.Digest; -} - } // namespace BackgroundIndex::BackgroundIndex( @@ -175,14 +156,14 @@ BackgroundQueue::Task BackgroundIndex::c log("Enqueueing {0} commands for indexing", ChangedFiles.size()); SPAN_ATTACH(Trac
r366953 - Revert "NFC: utils/perf-training: Python 3 compatibility for lit.cfg"
Author: azhar Date: Wed Jul 24 15:42:50 2019 New Revision: 366953 URL: http://llvm.org/viewvc/llvm-project?rev=366953&view=rev Log: Revert "NFC: utils/perf-training: Python 3 compatibility for lit.cfg" This reverts commit 9178b10163f758cbf8a5290ea6a827990427ddc0 (r365969). We are back to using Python2 and this is failing. This should instead be made to be compatible with both Python 2 and 3. Modified: cfe/trunk/utils/perf-training/lit.cfg Modified: cfe/trunk/utils/perf-training/lit.cfg URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/perf-training/lit.cfg?rev=366953&r1=366952&r2=366953&view=diff == --- cfe/trunk/utils/perf-training/lit.cfg (original) +++ cfe/trunk/utils/perf-training/lit.cfg Wed Jul 24 15:42:50 2019 @@ -10,7 +10,7 @@ def getSysrootFlagsOnDarwin(config, lit_ # default system root path. if 'darwin' in config.target_triple: try: -out = subprocess.check_output(['xcrun', '--show-sdk-path']).strip().decode() +out = subprocess.check_output(['xcrun', '--show-sdk-path']).strip() res = 0 except OSError: res = -1 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] b0eb7cd - Reapply "NFC: utils/perf-training: Python 3 compatibility for lit.cfg"
Author: Azharuddin Mohammed Date: 2020-05-05T15:56:23-07:00 New Revision: b0eb7cd2be849f0551e9b05a0cbf2d59d8c9f50d URL: https://github.com/llvm/llvm-project/commit/b0eb7cd2be849f0551e9b05a0cbf2d59d8c9f50d DIFF: https://github.com/llvm/llvm-project/commit/b0eb7cd2be849f0551e9b05a0cbf2d59d8c9f50d.diff LOG: Reapply "NFC: utils/perf-training: Python 3 compatibility for lit.cfg" This is in response to the recent move to Python 3. This reverts commit 5f4426e517fc26d10db2fd09f3e254e80446d62d. Added: Modified: clang/utils/perf-training/lit.cfg Removed: diff --git a/clang/utils/perf-training/lit.cfg b/clang/utils/perf-training/lit.cfg index e5b7162e5904..acb50ad30d7a 100644 --- a/clang/utils/perf-training/lit.cfg +++ b/clang/utils/perf-training/lit.cfg @@ -10,7 +10,7 @@ def getSysrootFlagsOnDarwin(config, lit_config): # default system root path. if 'darwin' in config.target_triple: try: -out = subprocess.check_output(['xcrun', '--show-sdk-path']).strip() +out = subprocess.check_output(['xcrun', '--show-sdk-path']).strip().decode() res = 0 except OSError: res = -1 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] d22985c - [Driver][XRay][test] Update the macOS support check
Author: Azharuddin Mohammed Date: 2020-08-27T14:05:43-07:00 New Revision: d22985c410873872a96ad3f53170df57c62aac9e URL: https://github.com/llvm/llvm-project/commit/d22985c410873872a96ad3f53170df57c62aac9e DIFF: https://github.com/llvm/llvm-project/commit/d22985c410873872a96ad3f53170df57c62aac9e.diff LOG: [Driver][XRay][test] Update the macOS support check For macOS, the code says, the XRay flag is only supported on x86_64. Updating the test and making that check explicit. Differential Revision: https://reviews.llvm.org/D85773 Added: Modified: clang/test/Driver/XRay/xray-instrument-os.c Removed: diff --git a/clang/test/Driver/XRay/xray-instrument-os.c b/clang/test/Driver/XRay/xray-instrument-os.c index ba97328b54a6..3a0397208326 100644 --- a/clang/test/Driver/XRay/xray-instrument-os.c +++ b/clang/test/Driver/XRay/xray-instrument-os.c @@ -1,4 +1,4 @@ // RUN: not %clang -o /dev/null -v -fxray-instrument -c %s -// XFAIL: -linux-, -freebsd, -darwin, -macos +// XFAIL: -linux-, -freebsd, x86_64-apple-darwin, x86_64-apple-macos // REQUIRES: amd64 || x86_64 || x86_64h || arm || aarch64 || arm64 typedef int a; ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] d95ef00 - Update clang/test/Driver/darwin-infer-simulator-sdkroot.c
Author: Azharuddin Mohammed Date: 2020-09-08T11:27:18-07:00 New Revision: d95ef009bd502a1c2c82952d4fa6fd1db836cef9 URL: https://github.com/llvm/llvm-project/commit/d95ef009bd502a1c2c82952d4fa6fd1db836cef9 DIFF: https://github.com/llvm/llvm-project/commit/d95ef009bd502a1c2c82952d4fa6fd1db836cef9.diff LOG: Update clang/test/Driver/darwin-infer-simulator-sdkroot.c - Fix it to work on Apple Silicon - Add testcases for simulators running on Apple Silicon Added: Modified: clang/test/Driver/darwin-infer-simulator-sdkroot.c Removed: diff --git a/clang/test/Driver/darwin-infer-simulator-sdkroot.c b/clang/test/Driver/darwin-infer-simulator-sdkroot.c index a084bf6346b6..7d4d4070b81a 100644 --- a/clang/test/Driver/darwin-infer-simulator-sdkroot.c +++ b/clang/test/Driver/darwin-infer-simulator-sdkroot.c @@ -17,7 +17,7 @@ // // RUN: rm -rf %t/SDKs/iPhoneSimulator8.0.sdk // RUN: mkdir -p %t/SDKs/iPhoneSimulator8.0.sdk -// RUN: env SDKROOT=%t/SDKs/iPhoneSimulator8.0.sdk %clang %s -mlinker-version=400 -### 2>&1 \ +// RUN: env SDKROOT=%t/SDKs/iPhoneSimulator8.0.sdk %clang -arch x86_64 %s -mlinker-version=400 -### 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-SIMULATOR %s // // CHECK-SIMULATOR: clang @@ -27,6 +27,18 @@ // CHECK-SIMULATOR: "-ios_simulator_version_min" "8.0.0" // // +// RUN: rm -rf %t/SDKs/iPhoneSimulator14.0.sdk +// RUN: mkdir -p %t/SDKs/iPhoneSimulator14.0.sdk +// RUN: env SDKROOT=%t/SDKs/iPhoneSimulator14.0.sdk %clang -arch arm64 %s -mlinker-version=400 -### 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-SIMULATOR-ARM64 %s +// +// CHECK-SIMULATOR-ARM64: clang +// CHECK-SIMULATOR-ARM64: "-cc1" +// CHECK-SIMULATOR-ARM64: -apple-ios14.0.0-simulator" +// CHECK-SIMULATOR-ARM64: ld +// CHECK-SIMULATOR-ARM64: "-ios_simulator_version_min" "14.0.0" +// +// // RUN: rm -rf %t/SDKs/WatchOS3.0.sdk // RUN: mkdir -p %t/SDKs/WatchOS3.0.sdk // RUN: env SDKROOT=%t/SDKs/WatchOS3.0.sdk %clang %s -mlinker-version=400 -### 2>&1 \ @@ -43,7 +55,7 @@ // // RUN: rm -rf %t/SDKs/WatchSimulator3.0.sdk // RUN: mkdir -p %t/SDKs/WatchSimulator3.0.sdk -// RUN: env SDKROOT=%t/SDKs/WatchSimulator3.0.sdk %clang %s -mlinker-version=400 -### 2>&1 \ +// RUN: env SDKROOT=%t/SDKs/WatchSimulator3.0.sdk %clang -arch x86_64 %s -mlinker-version=400 -### 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-WATCH-SIMULATOR %s // // CHECK-WATCH-SIMULATOR: clang @@ -53,6 +65,18 @@ // CHECK-WATCH-SIMULATOR: "-watchos_simulator_version_min" "3.0.0" // // +// RUN: rm -rf %t/SDKs/WatchSimulator7.0.sdk +// RUN: mkdir -p %t/SDKs/WatchSimulator7.0.sdk +// RUN: env SDKROOT=%t/SDKs/WatchSimulator7.0.sdk %clang -arch arm64 %s -mlinker-version=400 -### 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-WATCH-SIMULATOR-ARM64 %s +// +// CHECK-WATCH-SIMULATOR-ARM64: clang +// CHECK-WATCH-SIMULATOR-ARM64: "-cc1" +// CHECK-WATCH-SIMULATOR-ARM64: -apple-watchos7.0.0-simulator" +// CHECK-WATCH-SIMULATOR-ARM64: ld +// CHECK-WATCH-SIMULATOR-ARM64: "-watchos_simulator_version_min" "7.0.0" +// +// // RUN: rm -rf %t/SDKs/AppleTVOS10.0.sdk // RUN: mkdir -p %t/SDKs/AppleTVOS10.0.sdk // RUN: env SDKROOT=%t/SDKs/AppleTVOS10.0.sdk %clang %s -mlinker-version=400 -### 2>&1 \ @@ -67,7 +91,7 @@ // // RUN: rm -rf %t/SDKs/AppleTVSimulator10.0.sdk // RUN: mkdir -p %t/SDKs/AppleTVSimulator10.0.sdk -// RUN: env SDKROOT=%t/SDKs/AppleTVSimulator10.0.sdk %clang %s -mlinker-version=400 -### 2>&1 \ +// RUN: env SDKROOT=%t/SDKs/AppleTVSimulator10.0.sdk %clang -arch x86_64 %s -mlinker-version=400 -### 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-TV-SIMULATOR %s // // CHECK-TV-SIMULATOR: clang @@ -75,3 +99,16 @@ // CHECK-TV-SIMULATOR: -apple-tvos10.0.0-simulator" // CHECK-TV-SIMULATOR: ld // CHECK-TV-SIMULATOR: "-tvos_simulator_version_min" "10.0.0" +// +// +// RUN: rm -rf %t/SDKs/AppleTVSimulator14.0.sdk +// RUN: mkdir -p %t/SDKs/AppleTVSimulator14.0.sdk +// RUN: env SDKROOT=%t/SDKs/AppleTVSimulator14.0.sdk %clang -arch arm64 %s -mlinker-version=400 -### 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-TV-SIMULATOR-ARM64 %s +// +// CHECK-TV-SIMULATOR-ARM64: clang +// CHECK-TV-SIMULATOR-ARM64: "-cc1" +// CHECK-TV-SIMULATOR-ARM64: -apple-tvos14.0.0-simulator" +// CHECK-TV-SIMULATOR-ARM64: ld +// CHECK-TV-SIMULATOR-ARM64: "-tvos_simulator_version_min" "14.0.0" + ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits