Update prebuilt Clang to r416183b from Android.
https://android.googlesource.com/platform/prebuilts/clang/host/
linux-x86/+/06a71ddac05c22edb2d10b590e1769b3f8619bef
clang 12.0.5 (based on r416183b) from build 7284624.
Change-Id: I277a316abcf47307562d8b748b84870f31a72866
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/linux-x64/clang/include/llvm/Bitcode/BitcodeReader.h b/linux-x64/clang/include/llvm/Bitcode/BitcodeReader.h
index ba61da7..a82791c 100644
--- a/linux-x64/clang/include/llvm/Bitcode/BitcodeReader.h
+++ b/linux-x64/clang/include/llvm/Bitcode/BitcodeReader.h
@@ -31,6 +31,9 @@
class LLVMContext;
class Module;
+typedef llvm::function_ref<Optional<std::string>(StringRef)>
+ DataLayoutCallbackTy;
+
// These functions are for converting Expected/Error values to
// ErrorOr/std::error_code for compatibility with legacy clients. FIXME:
// Remove these functions once no longer needed by the C and libLTO APIs.
@@ -77,10 +80,10 @@
friend Expected<BitcodeFileContents>
getBitcodeFileContents(MemoryBufferRef Buffer);
- Expected<std::unique_ptr<Module>> getModuleImpl(LLVMContext &Context,
- bool MaterializeAll,
- bool ShouldLazyLoadMetadata,
- bool IsImporting);
+ Expected<std::unique_ptr<Module>>
+ getModuleImpl(LLVMContext &Context, bool MaterializeAll,
+ bool ShouldLazyLoadMetadata, bool IsImporting,
+ DataLayoutCallbackTy DataLayoutCallback);
public:
StringRef getBuffer() const {
@@ -100,7 +103,9 @@
bool IsImporting);
/// Read the entire bitcode module and return it.
- Expected<std::unique_ptr<Module>> parseModule(LLVMContext &Context);
+ Expected<std::unique_ptr<Module>> parseModule(
+ LLVMContext &Context, DataLayoutCallbackTy DataLayoutCallback =
+ [](StringRef) { return None; });
/// Returns information about the module to be used for LTO: whether to
/// compile with ThinLTO, and whether it has a summary.
@@ -163,8 +168,11 @@
Expected<std::string> getBitcodeProducerString(MemoryBufferRef Buffer);
/// Read the specified bitcode file, returning the module.
- Expected<std::unique_ptr<Module>> parseBitcodeFile(MemoryBufferRef Buffer,
- LLVMContext &Context);
+ Expected<std::unique_ptr<Module>> parseBitcodeFile(
+ MemoryBufferRef Buffer, LLVMContext &Context,
+ DataLayoutCallbackTy DataLayoutCallback = [](StringRef) {
+ return None;
+ });
/// Returns LTO information for the specified bitcode file.
Expected<BitcodeLTOInfo> getBitcodeLTOInfo(MemoryBufferRef Buffer);
@@ -255,6 +263,8 @@
return false;
}
+ APInt readWideAPInt(ArrayRef<uint64_t> Vals, unsigned TypeBits);
+
const std::error_category &BitcodeErrorCategory();
enum class BitcodeError { CorruptedBitcode = 1 };
inline std::error_code make_error_code(BitcodeError E) {