aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/ValueHandle.h
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2012-07-09 10:52:46 -0700
committerDerek Schuff <dschuff@chromium.org>2012-07-09 11:00:37 -0700
commit5dbcc7e0c9c12f4a4042fb4a226654aee927999c (patch)
treeb316a3370e9286cb4e6f81b2f9d8bd8b54ce5123 /include/llvm/Support/ValueHandle.h
parent86dc97be9ac3b4804528e087b04b4f4192cdee54 (diff)
LOCALMODs from hg 0b098ca44de7 against r158408 (hg 90a87d6bfe45)
(only non-new files; new files in git 4f429c8b) Change-Id: Ia39f818088485bd90e4d048db404f8d6ba5f836b
Diffstat (limited to 'include/llvm/Support/ValueHandle.h')
-rw-r--r--include/llvm/Support/ValueHandle.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/Support/ValueHandle.h b/include/llvm/Support/ValueHandle.h
index 6787633c1d..966af39a15 100644
--- a/include/llvm/Support/ValueHandle.h
+++ b/include/llvm/Support/ValueHandle.h
@@ -104,6 +104,11 @@ protected:
void setValPtrInt(unsigned K) { VP.setInt(K); }
unsigned getValPtrInt() const { return VP.getInt(); }
+ // @LOCALMOD-BEGIN -- Hack for bug:
+ // http://code.google.com/p/nativeclient/issues/detail?id=2786
+ void setKind(HandleBaseKind K) { PrevPair.setInt(K); }
+ // @LOCALMOD-END
+
static bool isValid(Value *V) {
return V &&
V != DenseMapInfo<Value *>::getEmptyKey() &&
@@ -231,6 +236,15 @@ public:
return getValPtr();
}
+ // @LOCALMOD-BEGIN -- Hack for bug:
+ // http://code.google.com/p/nativeclient/issues/detail?id=2786
+ // This allows us to weaken the Asserting Value Handle in LexicalScopes.h,
+ // for Debug info only.
+ void make_weak() {
+ setKind(Weak);
+ }
+ // @LOCALMOD-END
+
ValueTy *operator->() const { return getValPtr(); }
ValueTy &operator*() const { return *getValPtr(); }
};