Update clang to r339409.
Change-Id: I800772d2d838223be1f6b40d490c4591b937fca2
diff --git a/linux-x64/clang/include/lld/Common/Strings.h b/linux-x64/clang/include/lld/Common/Strings.h
index 3be5eb9..e17b257 100644
--- a/linux-x64/clang/include/lld/Common/Strings.h
+++ b/linux-x64/clang/include/lld/Common/Strings.h
@@ -26,35 +26,8 @@
std::vector<uint8_t> parseHex(llvm::StringRef S);
bool isValidCIdentifier(llvm::StringRef S);
-// This is a lazy version of StringRef. String size is computed lazily
-// when it is needed. It is more efficient than StringRef to instantiate
-// if you have a string whose size is unknown.
-//
-// COFF and ELF string tables contain a lot of null-terminated strings.
-// Most of them are not necessary for the linker because they are names
-// of local symbols and the linker doesn't use local symbol names for
-// name resolution. So, we use this class to represents strings read
-// from string tables.
-class StringRefZ {
-public:
- StringRefZ() : Start(nullptr), Size(0) {}
- StringRefZ(const char *S, size_t Size) : Start(S), Size(Size) {}
-
- /*implicit*/ StringRefZ(const char *S) : Start(S), Size(-1) {}
-
- /*implicit*/ StringRefZ(llvm::StringRef S)
- : Start(S.data()), Size(S.size()) {}
-
- operator llvm::StringRef() const {
- if (Size == (size_t)-1)
- Size = strlen(Start);
- return {Start, Size};
- }
-
-private:
- const char *Start;
- mutable size_t Size;
-};
+// Write the contents of the a buffer to a file
+void saveBuffer(llvm::StringRef Buffer, const llvm::Twine &Path);
// This class represents multiple glob patterns.
class StringMatcher {
@@ -71,6 +44,6 @@
inline llvm::ArrayRef<uint8_t> toArrayRef(llvm::StringRef S) {
return {reinterpret_cast<const uint8_t *>(S.data()), S.size()};
}
-}
+} // namespace lld
#endif