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/MC/StringTableBuilder.h b/linux-x64/clang/include/llvm/MC/StringTableBuilder.h
index c83eca4..3f9c91b 100644
--- a/linux-x64/clang/include/llvm/MC/StringTableBuilder.h
+++ b/linux-x64/clang/include/llvm/MC/StringTableBuilder.h
@@ -22,7 +22,17 @@
/// Utility for building string tables with deduplicated suffixes.
class StringTableBuilder {
public:
- enum Kind { ELF, WinCOFF, MachO, RAW, DWARF };
+ enum Kind {
+ ELF,
+ WinCOFF,
+ MachO,
+ MachO64,
+ MachOLinked,
+ MachO64Linked,
+ RAW,
+ DWARF,
+ XCOFF
+ };
private:
DenseMap<CachedHashStringRef, size_t> StringIndexMap;
@@ -59,6 +69,16 @@
return getOffset(CachedHashStringRef(S));
}
+ /// Check if a string is contained in the string table. Since this class
+ /// doesn't store the string values, this function can be used to check if
+ /// storage needs to be done prior to adding the string.
+ bool contains(StringRef S) const {
+ return contains(CachedHashStringRef(S));
+ }
+ bool contains(CachedHashStringRef S) const {
+ return StringIndexMap.count(S);
+ }
+
size_t getSize() const { return Size; }
void clear();