From c085c1830bdc1cb6a4fce9749dc25d7f0f34c86a Mon Sep 17 00:00:00 2001 From: Brian Huffman Date: Mon, 3 May 2021 16:42:47 -0700 Subject: [PATCH] Reimplement `refreshTerms` to register names in the naming environment. Fixes #869. --- src/SAWScript/Crucible/JVM/Override.hs | 4 ++-- src/SAWScript/Crucible/LLVM/Override.hs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SAWScript/Crucible/JVM/Override.hs b/src/SAWScript/Crucible/JVM/Override.hs index 8825777f22..fe851433cc 100644 --- a/src/SAWScript/Crucible/JVM/Override.hs +++ b/src/SAWScript/Crucible/JVM/Override.hs @@ -381,8 +381,8 @@ refreshTerms sc ss = OM (termSub %= Map.union extension) where freshenTerm (TypedExtCns _cty ec) = - do new <- liftIO $ do i <- scFreshGlobalVar sc - scExtCns sc (EC i (ecName ec) (ecType ec)) + do ec' <- liftIO $ scFreshEC sc (toShortName (ecName ec)) (ecType ec) + new <- liftIO $ scExtCns sc ec' return (ecVarIndex ec, new) ------------------------------------------------------------------------ diff --git a/src/SAWScript/Crucible/LLVM/Override.hs b/src/SAWScript/Crucible/LLVM/Override.hs index 423b35d66c..311648a35b 100644 --- a/src/SAWScript/Crucible/LLVM/Override.hs +++ b/src/SAWScript/Crucible/LLVM/Override.hs @@ -709,8 +709,8 @@ refreshTerms sc ss = OM (termSub %= Map.union extension) where freshenTerm (TypedExtCns _cty ec) = - do new <- liftIO $ do i <- scFreshGlobalVar sc - scExtCns sc (EC i (ecName ec) (ecType ec)) + do ec' <- liftIO $ scFreshEC sc (toShortName (ecName ec)) (ecType ec) + new <- liftIO $ scExtCns sc ec' return (ecVarIndex ec, new) ------------------------------------------------------------------------