aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2010-03-07 19:26:40 +0000
committerJeffrey Yasskin <jyasskin@google.com>2010-03-07 19:26:40 +0000
commit6fec233a1e4b26be2f69e02884d4f3c2a2c4a437 (patch)
treee1e17d4e2c832b4360005c4b2a9b9f7e9232ae12 /include
parent92ce42f9fc8758ff83da3ebf7cd0a60bdaec3c58 (diff)
downloadexternal_llvm-6fec233a1e4b26be2f69e02884d4f3c2a2c4a437.zip
external_llvm-6fec233a1e4b26be2f69e02884d4f3c2a2c4a437.tar.gz
external_llvm-6fec233a1e4b26be2f69e02884d4f3c2a2c4a437.tar.bz2
Roll back r97918 again. Just configuring against llvm-gcc wasn't enough to run
the FrontendC* tests. :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97921 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Metadata.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/Metadata.h b/include/llvm/Metadata.h
index cecb7da..e536322 100644
--- a/include/llvm/Metadata.h
+++ b/include/llvm/Metadata.h
@@ -108,6 +108,9 @@ class MDNode : public Value, public FoldingSetNode {
/// node with T.
void replaceOperand(MDNodeOperand *Op, Value *NewVal);
~MDNode();
+ /// replaceAllOperandsWithNull - This is used while destroying llvm context to
+ /// gracefully delete all nodes. This method replaces all operands with null.
+ void replaceAllOperandsWithNull();
protected:
explicit MDNode(LLVMContext &C, Value *const *Vals, unsigned NumVals,
@@ -163,7 +166,9 @@ private:
bool isNotUniqued() const {
return (getSubclassDataFromValue() & NotUniquedBit) != 0;
}
- void setIsNotUniqued();
+ void setIsNotUniqued() {
+ setValueSubclassData(getSubclassDataFromValue() | NotUniquedBit);
+ }
// Shadow Value::setValueSubclassData with a private forwarding method so that
// any future subclasses cannot accidentally use it.