Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Unified Diff: llvm/include/llvm/Support/ValueHandle.h

Issue 10442019: llvm: workaround debug info with bad invariants (Closed)
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « llvm/include/llvm/CodeGen/LexicalScopes.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: llvm/include/llvm/Support/ValueHandle.h
===================================================================
--- a/llvm/include/llvm/Support/ValueHandle.h
+++ b/llvm/include/llvm/Support/ValueHandle.h
@@ -104,6 +104,11 @@
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 @@
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(); }
};
« no previous file with comments | « llvm/include/llvm/CodeGen/LexicalScopes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698