about summary refs log tree commit diff homepage
path: root/lib/Core/Executor.cpp
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2013-11-25 04:31:59 -0800
committerCristian Cadar <c.cadar@imperial.ac.uk>2013-11-25 04:31:59 -0800
commit7c415a118f1bfc291cc6f2479b78db8041db95a4 (patch)
tree9e046919128e8f1baacc9f19203e1531738a4d1a /lib/Core/Executor.cpp
parentfd4e8b1d3a3d143f21ff83f77401a4b5c63f11d2 (diff)
parente134985e66571f88a574fd0a80ed2a4b991ca802 (diff)
downloadklee-7c415a118f1bfc291cc6f2479b78db8041db95a4.tar.gz
Merge pull request #67 from MartinNowack/fix_asm_address
Fix using assembler addresses for global variables
Diffstat (limited to 'lib/Core/Executor.cpp')
-rw-r--r--lib/Core/Executor.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index b2cff8ba..6df8dd14 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -577,9 +577,17 @@ void Executor::initializeGlobals(ExecutionState &state) {
       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"