about summary refs log tree commit diff homepage
path: root/lib/Core
diff options
context:
space:
mode:
authorCristian Cadar <cristic@cs.stanford.edu>2010-04-26 09:46:01 +0000
committerCristian Cadar <cristic@cs.stanford.edu>2010-04-26 09:46:01 +0000
commit711ba457e2d14bc069a10829843d256d8d5263ee (patch)
tree36989c9bcb8ee13e10d75cdbffcaf49c8c8379ee /lib/Core
parentbf4e6c393f78ef8bd1b00e1e67b200a6ec51fd7c (diff)
downloadklee-711ba457e2d14bc069a10829843d256d8d5263ee.tar.gz
Applied patch submitted by Peter Collingbourne: "Some parts of the
KLEE source code do not conform to the C++ standard, specifically
[basic.scope.local].  gcc accepts the code due to a bug [1] but some
other compilers (e.g. those based on EDG, such as icc) do not.  This
patch fixes the code in question to conform to the standard.

[1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18770"



git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@102328 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Core')
-rw-r--r--lib/Core/Executor.cpp4
-rw-r--r--lib/Core/ExecutorUtil.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index 17b87873..bc86dafb 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -2266,9 +2266,9 @@ void Executor::bindInstructionConstants(KInstruction *KI) {
       constantOffset = constantOffset->Add(ConstantExpr::alloc(addend,
                                                                Context::get().getPointerWidth()));
     } else {
-      const SequentialType *st = cast<SequentialType>(*ii);
+      const SequentialType *set = cast<SequentialType>(*ii);
       uint64_t elementSize = 
-        kmodule->targetData->getTypeStoreSize(st->getElementType());
+        kmodule->targetData->getTypeStoreSize(set->getElementType());
       Value *operand = ii.getOperand();
       if (Constant *c = dyn_cast<Constant>(operand)) {
         ref<ConstantExpr> index = 
diff --git a/lib/Core/ExecutorUtil.cpp b/lib/Core/ExecutorUtil.cpp
index d2878878..5164e927 100644
--- a/lib/Core/ExecutorUtil.cpp
+++ b/lib/Core/ExecutorUtil.cpp
@@ -93,11 +93,11 @@ namespace klee {
                                                             ci->getZExtValue()),
                                        Context::get().getPointerWidth());
         } else {
-          const SequentialType *st = cast<SequentialType>(*ii);
+          const SequentialType *set = cast<SequentialType>(*ii);
           ref<ConstantExpr> index = 
             evalConstant(cast<Constant>(ii.getOperand()));
           unsigned elementSize = 
-            kmodule->targetData->getTypeStoreSize(st->getElementType());
+            kmodule->targetData->getTypeStoreSize(set->getElementType());
 
           index = index->ZExt(Context::get().getPointerWidth());
           addend = index->Mul(ConstantExpr::alloc(elementSize,