diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2010-03-05 06:43:49 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2010-03-05 06:43:49 +0000 |
commit | b71a2fcf5e5c0e4b598f07f5e3e7b0f2c718baf2 (patch) | |
tree | c445718c5aa6d77e179c532d9385994073452952 /include/llvm/Metadata.h | |
parent | 18fdabadca110671b436de52fe7bd492ad49e656 (diff) | |
download | llvm-b71a2fcf5e5c0e4b598f07f5e3e7b0f2c718baf2.tar.gz llvm-b71a2fcf5e5c0e4b598f07f5e3e7b0f2c718baf2.tar.bz2 llvm-b71a2fcf5e5c0e4b598f07f5e3e7b0f2c718baf2.tar.xz |
Revert r97788 because it broke test/FrontendC/2010-02-16-DbgVarScope.c.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97792 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Metadata.h')
-rw-r--r-- | include/llvm/Metadata.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/Metadata.h b/include/llvm/Metadata.h index cecb7dadaf..e5363228a3 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. |