From 251a32eba660615bc1583fd7e328dde7641499c1 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sun, 14 Sep 2014 13:16:08 -0700 Subject: [Core] Remove support for "--use-asm-addresses". - I suspect no one is using this feature, and I'm not sure it is well conceived either. Ripping it out for now in lieu of bothering to maintain it. --- lib/Core/Executor.cpp | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) (limited to 'lib/Core/Executor.cpp') diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index d2978642..545218f9 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -138,10 +138,6 @@ namespace { NoPreferCex("no-prefer-cex", cl::init(false)); - cl::opt - UseAsmAddresses("use-asm-addresses", - cl::init(false)); - cl::opt RandomizeFork("randomize-fork", cl::init(false), @@ -580,32 +576,9 @@ void Executor::initializeGlobals(ExecutionState &state) { } else { LLVM_TYPE_Q Type *ty = i->getType()->getElementType(); uint64_t size = kmodule->targetData->getTypeStoreSize(ty); - MemoryObject *mo = 0; - -#if LLVM_VERSION_CODE < LLVM_VERSION(3, 3) - if (UseAsmAddresses && i->getName()[0]=='\01') { -#else - if (UseAsmAddresses && !i->getName().empty()) { -#endif - char *end; -#if LLVM_VERSION_CODE < LLVM_VERSION(3, 3) - uint64_t address = ::strtoll(i->getName().str().c_str()+1, &end, 0); -#else - uint64_t address = ::strtoll(i->getName().str().c_str(), &end, 0); -#endif - - if (end && *end == '\0') { - klee_message("NOTE: allocated global at asm specified address: %#08llx" - " (%llu bytes)", - (long long) address, (unsigned long long) size); - mo = memory->allocateFixed(address, size, &*i); - mo->isUserSpecified = true; // XXX hack; - } - } - + MemoryObject *mo = memory->allocate(size, false, true, &*i); if (!mo) - mo = memory->allocate(size, false, true, &*i); - assert(mo && "out of memory"); + llvm::report_fatal_error("out of memory"); ObjectState *os = bindObjectInState(state, mo, false); globalObjects.insert(std::make_pair(i, mo)); globalAddresses.insert(std::make_pair(i, mo->getBaseExpr())); -- cgit 1.4.1