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-c/Transforms/AggressiveInstCombine.h b/linux-x64/clang/include/llvm-c/Transforms/AggressiveInstCombine.h
index c0b0141..db061a7 100644
--- a/linux-x64/clang/include/llvm-c/Transforms/AggressiveInstCombine.h
+++ b/linux-x64/clang/include/llvm-c/Transforms/AggressiveInstCombine.h
@@ -15,11 +15,10 @@
#ifndef LLVM_C_TRANSFORMS_AGGRESSIVEINSTCOMBINE_H
#define LLVM_C_TRANSFORMS_AGGRESSIVEINSTCOMBINE_H
+#include "llvm-c/ExternC.h"
#include "llvm-c/Types.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+LLVM_C_EXTERN_C_BEGIN
/**
* @defgroup LLVMCTransformsAggressiveInstCombine Aggressive Instruction Combining transformations
@@ -35,9 +34,7 @@
* @}
*/
-#ifdef __cplusplus
-}
-#endif /* defined(__cplusplus) */
+LLVM_C_EXTERN_C_END
#endif
diff --git a/linux-x64/clang/include/llvm-c/Transforms/Coroutines.h b/linux-x64/clang/include/llvm-c/Transforms/Coroutines.h
index 227e7cf..03b6822 100644
--- a/linux-x64/clang/include/llvm-c/Transforms/Coroutines.h
+++ b/linux-x64/clang/include/llvm-c/Transforms/Coroutines.h
@@ -19,11 +19,11 @@
#ifndef LLVM_C_TRANSFORMS_COROUTINES_H
#define LLVM_C_TRANSFORMS_COROUTINES_H
+#include "llvm-c/ExternC.h"
#include "llvm-c/Types.h"
+#include "llvm-c/Transforms/PassManagerBuilder.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+LLVM_C_EXTERN_C_BEGIN
/**
* @defgroup LLVMCTransformsCoroutines Coroutine transformations
@@ -32,24 +32,25 @@
* @{
*/
-/** See llvm::createCoroEarlyPass function. */
+/** See llvm::createCoroEarlyLegacyPass function. */
void LLVMAddCoroEarlyPass(LLVMPassManagerRef PM);
-/** See llvm::createCoroSplitPass function. */
+/** See llvm::createCoroSplitLegacyPass function. */
void LLVMAddCoroSplitPass(LLVMPassManagerRef PM);
-/** See llvm::createCoroElidePass function. */
+/** See llvm::createCoroElideLegacyPass function. */
void LLVMAddCoroElidePass(LLVMPassManagerRef PM);
-/** See llvm::createCoroCleanupPass function. */
+/** See llvm::createCoroCleanupLegacyPass function. */
void LLVMAddCoroCleanupPass(LLVMPassManagerRef PM);
+/** See llvm::addCoroutinePassesToExtensionPoints. */
+void LLVMPassManagerBuilderAddCoroutinePassesToExtensionPoints(LLVMPassManagerBuilderRef PMB);
+
/**
* @}
*/
-#ifdef __cplusplus
-}
-#endif /* defined(__cplusplus) */
+LLVM_C_EXTERN_C_END
#endif
diff --git a/linux-x64/clang/include/llvm-c/Transforms/IPO.h b/linux-x64/clang/include/llvm-c/Transforms/IPO.h
index 7a82ed4..3f2cadf 100644
--- a/linux-x64/clang/include/llvm-c/Transforms/IPO.h
+++ b/linux-x64/clang/include/llvm-c/Transforms/IPO.h
@@ -15,11 +15,10 @@
#ifndef LLVM_C_TRANSFORMS_IPO_H
#define LLVM_C_TRANSFORMS_IPO_H
+#include "llvm-c/ExternC.h"
#include "llvm-c/Types.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+LLVM_C_EXTERN_C_BEGIN
/**
* @defgroup LLVMCTransformsIPO Interprocedural transformations
@@ -34,6 +33,9 @@
/** See llvm::createConstantMergePass function. */
void LLVMAddConstantMergePass(LLVMPassManagerRef PM);
+/** See llvm::createMergeFunctionsPass function. */
+void LLVMAddMergeFunctionsPass(LLVMPassManagerRef PM);
+
/** See llvm::createCalledValuePropagationPass function. */
void LLVMAddCalledValuePropagationPass(LLVMPassManagerRef PM);
@@ -55,9 +57,6 @@
/** See llvm::createGlobalOptimizerPass function. */
void LLVMAddGlobalOptimizerPass(LLVMPassManagerRef PM);
-/** See llvm::createIPConstantPropagationPass function. */
-void LLVMAddIPConstantPropagationPass(LLVMPassManagerRef PM);
-
/** See llvm::createPruneEHPass function. */
void LLVMAddPruneEHPass(LLVMPassManagerRef PM);
@@ -67,6 +66,21 @@
/** See llvm::createInternalizePass function. */
void LLVMAddInternalizePass(LLVMPassManagerRef, unsigned AllButMain);
+/**
+ * Create and add the internalize pass to the given pass manager with the
+ * provided preservation callback.
+ *
+ * The context parameter is forwarded to the callback on each invocation.
+ * As such, it is the responsibility of the caller to extend its lifetime
+ * until execution of this pass has finished.
+ *
+ * @see llvm::createInternalizePass function.
+ */
+void LLVMAddInternalizePassWithMustPreservePredicate(
+ LLVMPassManagerRef PM,
+ void *Context,
+ LLVMBool (*MustPreserve)(LLVMValueRef, void *));
+
/** See llvm::createStripDeadPrototypesPass function. */
void LLVMAddStripDeadPrototypesPass(LLVMPassManagerRef PM);
@@ -77,8 +91,6 @@
* @}
*/
-#ifdef __cplusplus
-}
-#endif /* defined(__cplusplus) */
+LLVM_C_EXTERN_C_END
#endif
diff --git a/linux-x64/clang/include/llvm-c/Transforms/InstCombine.h b/linux-x64/clang/include/llvm-c/Transforms/InstCombine.h
index 166f278..ebe17d6 100644
--- a/linux-x64/clang/include/llvm-c/Transforms/InstCombine.h
+++ b/linux-x64/clang/include/llvm-c/Transforms/InstCombine.h
@@ -15,11 +15,10 @@
#ifndef LLVM_C_TRANSFORMS_INSTCOMBINE_H
#define LLVM_C_TRANSFORMS_INSTCOMBINE_H
+#include "llvm-c/ExternC.h"
#include "llvm-c/Types.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+LLVM_C_EXTERN_C_BEGIN
/**
* @defgroup LLVMCTransformsInstCombine Instruction Combining transformations
@@ -35,9 +34,7 @@
* @}
*/
-#ifdef __cplusplus
-}
-#endif /* defined(__cplusplus) */
+LLVM_C_EXTERN_C_END
#endif
diff --git a/linux-x64/clang/include/llvm-c/Transforms/PassManagerBuilder.h b/linux-x64/clang/include/llvm-c/Transforms/PassManagerBuilder.h
index d164c00..6e13e18 100644
--- a/linux-x64/clang/include/llvm-c/Transforms/PassManagerBuilder.h
+++ b/linux-x64/clang/include/llvm-c/Transforms/PassManagerBuilder.h
@@ -14,13 +14,12 @@
#ifndef LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H
#define LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H
+#include "llvm-c/ExternC.h"
#include "llvm-c/Types.h"
typedef struct LLVMOpaquePassManagerBuilder *LLVMPassManagerBuilderRef;
-#ifdef __cplusplus
-extern "C" {
-#endif
+LLVM_C_EXTERN_C_BEGIN
/**
* @defgroup LLVMCTransformsPassManagerBuilder Pass manager builder
@@ -83,8 +82,6 @@
* @}
*/
-#ifdef __cplusplus
-}
-#endif
+LLVM_C_EXTERN_C_END
#endif
diff --git a/linux-x64/clang/include/llvm-c/Transforms/Scalar.h b/linux-x64/clang/include/llvm-c/Transforms/Scalar.h
index 031cf98..ba14250 100644
--- a/linux-x64/clang/include/llvm-c/Transforms/Scalar.h
+++ b/linux-x64/clang/include/llvm-c/Transforms/Scalar.h
@@ -19,11 +19,10 @@
#ifndef LLVM_C_TRANSFORMS_SCALAR_H
#define LLVM_C_TRANSFORMS_SCALAR_H
+#include "llvm-c/ExternC.h"
#include "llvm-c/Types.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+LLVM_C_EXTERN_C_BEGIN
/**
* @defgroup LLVMCTransformsScalar Scalar transformations
@@ -35,6 +34,9 @@
/** See llvm::createAggressiveDCEPass function. */
void LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM);
+/** See llvm::createDeadCodeEliminationPass function. */
+void LLVMAddDCEPass(LLVMPassManagerRef PM);
+
/** See llvm::createBitTrackingDCEPass function. */
void LLVMAddBitTrackingDCEPass(LLVMPassManagerRef PM);
@@ -65,6 +67,9 @@
/** See llvm::createInstructionCombiningPass function. */
void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM);
+/** See llvm::createInstSimplifyLegacyPass function. */
+void LLVMAddInstructionSimplifyPass(LLVMPassManagerRef PM);
+
/** See llvm::createJumpThreadingPass function. */
void LLVMAddJumpThreadingPass(LLVMPassManagerRef PM);
@@ -123,9 +128,6 @@
/** See llvm::createTailCallEliminationPass function. */
void LLVMAddTailCallEliminationPass(LLVMPassManagerRef PM);
-/** See llvm::createConstantPropagationPass function. */
-void LLVMAddConstantPropagationPass(LLVMPassManagerRef PM);
-
/** See llvm::demotePromoteMemoryToRegisterPass function. */
void LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM);
@@ -144,6 +146,9 @@
/** See llvm::createLowerExpectIntrinsicPass function */
void LLVMAddLowerExpectIntrinsicPass(LLVMPassManagerRef PM);
+/** See llvm::createLowerConstantIntrinsicsPass function */
+void LLVMAddLowerConstantIntrinsicsPass(LLVMPassManagerRef PM);
+
/** See llvm::createTypeBasedAliasAnalysisPass function */
void LLVMAddTypeBasedAliasAnalysisPass(LLVMPassManagerRef PM);
@@ -160,8 +165,6 @@
* @}
*/
-#ifdef __cplusplus
-}
-#endif /* defined(__cplusplus) */
+LLVM_C_EXTERN_C_END
#endif
diff --git a/linux-x64/clang/include/llvm-c/Transforms/Utils.h b/linux-x64/clang/include/llvm-c/Transforms/Utils.h
index 63594ab..30d1ae6 100644
--- a/linux-x64/clang/include/llvm-c/Transforms/Utils.h
+++ b/linux-x64/clang/include/llvm-c/Transforms/Utils.h
@@ -19,11 +19,10 @@
#ifndef LLVM_C_TRANSFORMS_UTILS_H
#define LLVM_C_TRANSFORMS_UTILS_H
+#include "llvm-c/ExternC.h"
#include "llvm-c/Types.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+LLVM_C_EXTERN_C_BEGIN
/**
* @defgroup LLVMCTransformsUtils Transformation Utilities
@@ -45,9 +44,7 @@
* @}
*/
-#ifdef __cplusplus
-}
-#endif /* defined(__cplusplus) */
+LLVM_C_EXTERN_C_END
#endif
diff --git a/linux-x64/clang/include/llvm-c/Transforms/Vectorize.h b/linux-x64/clang/include/llvm-c/Transforms/Vectorize.h
index e383481..0de4583 100644
--- a/linux-x64/clang/include/llvm-c/Transforms/Vectorize.h
+++ b/linux-x64/clang/include/llvm-c/Transforms/Vectorize.h
@@ -20,11 +20,10 @@
#ifndef LLVM_C_TRANSFORMS_VECTORIZE_H
#define LLVM_C_TRANSFORMS_VECTORIZE_H
+#include "llvm-c/ExternC.h"
#include "llvm-c/Types.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+LLVM_C_EXTERN_C_BEGIN
/**
* @defgroup LLVMCTransformsVectorize Vectorization transformations
@@ -43,8 +42,6 @@
* @}
*/
-#ifdef __cplusplus
-}
-#endif /* defined(__cplusplus) */
+LLVM_C_EXTERN_C_END
#endif