Update clang to r339409.
Change-Id: I800772d2d838223be1f6b40d490c4591b937fca2
diff --git a/linux-x64/clang/include/llvm/IR/GlobalObject.h b/linux-x64/clang/include/llvm/IR/GlobalObject.h
index 278b193..1fd3568 100644
--- a/linux-x64/clang/include/llvm/IR/GlobalObject.h
+++ b/linux-x64/clang/include/llvm/IR/GlobalObject.h
@@ -105,6 +105,14 @@
/// Check if this has any metadata.
bool hasMetadata() const { return hasMetadataHashEntry(); }
+ /// Check if this has any metadata of the given kind.
+ bool hasMetadata(unsigned KindID) const {
+ return getMetadata(KindID) != nullptr;
+ }
+ bool hasMetadata(StringRef Kind) const {
+ return getMetadata(Kind) != nullptr;
+ }
+
/// Get the current metadata attachments for the given kind, if any.
///
/// These functions require that the function have at most a single attachment
@@ -143,7 +151,9 @@
getAllMetadata(SmallVectorImpl<std::pair<unsigned, MDNode *>> &MDs) const;
/// Erase all metadata attachments with the given kind.
- void eraseMetadata(unsigned KindID);
+ ///
+ /// \returns true if any metadata was removed.
+ bool eraseMetadata(unsigned KindID);
/// Copy metadata from Src, adjusting offsets by Offset.
void copyMetadata(const GlobalObject *Src, unsigned Offset);