about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2017-03-05 21:45:56 +0000
committerGitHub <noreply@github.com>2017-03-05 21:45:56 +0000
commitc8be670e87d18585def659c99b3c0429a84d020c (patch)
treeb76b7df29848337f10aaa5da5d8ea1882418d170
parent2b053eeded2688c7bb17be191b45c11080b44ca7 (diff)
parent6d0c409ce885a38979f3bcb8d73ebc8bacc0dcfa (diff)
downloadklee-c8be670e87d18585def659c99b3c0429a84d020c.tar.gz
Merge pull request #606 from jirislaby/ObjectFile
Module: simplify is_object checks
-rw-r--r--lib/Module/ModuleUtil.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
index 94a37e08..83dc5045 100644
--- a/lib/Module/ModuleUtil.cpp
+++ b/lib/Module/ModuleUtil.cpp
@@ -266,9 +266,9 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er
       }
 
     }
-    else if (object::ObjectFile *o = dyn_cast<object::ObjectFile>(child.get()))
+    else if (child.get()->isObject())
     {
-      SS << "Object file " << o->getFileName().data() <<
+      SS << "Object file " << child.get()->getFileName().data() <<
             " in archive is not supported";
       SS.flush();
       return false;
@@ -412,10 +412,10 @@ Module *klee::linkWithLibrary(Module *module,
 
   } else if (magic.is_object()) {
     OwningPtr<object::Binary> obj;
-    if (object::ObjectFile *o = dyn_cast<object::ObjectFile>(obj.get())) {
+    if (obj.get()->isObject()) {
       klee_warning("Link with library: Object file %s in archive %s found. "
           "Currently not supported.",
-          o->getFileName().data(), libraryName.c_str());
+          obj.get()->getFileName().data(), libraryName.c_str());
     }
   } else {
     klee_error("Link with library %s failed: Unrecognized file type.",