diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Instruction.h | 10 | ||||
-rw-r--r-- | include/llvm/Support/ValueHandle.h | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/include/llvm/Instruction.h b/include/llvm/Instruction.h index 4184112..472ab83 100644 --- a/include/llvm/Instruction.h +++ b/include/llvm/Instruction.h @@ -156,6 +156,16 @@ public: void setMetadata(unsigned KindID, MDNode *Node); void setMetadata(const char *Kind, MDNode *Node); + /// setDbgMetadata - This is just an optimized helper function that is + /// equivalent to setMetadata("dbg", Node); + void setDbgMetadata(MDNode *Node); + + /// getDbgMetadata - This is just an optimized helper function that is + /// equivalent to calling getMetadata("dbg"). + MDNode *getDbgMetadata() const { + return DbgInfo; + } + private: /// hasMetadataHashEntry - Return true if we have an entry in the on-the-side /// metadata hash. diff --git a/include/llvm/Support/ValueHandle.h b/include/llvm/Support/ValueHandle.h index 0e61d09..130a620ab 100644 --- a/include/llvm/Support/ValueHandle.h +++ b/include/llvm/Support/ValueHandle.h @@ -284,8 +284,7 @@ class TrackingVH : public ValueHandleBase { Value *VP = ValueHandleBase::getValPtr(); // Null is always ok. - if (!VP) - return; + if (!VP) return; // Check that this value is valid (i.e., it hasn't been deleted). We // explicitly delay this check until access to avoid requiring clients to be |