aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/Local.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-07 06:12:52 +0000
committerChris Lattner <sabre@nondot.org>2004-07-07 06:12:52 +0000
commitefffdc9408344c6c109ced7984e056c02fe37dc8 (patch)
tree014646ed9df80e2a666f36331cc711a826e2c52d /lib/Analysis/DataStructure/Local.cpp
parentd34086796485ffcba4789ddda4277afca3d4f6b9 (diff)
As much as I hate to say it, the whole setNode interface for DSNodeHandles
is HOPELESSLY broken. The problem is that the embedded getNode call can change the offset of the node handle in unpredictable ways. As it turns out, all of the clients of this method really want to set both the node and the offset, thus it is more efficient (and less buggy) to just do both of them in one method call. This fixes some obscure bugs handling non-forwarded node handles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14660 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/Local.cpp')
-rw-r--r--lib/Analysis/DataStructure/Local.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp
index 4a61e8bb10..62dc7af2f1 100644
--- a/lib/Analysis/DataStructure/Local.cpp
+++ b/lib/Analysis/DataStructure/Local.cpp
@@ -259,8 +259,7 @@ DSNodeHandle GraphBuilder::getValueDest(Value &Val) {
N = createNode();
}
- NH.setNode(N); // Remember that we are pointing to it...
- NH.setOffset(0);
+ NH.setTo(N, 0); // Remember that we are pointing to it...
return NH;
}