Update prebuilt Clang to match Android kernel.
Bug: 132428451
Change-Id: I8f6e2cb23f381fc0c02ddea99b867e58e925e5be
diff --git a/linux-x64/clang/include/lld/Common/Args.h b/linux-x64/clang/include/lld/Common/Args.h
index 769d484..d943646 100644
--- a/linux-x64/clang/include/lld/Common/Args.h
+++ b/linux-x64/clang/include/lld/Common/Args.h
@@ -1,9 +1,8 @@
//===- Args.h ---------------------------------------------------*- C++ -*-===//
//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -11,6 +10,7 @@
#define LLD_ARGS_H
#include "lld/Common/LLVM.h"
+#include "llvm/Support/CodeGen.h"
#include "llvm/Support/MemoryBuffer.h"
#include <vector>
@@ -22,7 +22,11 @@
namespace lld {
namespace args {
+
+llvm::CodeGenOpt::Level getCGOptLevel(int OptLevelLTO);
+
int getInteger(llvm::opt::InputArgList &Args, unsigned Key, int Default);
+
std::vector<StringRef> getStrings(llvm::opt::InputArgList &Args, int Id);
uint64_t getZOptionValue(llvm::opt::InputArgList &Args, int Id, StringRef Key,
diff --git a/linux-x64/clang/include/lld/Common/Driver.h b/linux-x64/clang/include/lld/Common/Driver.h
index f6d9293..745ef72 100644
--- a/linux-x64/clang/include/lld/Common/Driver.h
+++ b/linux-x64/clang/include/lld/Common/Driver.h
@@ -1,9 +1,8 @@
//===- lld/Common/Driver.h - Linker Driver Emulator -----------------------===//
//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/linux-x64/clang/include/lld/Common/ErrorHandler.h b/linux-x64/clang/include/lld/Common/ErrorHandler.h
index c169f7b..bd9c257 100644
--- a/linux-x64/clang/include/lld/Common/ErrorHandler.h
+++ b/linux-x64/clang/include/lld/Common/ErrorHandler.h
@@ -1,9 +1,8 @@
//===- ErrorHandler.h -------------------------------------------*- C++ -*-===//
//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/lld/Common/LLVM.h b/linux-x64/clang/include/lld/Common/LLVM.h
index b5d0e2b..944bb41 100644
--- a/linux-x64/clang/include/lld/Common/LLVM.h
+++ b/linux-x64/clang/include/lld/Common/LLVM.h
@@ -1,9 +1,8 @@
//===--- LLVM.h - Import various common LLVM datatypes ----------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
@@ -22,53 +21,69 @@
#include <utility>
namespace llvm {
- // ADT's.
- class Error;
- class StringRef;
- class Twine;
- class MemoryBuffer;
- class MemoryBufferRef;
- template<typename T> class ArrayRef;
- template<unsigned InternalLen> class SmallString;
- template<typename T, unsigned N> class SmallVector;
- template<typename T> class SmallVectorImpl;
+// ADT's.
+class raw_ostream;
+class Error;
+class StringRef;
+class Twine;
+class MemoryBuffer;
+class MemoryBufferRef;
+template <typename T> class ArrayRef;
+template <unsigned InternalLen> class SmallString;
+template <typename T, unsigned N> class SmallVector;
+template <typename T> class ErrorOr;
+template <typename T> class Expected;
- template<typename T>
- struct SaveAndRestore;
+namespace object {
+class WasmObjectFile;
+struct WasmSection;
+struct WasmSegment;
+class WasmSymbol;
+} // namespace object
- template<typename T>
- class ErrorOr;
-
- template<typename T>
- class Expected;
-
- class raw_ostream;
- // TODO: DenseMap, ...
-}
+namespace wasm {
+struct WasmEvent;
+struct WasmEventType;
+struct WasmFunction;
+struct WasmGlobal;
+struct WasmGlobalType;
+struct WasmRelocation;
+struct WasmSignature;
+} // namespace wasm
+} // namespace llvm
namespace lld {
- // Casting operators.
- using llvm::isa;
- using llvm::cast;
- using llvm::dyn_cast;
- using llvm::dyn_cast_or_null;
- using llvm::cast_or_null;
+// Casting operators.
+using llvm::cast;
+using llvm::cast_or_null;
+using llvm::dyn_cast;
+using llvm::dyn_cast_or_null;
+using llvm::isa;
- // ADT's.
- using llvm::Error;
- using llvm::StringRef;
- using llvm::Twine;
- using llvm::MemoryBuffer;
- using llvm::MemoryBufferRef;
- using llvm::ArrayRef;
- using llvm::SmallString;
- using llvm::SmallVector;
- using llvm::SmallVectorImpl;
- using llvm::SaveAndRestore;
- using llvm::ErrorOr;
- using llvm::Expected;
+// ADT's.
+using llvm::ArrayRef;
+using llvm::Error;
+using llvm::ErrorOr;
+using llvm::Expected;
+using llvm::MemoryBuffer;
+using llvm::MemoryBufferRef;
+using llvm::raw_ostream;
+using llvm::SmallString;
+using llvm::SmallVector;
+using llvm::StringRef;
+using llvm::Twine;
- using llvm::raw_ostream;
+using llvm::object::WasmObjectFile;
+using llvm::object::WasmSection;
+using llvm::object::WasmSegment;
+using llvm::object::WasmSymbol;
+using llvm::wasm::WasmEvent;
+using llvm::wasm::WasmEventType;
+using llvm::wasm::WasmFunction;
+using llvm::wasm::WasmGlobal;
+using llvm::wasm::WasmGlobalType;
+using llvm::wasm::WasmRelocation;
+using llvm::wasm::WasmSignature;
} // end namespace lld.
namespace std {
@@ -78,6 +93,6 @@
return llvm::hash_value(s);
}
};
-}
+} // namespace std
#endif
diff --git a/linux-x64/clang/include/lld/Common/Memory.h b/linux-x64/clang/include/lld/Common/Memory.h
index 699f7c1..78f6e24 100644
--- a/linux-x64/clang/include/lld/Common/Memory.h
+++ b/linux-x64/clang/include/lld/Common/Memory.h
@@ -1,9 +1,8 @@
//===- Memory.h -------------------------------------------------*- C++ -*-===//
//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
diff --git a/linux-x64/clang/include/lld/Common/Reproduce.h b/linux-x64/clang/include/lld/Common/Reproduce.h
index 0f425de..ac7a822 100644
--- a/linux-x64/clang/include/lld/Common/Reproduce.h
+++ b/linux-x64/clang/include/lld/Common/Reproduce.h
@@ -1,9 +1,8 @@
//===- Reproduce.h - Utilities for creating reproducers ---------*- C++ -*-===//
//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/linux-x64/clang/include/lld/Common/Strings.h b/linux-x64/clang/include/lld/Common/Strings.h
index e17b257..efc9245 100644
--- a/linux-x64/clang/include/lld/Common/Strings.h
+++ b/linux-x64/clang/include/lld/Common/Strings.h
@@ -1,9 +1,8 @@
//===- Strings.h ------------------------------------------------*- C++ -*-===//
//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -41,9 +40,6 @@
std::vector<llvm::GlobPattern> Patterns;
};
-inline llvm::ArrayRef<uint8_t> toArrayRef(llvm::StringRef S) {
- return {reinterpret_cast<const uint8_t *>(S.data()), S.size()};
-}
} // namespace lld
#endif
diff --git a/linux-x64/clang/include/lld/Common/TargetOptionsCommandFlags.h b/linux-x64/clang/include/lld/Common/TargetOptionsCommandFlags.h
index 8443b18..9345e61 100644
--- a/linux-x64/clang/include/lld/Common/TargetOptionsCommandFlags.h
+++ b/linux-x64/clang/include/lld/Common/TargetOptionsCommandFlags.h
@@ -1,9 +1,8 @@
//===-- TargetOptionsCommandFlags.h ----------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
@@ -16,7 +15,8 @@
#include "llvm/Target/TargetOptions.h"
namespace lld {
-llvm::TargetOptions InitTargetOptionsFromCodeGenFlags();
-llvm::Optional<llvm::CodeModel::Model> GetCodeModelFromCMModel();
-std::string GetCPUStr();
+llvm::TargetOptions initTargetOptionsFromCodeGenFlags();
+llvm::Optional<llvm::CodeModel::Model> getCodeModelFromCMModel();
+std::string getCPUStr();
+std::vector<std::string> getMAttrs();
}
diff --git a/linux-x64/clang/include/lld/Common/Threads.h b/linux-x64/clang/include/lld/Common/Threads.h
index 8545907..e356fcd 100644
--- a/linux-x64/clang/include/lld/Common/Threads.h
+++ b/linux-x64/clang/include/lld/Common/Threads.h
@@ -1,9 +1,8 @@
//===- Threads.h ------------------------------------------------*- C++ -*-===//
//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
@@ -74,7 +73,7 @@
}
inline void parallelForEachN(size_t Begin, size_t End,
- std::function<void(size_t)> Fn) {
+ llvm::function_ref<void(size_t)> Fn) {
if (ThreadsEnabled)
for_each_n(llvm::parallel::par, Begin, End, Fn);
else
diff --git a/linux-x64/clang/include/lld/Common/Timer.h b/linux-x64/clang/include/lld/Common/Timer.h
index 6654af6..e2b6951 100644
--- a/linux-x64/clang/include/lld/Common/Timer.h
+++ b/linux-x64/clang/include/lld/Common/Timer.h
@@ -1,9 +1,8 @@
//===- Timer.h ----------------------------------------------*- C++ -*-===//
//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/linux-x64/clang/include/lld/Common/Version.h b/linux-x64/clang/include/lld/Common/Version.h
index 23a10ed..9571aa2 100644
--- a/linux-x64/clang/include/lld/Common/Version.h
+++ b/linux-x64/clang/include/lld/Common/Version.h
@@ -1,9 +1,8 @@
//===- lld/Common/Version.h - LLD Version Number ----------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//