Update prebuilt Clang to r365631c1 from Android.
The version we had was segfaulting.
Bug: 132420445
Change-Id: Icb45a6fe0b4e2166f7895e669df1157cec9fb4e0
diff --git a/linux-x64/clang/include/llvm/MC/MCSymbol.h b/linux-x64/clang/include/llvm/MC/MCSymbol.h
index 273e5a3..189484d 100644
--- a/linux-x64/clang/include/llvm/MC/MCSymbol.h
+++ b/linux-x64/clang/include/llvm/MC/MCSymbol.h
@@ -48,6 +48,7 @@
SymbolKindELF,
SymbolKindMachO,
SymbolKindWasm,
+ SymbolKindXCOFF,
};
/// A symbol can contain an Offset, or Value, or be Common, but never more
@@ -57,6 +58,7 @@
SymContentsOffset,
SymContentsVariable,
SymContentsCommon,
+ SymContentsTargetCommon, // Index stores the section index
};
// Special sentinal value for the absolute pseudo fragment.
@@ -107,7 +109,7 @@
/// This is actually a Contents enumerator, but is unsigned to avoid sign
/// extension and achieve better bitpacking with MSVC.
- unsigned SymbolContents : 2;
+ unsigned SymbolContents : 3;
/// The alignment of the symbol, if it is 'common', or -1.
///
@@ -285,6 +287,8 @@
bool isWasm() const { return Kind == SymbolKindWasm; }
+ bool isXCOFF() const { return Kind == SymbolKindXCOFF; }
+
/// @}
/// \name Variable Symbols
/// @{
@@ -341,10 +345,11 @@
///
/// \param Size - The size of the symbol.
/// \param Align - The alignment of the symbol.
- void setCommon(uint64_t Size, unsigned Align) {
+ /// \param Target - Is the symbol a target-specific common-like symbol.
+ void setCommon(uint64_t Size, unsigned Align, bool Target = false) {
assert(getOffset() == 0);
CommonSize = Size;
- SymbolContents = SymContentsCommon;
+ SymbolContents = Target ? SymContentsTargetCommon : SymContentsCommon;
assert((!Align || isPowerOf2_32(Align)) &&
"Alignment must be a power of 2");
@@ -364,20 +369,28 @@
///
/// \param Size - The size of the symbol.
/// \param Align - The alignment of the symbol.
+ /// \param Target - Is the symbol a target-specific common-like symbol.
/// \return True if symbol was already declared as a different type
- bool declareCommon(uint64_t Size, unsigned Align) {
+ bool declareCommon(uint64_t Size, unsigned Align, bool Target = false) {
assert(isCommon() || getOffset() == 0);
if(isCommon()) {
- if(CommonSize != Size || getCommonAlignment() != Align)
- return true;
+ if (CommonSize != Size || getCommonAlignment() != Align ||
+ isTargetCommon() != Target)
+ return true;
} else
- setCommon(Size, Align);
+ setCommon(Size, Align, Target);
return false;
}
/// Is this a 'common' symbol.
bool isCommon() const {
- return SymbolContents == SymContentsCommon;
+ return SymbolContents == SymContentsCommon ||
+ SymbolContents == SymContentsTargetCommon;
+ }
+
+ /// Is this a target-specific common-like symbol.
+ bool isTargetCommon() const {
+ return SymbolContents == SymContentsTargetCommon;
}
MCFragment *getFragment(bool SetUsed = true) const {